Skip to content

Detectors

John Galbraith edited this page Jan 11, 2017 · 1 revision

Detector

Many types, especially headers, do not describe the entire binary blob, but rather represent a generic structure used across a wide variety of specific messages. The detector section specifies what to do with the remaining bytes in a blob after the first type (the "parent") is decoded. Most header types will have many detectors, but not every type will have any detectors at all. In the Ibeo case, ibeo.vehicle_state and ibeo.scan_data gobble the entire remainder of the blob, so they contain no detectors. They may still have nested types, such as ibeo.scan_point, that need no detector because one of the fields in the type names the nested type explicitly and there is no choice the transcoder must make.

[ibeo.header]
    description = ... 
    detector = [ 
        { name = "ibeo.vehicle_state", magic = "0xAFFEC0C2", data_type = "0x2807" }, 
        { name = "ibeo.scan_data", magic = "0xAFFEC0C2", data_type = "0x2205" }
    ] 
Clone this wiki locally