Skip to content

.Net API Poll Functions

subscribe

void subscribe(String^ path)

Subscribe to one or several nodes.

Fetch data with the poll command. In order to avoid fetching old data that is still in the buffer, execute a sync command before subscribing to data streams.

Parameters

Name Type Direction Description
path String^ in Path string of the node. Use wild card to select all.

subscribe

void subscribe(String^ path)

Subscribe to one or several nodes.

After subscription the module execution can be started with the 'execute' command. During the module execution paths can not be subscribed or unsubscribed.

Parameters

Name Type Direction Description
path String^ in Path string of the node. Use wild card to select all.

unsubscribe

void unsubscribe(String^ path)

Unsubscribe from one or several nodes.

Use this command after recording to avoid buffer overflows that may increase the latency of other command.

Parameters

Name Type Direction Description
path String^ in Path string of the node. Use wild card to select all.

unsubscribe

void unsubscribe(String^ path)

Unsubscribe from one or several nodes.

During the module execution paths can not be subscribed or unsubscribed.

Parameters

Name Type Direction Description
path String^ in Path string of the node. Use wild card to select all.

poll

Lookup poll(double duration, uint64_t timeOutMilliseconds, uint32_t flags, size_t bufferCount)

Poll all Events available before and within an given time period.

Continuously check for value changes (by calling pollEvent) in all subscribed nodes for the specified duration and return the data. If no value change occurs in subscribed nodes before duration + timeout, poll returns no data. This function call is blocking (it is synchronous). However, since all value changes are returned since either subscribing to the node or the last poll (assuming no buffer overflow has occurred on the Data Server), this function may be used in a quasi-asynchronous manner to return data spanning a much longer time than the specified duration. The timeout parameter is only relevant when communicating in a slow network. In this case it may be set to a value larger than the expected round-trip time in the network.

Parameters

Name Type Direction Description
duration double in Recording time in [s]. The function will block during that time.
timeOutMilliseconds uint64_t in Poll timeout in [ms]. Recommended value is 500ms.
flags uint32_t in Poll flags:
  • DEFAULT: 0x0000: Default.
  • FILL: 0x0001: Fill holes.
  • THROW: 0x0004: Throw EOFError exception if sample loss is detected (only possible in combination with DETECT)
  • DETECT: 0x0008: Detect data loss holes
bufferCount size_t in Deprecated. Should be provided as 1 and will be removed in a future version.

Returns Lookup with the polled events. (Empty if no event occurred within the given timeout)

getAsEvent

void getAsEvent(String^ path)

Trigger an event on the specified node.

The node data is returned by a subsequent poll command.

Parameters

Name Type Direction Description
path String^ in Path string of the node. Note: Wildcards and paths referring to streaming nodes are not permitted.