Intro to Danlaw UDP

Understanding UDP

Datalogger device messages sent over the DanlawUDP protocol are decoded into human-readable JSON events by the platform.

Knowing the types of UDP events that could come through the system allows you to write rules to capture the events you want to use in your application. This catalog lists every event type.

UDP Message Composition

Message ComponentDescription
Message HeaderContains metadata about the message: time, location, etc.
Message BodyContains the contents of the message
Message FooterContains a checksum for the message contents

Events sent over the UDP protocol therefore contain two headers: the platform-appended header and the protocol-specific header referenced in the table above (example below).

UDP Message Header

The UDP message header—its format and fields—is specific to the UDP protocol, and is not the same as the platform-appended header which appears on every event regardless of protocol. This header is therefore nested inside the platform's body object.

Example

{
  "header": {
    "timestamp": "2016-02-05T10:36:31-05:00",
    "tripType": "Trip",
    "tripNumber": 23,
    "messageType": 10,
    "messageLength": 6,
    "latitude": 42.2793934,
    "longitude": -83.72955975,
    "fixQuality": "FixInvalid",
    "vehicleProtocolId": "ISO15765_11_BIT_CAN",
    "odo": 22
  }
}
- header (object)
 - timestamp: (string) - ISO 8601-formatted time stamp showing when the event was produced on the device.
 - tripType: (enum[string]) - Indicates a contextual type for the event.
   - Members
      - `IgnitionOff`
      - `Trip`
      - `Idling`
      - `Unknown`
 - tripNumber: (number) - A sequential number that increases after each trip. Resets after 65,536 trips.  
 - messageType: (number) - A unique number that correlates to the `type` field in the body of the message.
 - messageLength: (number) - Indicates the total bytes of the message, including the checksum.
 - latitude: (number)
 - longitude: (number)
 - fixQuality: (enum[string]) - The validity and accuracy of the GPS data.
    - Members
      - `FixOk` - 2D or 3D fix. Latitude and longitude are valid.
      - `StoredFix` - Latitude and longitude are readings from (up to) 5 seconds ago, because the device has not been able to get a GPS fix for 5 seconds.
      - `FixInvalid` - Latitude and longitude are invalid.
      - `Unknown` - The platform cannot decode the value.
 - vehicleProtocolId: (enum[string]) - The type of protocol the device detected on the vehicle bus.
    - Members
      - `NoProtocol` - Would only appear if a vehicle were being towed. 
      - `J1850VPW`
      - `J1850PWM`
      - `ISO9141`
      - `ISO14230_FIVE_BAWD`
      - `ISO14230_FAST_INIT`
      - `ISO15765_11_BIT_CAN`
      - `ISO15765_29_BIT_CAN`
      - `J1939`
      - `J1708`
      - `Unknown`
 - odo: (number) - Vehicle odometer or device-calculated odometer.

UDP Message Body: Event Types