|
|
|
|||||
|
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 |
|
|||||
|
I guess I thought that addWithUUID did that. I don't explicitly set up an endpoint. I just went by the example in Chapter 41, p. 1173...
__________________
Mark E. Wilson Lead Programmer/Analyst Omega EP Project Laboratory for Laser Energetics (www.lle.rochester.edu) University of Rochester Rochester, NY 14623 |
|
||||||
|
Mark,
Ice allows object adapters to be created without endpoints. This is useful for example when using bidirectional connections, because a client doesn't need to establish a separate endpoint for accepting incoming connections yet still requires an object adapter in order to receive callback requests. If you call createObjectAdapter("MonitorAdapter"), then the object adapter will check for the presence of a configuration property named MonitorAdapter.Endpoints that defines its endpoints. Take care, - Mark |
|
|||||
|
Okay, that did the trick. Thanks!
__________________
Mark E. Wilson Lead Programmer/Analyst Omega EP Project Laboratory for Laser Energetics (www.lle.rochester.edu) University of Rochester Rochester, NY 14623 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with IceStorm noce more | zweit | Help Center | 4 | 02-13-2006 02:22 PM |
| IceStorm problem | sepp | Help Center | 2 | 04-05-2005 09:10 AM |
| IceStorm problem | freshman | Help Center | 1 | 03-01-2005 12:10 AM |
| IceStorm problem | freshman | Help Center | 2 | 01-26-2005 05:43 AM |
| Problem with IceStorm | minifat | Help Center | 2 | 08-19-2004 02:54 AM |