65,210
社区成员
发帖
与我相关
我的任务
分享
typedef union
{
u32 value;
struct
{
u32 seconds :6;
u32 minutes :6;
u32 hours :5;
u32 days :15; // from 01/01/2000
} info;
} t32_date_time;
typedef union
{
u32 value;
struct
{
u32 ignition :1; // (0x00 off, 0x01 on)
u32 panic :1; // (0x00 no panic status, 0x01 panic status)
u32 input1 :1; // (0x00 open, 0x01 low)
u32 input2 :1; // (0x00 open, 0x01 low)
u32 input3 :2; // (0x00 open, 0x01 low, 0x02 high)
u32 input4 :1; // (0x00 open, 0x01 high)
u32 output1 :1; // (0x00 open, 0x01 grounded)
u32 output2 :1; // (0x00 open, 0x01 grounded)
u32 output3 :1; // (0x00 open, 0x01 high)
u32 direction :3; // (0x00 north, 0x01 north east, 0x02 east, 0x03 south east, 0x04 south, 0x05 south west, 0x06 west, 0x07 north west)
u32 gprs_connection :1; // (0x00 no server connection, 0x01 connected to server)
u32 voice_call :1; // (0x00 no voice call, 0x01 voice call)
u32 gps_fix :1; // (0x00 valid position retrieved from memory, 0x01 valid position actual)
u32 gps_antenna_fail :1; // (0x00 antenna OK, 0x01 antenna fail)
u32 max_speed_exceeded :1; // (0x00 speed OK, 0x01 max speed exceeded)
u32 tampering_seosor :1; // (0x00 tampering is OK, 0x01 tampering is open)
u32 sleep :1; // (0x00 GPS not sleeping, 0x01 will enter sleep and turn off GPS)
u32 battery_charging :1; // (0x00 not charging, 0x01 charging)
u32 battery_fault :1; // (0x00 internal battery OK, 0x01 battery not found)
u32 power_fail :1; // (0x00 power ok, 0x01 no external power)
u32 waypoint_restricted :1; // (0x00 off, 0x01 on)
u32 waypoint_entering :1; // (entering waypoint)
u32 waypoint_leaving :1; // (leaving waypoint)
u32 GSM_jamming :1; // (0x00 no jamming, 0x01 jamming)
u32 anti_theft_status :2; // (0x00 disarmed, 0x01 armed, 0x02 suspended , 0x03 alarmed)
u32 accessory_missing :1; //at least one expected accessory not found
u32 moving_status :1; // (0x00 stopped, 0x01 moving)
u32 cell_id_present :1; // (CC, NC, LC, ID - 8 bytes – will be present)
} info;
} t32_flags;