150 lines
4.2 KiB
C#
150 lines
4.2 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
|
|||
|
namespace SafeMobileLib
|
|||
|
{
|
|||
|
/* Opcode of User Input Operation */
|
|||
|
public enum Opcodes
|
|||
|
{
|
|||
|
CC_BTNKEY_REPLY = 0x8041,
|
|||
|
CC_CALL_REPLY = 0x8841,
|
|||
|
CC_CALLCANCEL_REPLY = 0x8842,
|
|||
|
CC_ZONECH_REPLY = 0x80C4,
|
|||
|
CC_TX_STATUS = 0xB843,
|
|||
|
CC_RX_STATUS = 0xB844,
|
|||
|
CC_RADIOINFO_REPLY = 0x8201,
|
|||
|
CC_TXRX_CFG_REPLY = 0x80C9,
|
|||
|
|
|||
|
CC_WAKEUP = 0x084A,
|
|||
|
CC_WAKEUP_REPLY = 0x884A,
|
|||
|
|
|||
|
CC_REMOTEDIE = 0x0849,
|
|||
|
CC_REMOTEDIE_REPLY = 0x8849,
|
|||
|
|
|||
|
CC_RADIOCHECK = 0x0833,
|
|||
|
CC_RADIOCHECK_REPLY = 0x8833,
|
|||
|
|
|||
|
CC_REMOTEMONITOR = 0x0834,
|
|||
|
CC_REMOTEMONITOR_REPLY = 0x8834,
|
|||
|
|
|||
|
CC_CALLALERT = 0x0835,
|
|||
|
CC_CALLALERT_REPLY = 0x8835,
|
|||
|
|
|||
|
CC_CANCELALERT = 0x0836,
|
|||
|
CC_CANCELALERT_REPLY = 0x8836,
|
|||
|
|
|||
|
CC_CANCELEMG = 0x0837,
|
|||
|
CC_CANCELEMG_REPLY = 0x8837,
|
|||
|
|
|||
|
TELEM_REMOTECONTROL_ANSWER = 0xB081,
|
|||
|
TELEM_STANDARD_STATUS_REPORT = 0xA081,
|
|||
|
TELEM_QUERY = 0x0010
|
|||
|
}
|
|||
|
|
|||
|
/* Target of CC_BTNKEY_TRG */
|
|||
|
public enum CC_BTNKEY_TRG
|
|||
|
{
|
|||
|
BK_TRG_PTT = 0x03,
|
|||
|
BK_TRG_CHUP = 0x22,
|
|||
|
BK_TRG_CHDOWN = 0x23,
|
|||
|
BK_TRG_EXPTT = 0x1E
|
|||
|
}
|
|||
|
|
|||
|
/* Operation of CC_BTNKEY_OPT */
|
|||
|
public enum CC_BTNKEY_OPT
|
|||
|
{
|
|||
|
BK_OPT_RELEASE = 0x00,
|
|||
|
BK_OPT_PRESS = 0x01,
|
|||
|
BK_OPT_SHORT = 0x02,
|
|||
|
BK_OPT_LONG = 0x03
|
|||
|
}
|
|||
|
|
|||
|
/* Call Type of CC_CALL_OPT */
|
|||
|
public enum CC_CALL_OPT:byte
|
|||
|
{
|
|||
|
CALL_TYPE_PRV = 0x00, // Private Call
|
|||
|
CALL_TYPE_GRP = 0x01, // Group Call
|
|||
|
CALL_TYPE_ALL = 0x02 // All Call
|
|||
|
}
|
|||
|
|
|||
|
/* Operation Type of CC_ZONECH_OPT */
|
|||
|
public enum CC_ZONECH_OPT
|
|||
|
{
|
|||
|
ZONECH_OPT_SET = 0x00, // Set
|
|||
|
ZONECH_OPT_READ = 0x01 // Read
|
|||
|
}
|
|||
|
|
|||
|
/* TX Process and Source */
|
|||
|
public enum TXSTATUS
|
|||
|
{
|
|||
|
TXSTATUS_PROC_NONE = 0x00, // Invalid
|
|||
|
TXSTATUS_PROC_VOICE = 0x01, // Voice TX
|
|||
|
TXSTATUS_PROC_HANGTIME = 0x02, // Hang Time
|
|||
|
TXSTATUS_PROC_CALLEND = 0x03, // Invalid
|
|||
|
TXSTATUS_PROC_CALLFAIL = 0x04, // Invalid
|
|||
|
|
|||
|
TXSTATUS_SRC_NONE = 0x00, // Invalid
|
|||
|
TXSTATUS_SRC_CHBUSY = 0x01, // Channel Busy
|
|||
|
TXSTATUS_SRC_RXONLY = 0x02, // RX Only
|
|||
|
TXSTATUS_SRC_LOWBATT = 0x03, // Low Battery
|
|||
|
TXSTATUS_SRC_UNLOCK = 0x04, // Unlock
|
|||
|
TXSTATUS_SRC_PRVCALLNOACK = 0x05, // Private Call NO ACK
|
|||
|
TXSTATUS_SRC_REPWKFAIL = 0x06 // Repeater Wakeup Fail
|
|||
|
}
|
|||
|
|
|||
|
/* RX Process , CallType */
|
|||
|
public enum RXSTATUS
|
|||
|
{
|
|||
|
RXSTATUS_PROC_NONE = 0x00, // Invalid
|
|||
|
RXSTATUS_PROC_VOICE = 0x01, // Voice RX
|
|||
|
RXSTATUS_PROC_HANGTIME = 0x02, // Hang Time
|
|||
|
RXSTATUS_PROC_CALLEND = 0x03, // Call End
|
|||
|
|
|||
|
RXSTATUS_CALLTYPE_PRV = 0x00, // Private Call
|
|||
|
RXSTATUS_CALLTYPE_GRP = 0x01, // Group Call
|
|||
|
RXSTATUS_CALLTYPE_ALL = 0x02, // All Call
|
|||
|
RXSTATUS_CALLTYPE_EMG = 0x03 // Emergency Group Call
|
|||
|
}
|
|||
|
|
|||
|
/* Radio Information */
|
|||
|
public enum RADIOINFO
|
|||
|
{
|
|||
|
RADIOINFO_TRG_MN = 0x00, // Model Number
|
|||
|
RADIOINFO_TRG_LPD = 0x01, // Last Programmed Date
|
|||
|
RADIOINFO_TRG_SN = 0x02, // Serial Number
|
|||
|
RADIOINFO_TRG_FR = 0x03, // Frequency Range
|
|||
|
RADIOINFO_TRG_RFV = 0x04, // Radio Firmware Version
|
|||
|
RADIOINFO_TRG_CHV = 0x05, // CPS Handle Version
|
|||
|
RADIOINFO_TRG_BLV = 0x06, // Bootloader Version
|
|||
|
RADIOINFO_TRG_RT = 0x07, // Radio Type
|
|||
|
|
|||
|
RADIOINFO_TRG_RCDBV = 0x09 // RCDB Version
|
|||
|
}
|
|||
|
|
|||
|
/* TELEM Query AND Request Result Codes */
|
|||
|
public enum TELEM_RESULT
|
|||
|
{
|
|||
|
TP_SUCCESS = 0x00,
|
|||
|
TP_FALSE = 0x01,
|
|||
|
TP_EFFECTIVE_VOLTAGE = 0x02,
|
|||
|
TP_NONEFFECTIVE_VOLTAGE = 0x03,
|
|||
|
TP_UNMAPPED = 0x04,
|
|||
|
TP_FUNCTION_DISABLE = 0x05,
|
|||
|
TP_MSG_TOO_LONG = 0x61,
|
|||
|
TP_CONFIG_INVALID = 0x62,
|
|||
|
TP_INITIALIZE_FAILURE = 0x81,
|
|||
|
TP_PAYLOAD_OVERLOAD = 0x82,
|
|||
|
}
|
|||
|
|
|||
|
/* TELEM Operations */
|
|||
|
public enum TELEM_OPERATIONS
|
|||
|
{
|
|||
|
TP_VALID_VOLTAGE = 0x01,
|
|||
|
TP_VOLTAGE_RESERVED = 0x02,
|
|||
|
TP_SINGLE_PULSE_OUTPUT = 0x03,
|
|||
|
TP_DISABLE_VIO_FCT = 0xF0,
|
|||
|
TP_ENABLE_VIO_FCT = 0xF1,
|
|||
|
}
|
|||
|
}
|