View Single Post
  #1 (permalink)  
Old 07-18-2005
mwilson mwilson is offline
Registered User
 
Name: Mark Wilson
Organization: University of Rochester
Project: Omega EP laser
 
Join Date: Jul 2005
Location: Rochester, NY
Posts: 74
Problem with IceStorm

I've set up an IceStorm service and run it with network trace set to 2. I start my service, it connects okay, I start up a "listener" client, connects okay, then I run a client that makes calls on the service, which publishes events to the IceStorm service.

Tracing shows that IceStorm receives the events from the service just fine, but the listener doesn't seem to receive anything.

Here is the listener code:

class MSCApplication : virtual public Ice::Application
{
public:
virtual int run(int, char **)
{
//
// Set up for IceStorm.
//
Ice::ObjectPrx obj = communicator()->stringToProxy(
"MSCEventService/TopicManager:tcp -h cactus -p 9999");

IceStorm::TopicManagerPrx topicManager =
IceStorm::TopicManagerPrx::checkedCast(obj);


Ice::ObjectAdapterPtr adapter =
communicator()->createObjectAdapter("MonitorAdapter");

MSC::MonitorPtr monitor = new MonitorI;
Ice::ObjectPrx proxy = adapter->addWithUUID(monitor);

IceStorm::TopicPrx topic;
try
{
topic = topicManager->retrieve("ActuatorControl");
IceStorm::QoS qos;
topic->subscribe(qos, proxy);
}
catch (const IceStorm::NoSuchTopic&)
{
std::cerr << "No topic found" << std::endl;
}

adapter->activate();

communicator()->waitForShutdown();

return 0;
}
};

I have no idea what I am doing wrong (most likely something simple, but I'm at a lose right now). The string "ActuatorControl" is correct, and I actually have error checking code (took it out to make this shorter) that passes just fine. Seems like it should work.

Help!

Thanks,
Mark
__________________
Mark E. Wilson
Lead Programmer/Analyst
Omega EP Project
Laboratory for Laser Energetics (www.lle.rochester.edu)
University of Rochester
Rochester, NY 14623
Reply With Quote