new PlotBuffer(htmlElementIds, maximumBufferSize)
Constructs a new instance based on the specified DOM elements and buffer size.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
htmlElementIds |
Array.<string> | the names of the elements to listen to. | |
maximumBufferSize |
number | 32 | the number of entries that will be buffered. Beyond this limit the oldest values will be silently thrown away. |
Methods
activate()
Activate the plot buffer to receive information for the elements specified in the constructor.
getMetadataMap()
Returns a map containing the most recently received channel metadata.
Returns:
metadataMap - Map of channel names and their associated metadata. See
WicaChannelName and
WicaChannelMetadata.
getValueMap()
Returns a map containing the most recently received channel values.
Returns:
valueMap - Map of channel names and array of values that have been received for the channel in
chronological order. See WicaChannelName and
WicaChannelValue.
isConnectedToServer() → {boolean}
Returns an indication of whether the connection to the server has been established.
Returns:
- Type
- boolean
isDataAvailable() → {boolean}
Returns an indication of whether data has been received from ALL the data
sources in the stream.
- at least one stream metadata object has been received.
- at least one stream value object has been received.
- at least one value has been received for every channel in the stream.
Returns:
- Type
- boolean
shutdown()
Deactivates the plot buffer. No further information will be added but existing
data will be preserved.