4G_module/custom/jt808/inc/terminal_control.h

36 lines
1.1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef JT808_TERMINAL_CONTROL_H_
#define JT808_TERMINAL_CONTROL_H_
#include <stdio.h>
#include <stdbool.h>
//#include <fcntl.h>
#include <stdint.h>
#include "util.h"
// 0x8105终端控制命令字.
union TerminalCtrlCmdByte
{
struct
{
unsigned char u8val_0 : 1; //
unsigned char u8val_1 : 1; // 无线升级
unsigned char u8val_2 : 1; // 控制终端连接指定服务器
unsigned char u8val_3 : 1; // 终端关机
unsigned char u8val_4 : 1; // 终端复位
unsigned char u8val_5 : 1; // 终端恢复出厂设置
unsigned char u8val_6 : 1; // 关闭数据通信
unsigned char u8val_7 : 1; // 关闭所有无线通信
} bit;
unsigned char u8val;
};
// 0x8105终端控制.
struct TerminalControl
{
// TerminalCtrlCmdByte cmdByte; // 命令字
unsigned char cmdByte; // 命令字 1:无线升级2:控制终端连接指定服务器3:终端关机4:终端复位5:终端恢复出厂设置6:关闭数据通信;7:关闭所有无线通信
const char *cmdParameter; // 命令参数
};
#endif