📄 props.h
字号:
// --- General serial port 2 config#define PROP_CFG_SERIAL2_PORT 0xEF51 // Description: [optional] // [Read-Only] General serial port 2 // Get Value: // 0:X - [ASCIIZ] string representing this serial port name // Notes: // - The read-only attribute of this property should be enforced by the client. // to prevent the server from accidentilly changing this value.#define PROP_CFG_SERIAL2_BPS 0xEF52 // Description: [optional] // [Read-Only] Communication speed (BPS) of the attached serial port 2 // Get Value: // 0:4 - [UInt32] speed of serial port in BPS. // Notes: // - The read-only attribute of this property should be enforced by the client. // to prevent the server from accidentilly changing this value.#define PROP_CFG_SERIAL2_DEBUG 0xEF5D // Description: [optional] // [Read-Only] For use when debugging serial port 2 // Get Value: // 0:1 - [utBool] Non-Zero if debugging this serial port // Notes: // - Used only when debugging this serial port.// --- General serial port 3 config#define PROP_CFG_SERIAL3_PORT 0xEF61 // Description: [optional] // [Read-Only] General serial port 3 // Get Value: // 0:X - [ASCIIZ] string representing this serial port name // Notes: // - The read-only attribute of this property should be enforced by the client. // to prevent the server from accidentilly changing this value.#define PROP_CFG_SERIAL3_BPS 0xEF62 // Description: [optional] // [Read-Only] Communication speed (BPS) of the attached serial port 3 // Get Value: // 0:4 - [UInt32] speed of serial port in BPS. // Notes: // - The read-only attribute of this property should be enforced by the client. // to prevent the server from accidentilly changing this value.#define PROP_CFG_SERIAL3_DEBUG 0xEF6D // Description: [optional] // [Read-Only] For use when debugging serial port 3 // Get Value: // 0:1 - [utBool] Non-Zero if debugging this serial port // Notes: // - Used only when debugging this serial port.// ----------------------------------------------------------------------------// Reserved Command properties (WO = write-only) [F000 through F04F]#define PROP_CMD_SAVE_PROPS 0xF000 // Description: // Command[WO]: Forced property 'save' // Set Value: // - none // Effect: // Save properties, if changed#define PROP_CMD_AUTHORIZE 0xF002 // Description: // Command[WO]: Set device authorization // Set Value: // 0:X - [ASCIIZ] user // X:X - [ASCIIZ] password [optional] // Special data length rules: // - User name requirements may be defined by the device. // - Password is optional (or as required by the device). // Effect: // Authenticate (per device requirements) and set PROP_STATE_USER_ID. // Notes: // - The device may choose to refuse communication until authorized.#define PROP_CMD_STATUS_EVENT 0xF011 // Description: // Command[WO]: Generate/Send status event // Set Value: // 0:2 - [UInt16] status code of event to generate // 2:1 - [UInt8] Index, as needed by client [optional] // Special data length rules: // - The server must always send a valid statuCode with this command. // - The index should be included if it is needed. If a needed index // is missing, it will be assumed that the value should be '0'. // Effect: // Generate the specified event. // Notes: // - Client may decide which status codes are supported in this command. // However, at least STATUS_LOCATION must be supported to allow querying // the device about it's current location.#define PROP_CMD_SET_OUTPUT 0xF031 // Description: [optional] // Command[WO]: Set output // Set Value: // 0:1 - [UInt8] Index of output // Valid range 0 to 15. // 1:1 - [UInt8] Output state // Valid values 0=off, 1=on (bit mask 0xFE is reserved) // 2:4 - [UInt32] Duration in milliseconds [optional] // Valid range 0 to 4294967295 millis (a '0' value means indefinite) // Client may impose a maximum value. // Special data length rules: // - The server must always send a valid index and the output state with this // command. The duration need not be sent if the value is '0'. // - The Command implementaion defines the behaviour if the supplied argument // length is not at least 2 bytes, or if the index is outside the acceptable // range. The mask 0x01 should be applied by the client to obtain the // specified output state. // Effect: // - Set specified output to the specified state for specified duration, then // set the opposite state to that specified. // - If the duration is zero, or omitted, then the duration is indefinite. // - The client should impose any limits deemed necessary for the type of output. // (ie. When sending a command to perform an action on the device, it is the // clients responsibility to insure that the output profile will not do damage to // the device, property, persons, etc.) // Notes: // - Support for this command on the client is optional (as in the case where // the client does not support digital outputs). If not supported by the // client it should return error 0xF311 (invalid/unsupported command).#define PROP_CMD_RESET 0xF0FF // Description: [optional] // Command[WO]: Reset/Reboot client // Set Value: // 0:1 - reset type (0=cold reset, 1=warm reset) // 1:X - client defined reset authorization // Effect: // - If allowed by the client, this specifies that the client is to perform // its power-on-reset routines. // - The client may return 'COMMAND_FEATURE_NOT_SUPPORTED' if cold-reset, // warm-reset, or both, are not supported. // - The client may choose to save state prior to performing the reset/reboot // operation. // Notes: // - Support for this command on the client is optional.// ----------------------------------------------------------------------------// Read-Only/State properties:#define PROP_STATE_PROTOCOL 0xF100 // Description: // [Read-Only] Protocol version // Get Value: // 0:1 - [UInt8] Major version id // Valid range 0 to 255 // 1:1 - [UInt8] Minor version id // Valid range 0 to 255 // 2:1 - [UInt8] Minor revision [optional] // Valid range 0 to 255 // Special data length rules: // - The client must always send at least the Major and Minor ids. // Notes: // - This value represents the version of the DMTP protocol that this client // has implemented. // - The read-only attribute of this property should be enforced by the client.#define PROP_STATE_FIRMWARE 0xF101 // Description: // [Read-Only] Firmware version // Get Value: // 0:X - [ASCIIZ] string representing the firmware version id // Notes: // - This value is defined by the client and represents the version of the firmware. // - The read-only attribute of this property should be enforced by the client.#define PROP_STATE_COPYRIGHT 0xF107 // Description: // [Read-Only] Copyright // Get Value: // 0:X - [ASCIIZ] string representing the copyright string // Notes: // - The read-only attribute of this property should be enforced by the client.#define PROP_STATE_SERIAL 0xF110 // Description: [optional] // [Read-Only] Serial number // Get Value: // 0:X - [ASCIIZ] string representing the serial number (may be same as device id) // Special data length rules: // - The maximum length of the serial number is 20 ASCII characters. // Notes: // - This value is defined by the client. If the client does not have a serial // number, then this value should be the same as the device-id. // - The terminating null ('0') need not be included in the payload // - The read-only attribute of this property should be enforced by the client.#define PROP_STATE_UNIQUE_ID 0xF112 // Description: // [Read-Only] Unique ID // Value: // 0:X - [UInt8] Unique code provided by the DMT service provider // Special data length rules: // - The client must send a 0-length field if the unique id has not been defined. // Notes: // - This unique id is provided by the DMT service provider and uniquely // identifies the device. The value should be at least 4 bytes in length, but // not more than 20 bytes. // - The read-only attribute of this property should be enforced by the client.#define PROP_STATE_ACCOUNT_ID 0xF114 // Description: // [Read-Only] Account ID // Value: // 0:X - [ASCIIZ] account ID recognized by the DMT service provider // Special data length rules: // - The length of the property payload should be at least the length of the // number of characters required to represent the account id. // - The minimum length of this id is defined by the DMT service provider. // - The maximum length of this id is 20 ASCII characters. // Notes: // - This account id is provided by the DMT service provider and uniquely // identifies the owner of the account. // - The terminating null ('0') need not be included in the payload // - The read-only attribute of this property should be enforced by the client.#define PROP_STATE_DEVICE_ID 0xF115 // Description: // [Read-Only] Device ID // Value: // 0:X - [ASCIIZ] device ID recognized by the DMT service provider // Special data length rules: // - The length of the property payload should be at least the length of the // number of characters required to represent the device id. // - The minimum length of this id is defined by the DMT service provider. // - The maximum length of this id is 20 ASCII characters. // Notes: // - This device id is provided by the account owner and is registered to the DMT // service provider. This device id uniquely identifies the device within the // account id. // - The terminating null ('0') need not be included in the payload // - The read-only attribute of this property should be enforced by the client.#if defined(SECONDARY_SERIAL_TRANSPORT)#define PROP_STATE_DEVICE_BT 0xF116 // Description: // [Read-Only] Device ID for secondary transport [optional] // Value: // 0:X - [ASCIIZ] device ID use for secondary transport media (ie. bluetooth) // Special data length rules: // - The length of the property payload should be at least the length of the // number of characters required to represent the device id. // - The minimum length of this id is defined by the DMT service provider. // - The maximum length of this id is 20 ASCII characters. // Notes: // - This device id is typically used as the Bluetooth broadcase name. // - The terminating null ('0') need not be included in the payload#endif#define PROP_STATE_USER_ID 0xF117 // Description: [optional] // [Optional Read-Only] User ID // Value: // 0:X - [ASCIIZ] user ID recognized by the DMT service provider // Special data length rules: // - The length of the property payload should be at least the length of the // number of characters required to represent the user id. // - The minimum length of this id is defined by the DMT service provider. // - The maximum length of this id is 20 ASCII characters. // Notes: // - This user id is provided by account owner and is registered to the DMT // service provider. This user id may be used as-needed by the device to send // as field information in an event. // - The terminating null ('0') need not be included in the payload
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -