public class NetworkProtocol
extends java.lang.Object
Unisens
context.StreamingClient
s registered to the StreamingServer
will
receive a header in the form of a Unisens-XML containingElement | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
unisens |
Root-element of the header. Apart from information concerning
namespace (xmlns) and schema-location (xsi:schemaLocation), the element
contains the following attributes:
The unisens-element will contain at least one of the following elements, representing the data that will be sent. | ||||||||||
eventEntry | Describes data in the DataEvent-form. Contains information in form of
attributes concerning contentClass, id, name and sampleRate. Is parent to an "<xmlStreamingFormat decimalSeparator="." />"-element specifying that data will be streamed. See DataEvent and the unisens-xml-schema for further information. |
||||||||||
signalEntry | Describes data in the DataSignal-form. Contains information in the form
of attributes concerning adcResolution, adcZero, baseline, comment,
contentClass, dataType, id, lsbValue, name, sampleRate and unit. Is parent to an "<xmlStreamingFormat decimalSeparator="." />"-element, specifying that data will be streamed, and one or more "<channel />"-elements containing an attribute name, describing the channels the DataSignal holds. See DataSignal and the unisens-xml-schema for further information. |
||||||||||
valuesEntry | Describes data in the DataValue-form. Contains information in the form of
attributes concerning adcResolution, adcZero, baseline, comment,
contentClass, dataType, id, lsbValue, name, sampleRate and unit. Is parent to an "<xmlStreamingFormat decimalSeparator="." />"-element, specifying that data will be streamed, and one or more "<channel />"-elements containing an attribute name, describing the channels the DataValue holds. See DataValue and the unisens-xml-schema for further information. |
Type | Description |
---|---|
DataEvent |
<events id="[matching the id specified in the header]"><event type="[DataEvent's type]" sampleStamp="[DataEvent's sampleStamp]" comment="[DataEvent's comment]"/></events> |
DataSignal |
<signal
id="[matching the id specified in the header]"><sample> followed by several <data>-elements, containing the data to be sent. Each <data>-element represents a single channel. Channels are sent in the right order, as specified by the header. </sample></signal> |
DataValue |
<values
id="[matching the id specified in the header]"><value> followed by several <data sampleStamp="[the DataValue's sampleStamp]">-elements, containing the data to be sent. Each <data>-element represents a single channel. Channels are sent in the right order, as specified by the header. </value></values> |
http://unisens.org/documentation.php
Constructor and Description |
---|
NetworkProtocol(LifeCycleManager manager,
DataDescription[] descriptions,
java.lang.String measurementComment)
Creates a new
NetworkProtocol . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHeader() |
java.lang.String |
getMessageFor(DataEntry data)
Generates an xml-element to transmit given
DataEntry . |
public NetworkProtocol(LifeCycleManager manager, DataDescription[] descriptions, java.lang.String measurementComment)
NetworkProtocol
.descriptions
- DataDescription
s describing all possible outgoing
data.measurementComment
- A free comment about the measurement.public java.lang.String getHeader()
StreamingClient
s.