using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SDRGatewayService { public enum CM_MSG_TYPE { CM_DATA = 0x00, CM_REGISTER_REQ = 0x02, CM_REGISTER_REPLY = 0x03, CM_BROADCAST = 0x04, CM_REPORT = 0x01 }; public enum REG_ANSW { REG_OK = 0x00, REG_DUPLICATE_ADDRESS, REG_INVALID_ADDRESS, REG_NOT_AVAILABLE, REG_INVALID_PASSWD }; enum DEL_ANS { DELIVERY_OVERLOAD = 0x40, DELIVERY_SERVICE_DISABLED = 0x41, DELIVERY_SERV_TEMP_NOT_AVAIL = 0x42, DELIVERY_DEST_NOT_AUTH_FOR_SDS = 0x44, DELIVERY_UNKNOWN_DEST = 0x45, DELIVERY_GROUP_ADDR = 0x47, DELIVERY_NOT_REACHABLE = 0x4a, DELIVERY_NOT_REGISTERED = 0x4b, DELIVERT_DEST_QUEUE_FULL = 0x4c, DELIVERY_MSG_TOO_LONG = 0x4d, DELIVERY_DEST_NOT_SUPPORT_PDU = 0x4e, DELIVERY_DEST_NOT_CONNECTED = 0x4f, DELIVERY_PROT_NOT_SUPP = 0x50, DELIVERY_DEST_NOT_ACC_SDS = 0x53, DELIVERY_DEST_PROHIBITED = 0x56, DELIVERY_UNKOWN_SUBSCRIBER = 0x58, DELIVERY_DEST_NOT_REACHABLE = 0x5a, DELIVERY_TEXT_ERROR = 0x8d, DELIVERY_CORRUPT_INFO = 0x8e }; public class msgCell { public CTRL_MSG_TYPE type; public string reqID; public string appID; public string IMEI; public string result; public string lat, lng, radius, spd, dir; // GPS data public string event_info; public int ars, emergency, poll; public string sms; public MSG_TYPE msg; public DateTime time; public uint time70; public msgCell() { type = CTRL_MSG_TYPE.Unknown; msg = MSG_TYPE.GPS; sms = ""; ars = -1; emergency = -1; poll = -1; time70 = 0; } } public enum CTRL_MSG_TYPE { Loc_Reg_Answ = 0x00, Trig_Loc_Answ = 0x01, Immed_Loc_Answ = 0x02, Trig_Loc_Rep = 0x10, Trig_Loc_Rep_error = 0x11, Immed_Loc_rep = 0x12, Immed_Loc_rep_error = 0x13, Unsolicited_Loc_rep = 0x14, Unsolicited_Loc_rep_error = 0x15, Unknown = 0xff }; public enum MSG_TYPE { GPS = 0x010, GPSpoll = 0x11, ARS = 0x02, SMS = 0x03, Emergency = 0x04, ARS_ON = 0x05, ARS_OFF = 0x06 }; }