You are here: Foswiki>Software Web>Ice (18 Jun 2019, PetrKubanek)Edit Attach


Ice stands for the Internet Communication Engine. Please see Wikipedia page for details.

Where you can find Ice

Ice is used (on the server side) in:


Instruments use Ice to communicate with TCS through IIF. IIF act as coordinator and orchestrator, distributing instruments requests to appropriate TCS subsystem(s). IIF provides two interfaces, Factory and IIFServer.


Factory interface provides create method. The method returns a proxy to IIFFactory, allowing the client to authorize (tell IIF which telescope it is registered on) and ask TCS to perform intended commands.


Allows instrument client to perform TCS commands.

A simple Ice client in pseudo code can be written as:


IIFServer proxy = Factory::create("test", "prime left", "LBC"); SeqPos stars = { coord1=10 * Deg2Rad, coord2= 20 * Deg2Rad, ... }; proxy.SetStars2 (stars); proxy.PresetTelescope(10 * Deg2Rad, "position", "track", "left"); %ENDCODE%

or in Python:

%CODE{"python"}% #!/usr/bin/python3

import sys import Ice # the -I path shall point to and files (iif/ice directory in tcs tree) Ice.loadSlice('-I. --all') import lbto

communicator = Ice.initialize(sys.argv, '/lbt/irtc/current/etc/testingconfig.client')

factory = lbto.FactoryPrx.checkedCast(communicator.propertyToProxy('Factory.Proxy').ice_twoway().ice_secure(False)) server = factory.create('test', 'prime left', 'LBC')

p1 = lbto.DDstruct(DDname='UTC') p2 = lbto.DDstruct(DDname='LST') print(server.GetParameter([p1, p2]))

communicator.destroy() %ENDCODE%


AOS uses various Ice interfaces for calls between supervisors and arbitrators.


TCS2019A (Ice 3.7)

Ice was upgraded to version 3.7. Previously, the 3.5 version was used. Client software using Ice version 3.5 properly communicates with any IIF we know about. See below if your client (=instrument) is using Ice 3.6+ or you would like to upgrade to Ice 3.6+.

Ice 3.6+ client changes

In order for Ice version 3.6 and higher based client to properly communicate with any IIF server, the ACM configuration shall be set as follows:

%CODE{"inf"}% Ice.ACM.Client.Heartbeat=2 Ice.ACM.Client.Timeout=10 %ENDCODE%

When Heartbeat isn't set to 2 (or 3) on the client side, any long duration operation (preset being the most prominent example) will end with an error due to Ice timeout. The easiest verification of the change is to set the values as:

%CODE{"inf"}% Ice.ACM.Client.Heartbeat=1 Ice.ACM.Client.Timeout=1 %ENDCODE%

and issue a preset. Timeout shall occur early while waiting for IIFServer::PresetTelescope calls return. Once Heartbeat value is changed to 2 (or 3), IIFServer::PresetTelescope call shall not report a timeout.

Those values are usually stored and retrieved from a configuration file. If a configuration file isn't specified, various default locations are probed by Ice during initialization. The fastest method of finding which configuration file is being used is running the client with strace command (see man strace for details). Please bear in mind Ice search for the configuration file in current folder as well, so your mileage might vary if you run Ice client from folder X without config.client file and from client Y with config.client file. You are encouraged to use Ice::Properties::load(const char*) method to remove any disambiguation.
Topic revision: r3 - 18 Jun 2019, PetrKubanek
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback