Preliminary documentation for Ice for MATLAB. Do not use in production applications. Refer to the space directory for other releases.

Now we'll expand on the earlier weather monitoring example, demonstrating how to create, subscribe to and publish messages on a topic. We use the following Slice definitions in our example:

Slice
struct Measurement
{
    string tower; // tower id
    float windSpeed; // knots
    short windDirection; // degrees
    float temperature; // degrees Celsius
}

interface Monitor
{
    void report(Measurement m);
}

Monitor is our topic interface. For the sake of simplicity, it defines just one operation, report, taking a Measurement struct as its only parameter.

Topics

See Also

  • No labels