Overview
New status object can have information about Analog and Digital sensors, OBD2 PID, OBD2 DTC, J1939 and custom Trakopolis extra data attritubes.
Analog Sensors
If terminal has associated analog sensors, their values can be added with status. To add analog sensors data, following values needs to be passed:
- Sensor - analog sensor number, registered at Trakopolis
- Value.RawValue - analog sensor value
Other fields and values are ignored.
{ "AnalogSensorDatas": [ { "Sensor": 0, "SensorValue": 2.5 }, { "Sensor": 1, "SensorValue": 3.5 }] }
Digital Sensors
If terminal has associated digital sensors, their values can be added with status. To add digital sensors data, following values needs to be passed:
- Sensor - digital sensor number, registered at Trakopolis
- Value - digital sensor value (true or false)
Other fields are ignored.
{ "DigitalSensorDatas": [ { "Sensor": 0, "Value": false }, { "Sensor": 2, "Value": true }] }
OBD2 DTC
To insert OBD2 DTC record, only DtcCode value needs to be passed. Other fields are ignored.
{ "Obd2Dtc": [ {"DtcCode": "B0001"}, {"DtcCode": "C0035"}], }
OBD2 PID
To insert OBD2 PID record, valid PID code needs to be passed as well as
float value. Some OBD PID codes have multiple different parameters. In these
cases ParamNo should be passed as well.
{ "Obd2Pid": [{ "PidCode": 268, "FloatValue": {"RawValue": 83.5} }, { "PidCode": 276, "PidParamNo": 1, "FloatValue": {"RawValue": 40.2} }], }
J1939
There are different types of J1939 records with different input fields
criterias, depending on SPN property type and Fmi Number value.
Spn property with state:
- SpnNumber - SPN number
- SpnState - State value (Integer)
Spn property with float value:
- SpnNumber - SPN number
- SpnFloatValue.RawValue - float value
If J1939 has FMI number, then SpnState or SpnFloatValue properties can be omited.
{ "J1939": [{ "SpnNumber": 97, "SpnState": 1 }, { "SpnNumber": 91, "SpnFloatValue": {"RawValue": 65} }, { "SpnNumber": 245, "FmiNumber": 10 }] }
Trakopolis Extra Data
There are different types of Trakopolis Extra data records with different
input fields criterias, depending on extra data type.
String type:
- UniqueCode - Unique Code
- StringValue - Property value
Set type:
- UniqueCode - Unique Code.
- OptionKey - Option key. Please note, that leading zeroes are important, for example, "01"
Float type:
- UniqueCode - Unique Code
- FloatValue - Property value
Binary type:
- UniqueCode - Unique Code
- BytesValue - Base64 encoded property value
{ "ExtraParams": [{ "UniqueCode": "ANNOTATION_TEXT", "StringValue": "Test Value", }, { "UniqueCode": "CALAMP_ABS_ACTIVE_LAMP", "OptionKey": "01", }, { "UniqueCode": "CALAMP_BATTERY_VOLTAGE", "FloatValue": {"RawValue": 1.5} }, { "UniqueCode": "RAW_PAYLOAD", "BytesValue": "MHgzMDc4NDE0MTQyNDI0MzQzNDQ0NDQ1NDU0NjQ2" }], }
Full Json-based request example (including all sensors above):
{ "TerminalId": 1234, "Latitude": 51.04917, "Longitude": -114.06083, "MessageCode": "Ping", "CreatedOn": "2013-01-01T00:00:00.00000000Z", "AnalogSensorDatas": [ { "Sensor": 0, "SensorValue": 2.5 }, { "Sensor": 1, "SensorValue": 3.5 }], "DigitalSensorDatas": [ { "Sensor": 0, "Value": false }, { "Sensor": 2, "Value": true }], "ExtraDatas": { "Obd2Dtc": [ {"DtcCode": "B0001"}, {"DtcCode": "C0035"} ], "Obd2Pid": [{ "PidCode": 268, "FloatValue": {"RawValue": 83.5} }, { "PidCode": 276, "PidParamNo": 1, "FloatValue": {"RawValue": 40.2} }], "J1939": [{ "SpnNumber": 97, "SpnState": 1 }, { "SpnNumber": 91, "SpnFloatValue": {"RawValue": 65} }, { "SpnNumber": 245, "FmiNumber": 10 }], "ExtraParams": [{ "UniqueCode": "ANNOTATION_TEXT", "StringValue": "Test Value", }, { "UniqueCode": "CALAMP_ABS_ACTIVE_LAMP", "OptionKey": "01", }, { "UniqueCode": "CALAMP_BATTERY_VOLTAGE", "FloatValue": {"RawValue": 1.5} }, { "UniqueCode": "RAW_PAYLOAD", "BytesValue": "MHgzMDc4NDE0MTQyNDI0MzQzNDQ0NDQ1NDU0NjQ2" }],], } }