embedded_data – Embedded Data Pipe¶
Embedding data in console output for visualization
- 
class codeair.embedded_data.ConsoleWriter[source]¶
- A class to adapt console_bytes to the write method like a file. 
- 
class codeair.embedded_data.EmbeddedDataPipe[source]¶
- Encode supported data types for output to selected destination. - Embedded Data Protocol:
- C0DECAFE + LEN_4bytes_u32 + descriptor_16bytes + data – LEN is big endian – descriptor is object-dependent string (see EdataViewer.js) 
 - 
destination¶
- The destination for the encoded data. - Type
- file 
 
 - Initializes the EmbeddedDataPipe and sets the default destination. - 
chart(chart_name, value, series=None, chart_type='line')[source]¶
- Send chart data. A unique chart_name will create a new chart. New series also work this way. - Parameters
- chart_name (str) – Identifies which chart we’re talking about (“temp”, “sensors”, etc.). 
- value (float or iterable) – The data to plot. Must be a single number or an iterable of (val, millisecond) points. 
- series (str, optional) – Optional string for labeling multiple data series in the same chart. 
- chart_type (str, optional) – Optional. Can support line vs. bar vs. scatter, etc. Defaults to “line”. 
 
 
 - 
connect(destination=None)[source]¶
- Connects to a new destination. - Parameters
- destination (file object) – The new destination. Defaults to console_writer.