21 #ifndef PT_API_VERSION 22 #define PT_API_VERSION 2 24 #if PT_API_VERSION != 2 25 #error "Including mixed versions of Protocol API" 28 #ifndef PT_DEVICE_OBJECT_H_ 29 #define PT_DEVICE_OBJECT_H_ 34 #define PT_DEVICE_OBJECT_ID 3 35 #define PT_MANUFACTURER_RESOURCE_ID 0 36 #define PT_MODEL_NUMBER_RESOURCE_ID 1 37 #define PT_SERIAL_NUMBER_RESOURCE_ID 2 38 #define PT_FIRMWARE_VERSION_RESOURCE_ID 3 39 #define PT_REBOOT_RESOURCE_ID 4 40 #define PT_FACTORY_RESET_RESOURCE_ID 5 42 #define PT_ERROR_CODE_RESOURCE_ID 11 43 #define PT_RESET_ERROR_CODE_RESOURCE_ID 12 45 #define PT_DEVICE_TYPE_RESOURCE_ID 17 46 #define PT_HARDWARE_VERSION_RESOURCE_ID 18 47 #define PT_SOFTWARE_VERSION_RESOURCE_ID 19 101 const char *device_id,
The device object data ID:3.
Definition: pt_device_object.h:79
pt_resource_callback reset_error_code_callback
Definition: pt_device_object.h:89
pt_resource_callback factory_reset_callback
Definition: pt_device_object.h:88
pt_status_t ptdo_initialize_device_object(connection_id_t connection_id, const char *device_id, const ptdo_device_object_data_t *device_object_data)
Create the device object ID:3.
pt_resource_callback reboot_callback
Definition: pt_device_object.h:87
Protocol translator external API V2.
const char * serial_number
Definition: pt_device_object.h:71
const char * device_type
Definition: pt_device_object.h:75
const char * software_version
Definition: pt_device_object.h:74
const char * model_number
Definition: pt_device_object.h:70
const char * manufacturer
Definition: pt_device_object.h:69
pt_status_t(* pt_resource_callback)(const connection_id_t connection_id, const char *device_id, const uint16_t object_id, const uint16_t object_instance_id, const uint16_t resource_id, const uint8_t operation, const uint8_t *value, const uint32_t size, void *userdata)
Callback function prototype for the device resource specific action on OPERATION_WRITE or OPERATION_E...
Definition: pt_api.h:182
const char * hardware_version
Definition: pt_device_object.h:73
const char * firmware_version
Definition: pt_device_object.h:72
struct ptdo_device_object_data ptdo_device_object_data_t
The device object data ID:3.