118 lines
3.3 KiB
C#
118 lines
3.3 KiB
C#
|
using System;
|
|||
|
namespace MotoTRBO_GW
|
|||
|
{
|
|||
|
public struct htCell_t
|
|||
|
{
|
|||
|
public string lat, lng, spd; // GPS data
|
|||
|
public DateTime location_time;
|
|||
|
public double radius;
|
|||
|
public string di;
|
|||
|
public DateTime activity_time; // = min(gpstime, arstime)
|
|||
|
}
|
|||
|
|
|||
|
public struct GatewayID_IP
|
|||
|
{
|
|||
|
//the remote IP of the gateway radio (192.168.10.31, for example)
|
|||
|
public String remoteIP;
|
|||
|
//the local IP of the gateway radio (192.168.10.30, for example)
|
|||
|
public String localIP;
|
|||
|
//the ID of the network card - necessary for route adding
|
|||
|
public String ID;
|
|||
|
}
|
|||
|
|
|||
|
//todo: delete once ARS commands arrive on message bus
|
|||
|
|
|||
|
/*enum header_event
|
|||
|
{
|
|||
|
Unqualified_Event = 0x00,
|
|||
|
Initial_Event = 0x01,
|
|||
|
Refresh_Event = 0x02,
|
|||
|
UNKNOWN = 0x03
|
|||
|
}
|
|||
|
|
|||
|
enum Document_Identifiers_ENUM
|
|||
|
{
|
|||
|
Immediate_Location_Request = 0x04,
|
|||
|
Immediate_Location_Request_NoCDT = 0x05,
|
|||
|
Immediate_Location_Report = 0x06,
|
|||
|
Immediate_Location_Report_NoCDT = 0x07,
|
|||
|
Triggered_Location_Request = 0x08,
|
|||
|
Triggered_Location_Request_NoCDT = 0x09,
|
|||
|
Triggered_Location_Answer = 0x0A,
|
|||
|
Triggered_Location_Answer_NoCDT = 0x0B,
|
|||
|
Triggered_Location_Report = 0x0C,
|
|||
|
Triggered_Location_Report_NoCDT = 0x0D,
|
|||
|
Triggered_Location_Stop_Request = 0x0E,
|
|||
|
Triggered_Location_Stop_Request_NoCDT = 0x0F,
|
|||
|
Triggered_Location_Stop_Answer = 0x10,
|
|||
|
Triggered_Location_Stop_Answer_NoCDT = 0x11,
|
|||
|
Unsolicited_Location_Report = 0x12,
|
|||
|
Unsolicited_Location_Report_NoCDT = 0x13,
|
|||
|
Location_Protocol_Request_NoCDT = 0x14,
|
|||
|
Location_Protocol_Report_NoCDT = 0x15
|
|||
|
}
|
|||
|
|
|||
|
enum Common_Element_Tokens_ENUM
|
|||
|
{
|
|||
|
request_id = 0x22,
|
|||
|
request_id1 = 0x23,
|
|||
|
request_id2 = 0x24
|
|||
|
}
|
|||
|
|
|||
|
enum Query_Request_Messages_Tokens_ENUM
|
|||
|
{
|
|||
|
interval = 0x31,
|
|||
|
oneshot_trigger = 0x33,
|
|||
|
periodic_trigger = 0x34,
|
|||
|
request_altitude = 0x54,
|
|||
|
request_altitude_acc = 0x55,
|
|||
|
request_altitude_acc1 = 0x56,
|
|||
|
request_direction_hor = 0x57,
|
|||
|
request_hor_acc = 0x5F,
|
|||
|
request_hor_acc1 = 0x60,
|
|||
|
request_lev_conf = 0x61,
|
|||
|
request_protocol_version = 0x3F,
|
|||
|
request_speed_hor = 0x62,
|
|||
|
request_speed_vrt = 0x64,
|
|||
|
require_max_info_age = 0x42,
|
|||
|
require_altitude = 0x66,
|
|||
|
require_altitude_acc = 0x67,
|
|||
|
require_altitude_acc1 = 0x68,
|
|||
|
require_direction_hor = 0x69,
|
|||
|
require_hor_acc = 0x71,
|
|||
|
require_hor_acc1 = 0x72,
|
|||
|
require_lev_conf = 0x73,
|
|||
|
require_speed_hor = 0x74,
|
|||
|
require_speed_vrt = 0x76,
|
|||
|
ret_info = 0x50,
|
|||
|
ret_info1 = 0x51,
|
|||
|
ret_info2 = 0x52,
|
|||
|
ret_info3 = 0x53,
|
|||
|
trg_condition = 0x4A
|
|||
|
}*/
|
|||
|
|
|||
|
public struct messSEQnrAndIndex
|
|||
|
{
|
|||
|
public int index;
|
|||
|
public int seq_id;
|
|||
|
public DateTime time;
|
|||
|
}
|
|||
|
|
|||
|
struct header_T
|
|||
|
{
|
|||
|
public bool ext, ext2, ack, cntl;
|
|||
|
public byte pdu_type;
|
|||
|
public byte seq_no;
|
|||
|
public byte encoding;
|
|||
|
public byte header;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
public class LocationRequest
|
|||
|
{
|
|||
|
public String RadioID;
|
|||
|
public DateTime RequestTime;
|
|||
|
public int ReportingSeconds;
|
|||
|
public int NrOfRetry;
|
|||
|
}
|
|||
|
}
|