Client Application

Overview

The rtctkClient application is used to send commands to RTC components using the CII MAL ZPB middleware. The client can also listen to state change events via CII MAL ZPB subscription.

Even though the client application does not qualify as an RTC Component it heavily depends on the infrastructure and principles provided by the RTC Tk Component Framework.

Currently the following command interfaces are supported:

  • SVIF: Basic component life-cycle, e.g. Init, Enable, Disable, Reset, Exit

  • UCIF: For parameter updates, e.g. Update

  • FCIF: For runnable behavior, e.g. Run, Idle, Recover

  • MCIF: For measurable behavior, e.g. Measure

  • OCIF: For optimisable behavior, e.g. Optimise

  • LCIF: For loopaware behavior, e.g. Open, Close

  • LSIF: For suspendable behavior, e.g. Suspend, Resume

Configuration

The client application uses the service discovery mechanism to retrieve MAL endpoints of the targeted RTC Components from the central service registry, therefore the service discovery endpoint must be provided as an additional command argument.

Note

In the provided examples the rtctkClient application is usually indirectly called from the respective shell script. This was done to save users from always having to provide the long service discovery endpoint information.

Usage

To send commands to RTC Components, invoke the rtctkClient application like this:

rtctkClient my_component Init -s file:/path/to/service/registry.yaml

To listen to state-change events, use this command:

rtctkClient my_component Listen -s file:/path/to/service/registry.yaml

To terminate the listener simply use CTRL + C.

Note

Note that arguments component name, command name and command argument are strings. The service discovery endpoint is a string in URI format currently pointing to the fake service registry yaml file.

Customisation

Framework users can create a custom client lib that also also supports user-specific command interfaces. Customisation is done by extending the toolkit provided CommandRequestor class and then registering it as a template parameter to the toolkit provided client runner function.

A concrete example how to create a custom client application can be found in the advanced tutorial Creating a Custom RTC Component.

Limitations and Known Issues

Currently the application only covers a basic set of command interfaces.

In subsequent releases the following functionality will be added:

  • Support for structured command payloads (i.e. JSON)

In the long term the tool may even be replaced by a generic commanding and messaging tool on the ELT level.