The default set of options mean data is output in standard JSON format. This makes it very easy to process the data using PHP and then push the data into a MySQL database or equivalent. JSON is also easily read by many different software packages such as Adobe After Effects and Adobe Premiere. This means data can be provided direct to data analysis software, outside broadcast trucks or studio-based projects.
The ASCII (text) Serial module allows you to output "human readable" text from a serial (COM) port. Common formats are supported or, using the properties, tailor the output to the receiver's preference.
An example of ASCII JSON output would be:
which would indicate a heart rate "HR" of 80 beats per minute and breathing rate "BR" of 20 breaths per minute. Even simpler outputs are possible by changing a few settings, for example:
which could be set to update once a second making a very easy to process (and read) streams of data.
This provides a list of all the streams to transmit. NOTE: if no streams are configured the system will default to transmitting all streams available. Since there is no per-stream configuration it is not possible to name or apply maths to each stream.
To add streams, click “Add”. To delete existing streams, click the “DEL” by the unwanted stream. Stream options are:
- Filter – unlabelled numerical box to the left of the stream combo. See Streams and Filters.
- Stream – see Streams and Filters.
- Name – this is the name that will output whenever data is transmitted for this stream.
- Maths – click this to reveal the Maths pop-up window
ASCII Pre/Post-amble Properties
This extension was added to the ASCII module to make it easy to push data onto a web server. Many web servers can have a small piece of PHP code to decode JSON format data and load it into a database. For example:
" HTTP//1.1/r/nHost: webserver/r/nConnection: keep-alive/r/n/r/n"
is all that is needed to pack up the normal data. NOTE: the above strings are entered into the respective text boxes without the quotes. IMPORTANT: the second string MUST include the space shown at the beginning!
There are other ways this simple extension could be used such as adding quotes or tunnelling STX/ETX text to the normal messages.
ASCII Protocol Properties
The ASCII protocol provides a way of quickly configuring human-readable serial data. The main options are:
- ASCII Standard – some built in standards are provided for quick configuration. JSON is the default and provides industry compatible and readable data output.
- Always Send Packets – if ticked, the protocol will produce a data packet even if there is no data to transmit. For example, in JSON this would mean you would get the open/close brackets each tick even if they contain no data.
- Allow Array Format – higher frequency data can be transmitted in a block, an array. If this is not desired or permitted by the receiver, uncheck this box.
- Transmit: All Streams – when checked, the protocol will transmit ALL streams available in the system. This could result in a large amount of data. Using this option saves having to individually configure each stream. Any configured streams will override the default output. Configured streams can either specify the exact Filtered Stream (and therefore only apply to it) or use the Late Binding Flag (and apply to all matching streams but a wildcard filter).
- Send Values Every Tick – when checked, the current value will be resent even if no new value has been acquired by the system.
- Packet (red) – defines the character string used to identify the start and end of the packet.
- Stream (green) – defines the character strings used to delineate the stream identifier and stream/value separator.
- Values (purple) – defines the numerical padding (e.g. with padding of four the value twelve is transmitted as “0012”), the format of the number (decimal “12”, hexadecimal “AB” or Float “12.5”) and the character strings used to delineate the value.
- Array Values (blue) – defines how multiple values will be combined and what contains the array elements.
The feedback panel shows an example of how data will be transmitted with the current settings (it does not reflect the actual streams that may be configured or available).
Serial Port Properties
This panel is shared by all modules that input or output serial data. Options are:
- Port – almost always to be set as Primary since this is the port wired to the device’s connector. The secondary or higher ports are only available in custom units.
- Baud rate – all standard rates are supported up to 115200. Contact support if other rates are required.
- Bit options – Reserved, currently only “N81” is supported. Contact support for information.
- Frequency – the rate in Hertz that the port will perform an update. An update may or may not result in data being transmitted or processed, depending on the protocols settings.
All modules have this panel. Options are:
- Type – is determined when first adding the module and governs which module properties can be configured.
- Name – used to identify the module in the module list but may also play a part on the embedded device, for example it may be required for it to appear in the outputted data.
- Enable on Pilot – if this is set then this config item will be included and enabled when transferred to the Pilot. If not, then it will still be editable on the PC but will not be used by the Pilot.
- Default Filter – see Streams, Advanced Concepts.
- User Number – This can be used to identify this module elsewhere in the system. For example, by outputting this number whenever the device is connected. In general, it can be left as zero.