Home Help Center

IceStorm with Ice Touch

nsriramnsriram Member Sriram NarasimhanOrganization: UCSCProject: MATLAB Simulation
I am trying to create a clock publisher with Ice Touch for the IceStorm Clock example. I am not sure how to connect to the TopicManager and retrieve the "time" topic. Any help would be appreciated.


  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    Unfortunately, we don't make it very easy to use IceStorm with Ice Touch applications as we don't provide a library with compiled IceStorm generated code. So this is something you need to do in your project.

    I've attached a modified IceStorm.ice file which is self-contained and that you can add to your application Xcode project. After adding the file to your project, you will need to go to project settings and click on the project target to show the target setting tabs. Next, click on the "Build Phases" tab and under "Compile Sources" double-click on the IceStorm.ice file and add the "--ice" compiler flag.

    Once this is done, Xcode should automatically compile IceStorm.ice using the slice2objc compiler and you should be able to include IceStorm.h to get the Objective-C generated code for IceStorm.

    To obtain the topic proxy for the clock demo, the following code should work:
        #include <IceStorm.h>
        ICEObjectPrx* p = [communicator stringToProxy:@"DemoIceStorm/TopicManager:default -p 10000"];
        IceStormTopicManagerPrx* m = [IceStormTopicManagerPrx uncheckedCast:p];
        IceStormTopicPrx* topic = [m retrieve:@"time"];

    We will consider providing IceStorm generated code in upcoming Ice Touch versions.

  • nsriramnsriram Member Sriram NarasimhanOrganization: UCSCProject: MATLAB Simulation
    Aha. It works as advertised now. Thanks for the prompt reply Benoit.
Sign In or Register to comment.