Structure about real-time traffic data information.
struct{
BYTE byStart;
BYTE byCMD;
WORD wSpaceHeadway;
WORD wDeviceID;
WORD wDataLen;
BYTE byLane;
BYTE bySpeed;
BYTE byLaneState;
BYTE byQueueLen;
WORD wLoopState;
WORD wStateMask;
DWORD dwDownwardFlow;
DWORD dwUpwardFlow;
BYTE byJamLevel;
BYTE byVehicleDirection;
BYTE byJamFlow;
BYTE byChannelizationLane;
BYTE byVehicleType;
BYTE byRes1[5];
WORD wTimeHeadway;
}NET_DVR_TPS_PARAM, *LPNET_DVR_TPS_PARAM;
Start code.
Command No.: 01-enter, 02-exit, 03-congestion status (only byLaneState and byQueueLen are valid), 04-multi-coil status (only wLoopState and wStateMask are valid, and it indicates the vehicle passing status of multiple coils in the lane byLane), 05-turning status (struTurnDirection in NET_DVR_TPS_ADDINFO is valid), 06-stop line information (struStopLine in NET_DVR_TPS_ADDINFO is valid).
Space headway, unit: m.
Device ID.
Data size.
Lane No.
Vehicle speed, unit: km/h.
Lane status: 0-unknown, 1-smooth, 2-crowded, 3-congestion.
Queue length in congestion status, unit: m.
Coil status: 1-entered, 2-exited. The bit No. corresponds to the status of that coil No. The longer distance between the lens and the coil indicates that the coil No. is larger. The lane No. will be parsed firstly and then the coil No. will be parsed. For a single lane, the coil No. is unique.
Coil status mask: 1-wLoopState is valid, 0-wLoopState is invalid.
Traffic flow from top to bottom on the current lane.
Traffic flow from bottom to top on the current lane.
Congestion level: 1-light, 2-medium, 3-serious. This member is valid when byLaneState is 3.
Vehicle driving direction: 0-unknown, 1-from top to bottom, 2-from bottom to top.
Newly added traffic flow during congestion. The accumulated traffic flow will be uploaded every time there is a new vehicle added.
Channelized lane No. Channelization refers to the change status of the number of lanes, and generally it is the number of lanes in the intersection.
Vehicle type recognition: 0-unknown, 1-large-sized bus, 2-large-sized cargo truck, 3-small sedan, 4-non-motor vehicle.
Reserved, set to 0.
Time headway, unit: second.