IoT C4I(Command, Control, Communications and Intelligence + Computer) package provides a simple way to collect data from IoT devices and send it to a server. Make your own IoT data receiver and command sender with this package.
Currently supports Command
and Communications
, stil working on rest of the features.
- IoT data receiver receives data from IoT devices via serial port
- Each data is fixed length and uses COBS encoding to separate data
- Collect data from IoT devices
- Send command to IoT devices
- Exposes telemetry data
- Provides device intelligence (e.g. reception rate, etc.)
- Set port configuration, desired data size
- Open serial port, start receiving data
- Command data may be sent to the device (optional)
- Process received data on the fly
- Dynamic field parsing is supported (optional, see Field data specification and Sample Code)
- CRC32 checksum while zero-fill specific fields (optional, see Field data specification and Sample Code)
{
"fields": [
{
"name": "RSSI",
"startIdx": 0,
"endIdx": 0
},
{
"name": "ProductVersion",
"startIdx": 7,
"endIdx": 8
},
{
"startIdx": 48,
"endIdx": 48,
"zerofill": true
},
{
"name": "FieldExample",
"startIdx": 49,
"endIdx": 49,
"zerofill": true
}
]
}
name
: Field name to be used in the data, omit if not neededstartIdx
: Start index of the field in the dataendIdx
: End index of the field in the datazerofill
: If true, this field will be zero-filled when hashingisSigned
: If true, this field will be treated as signed integer
See examples/example.go
for details.
MIT
Kwangmin Kim (kmkim@conalog.com)
- Modify parseBuffer from byte list to circular buffer (since this package supports dynamic-length data)