21 #ifndef PT_API_VERSION 22 #define PT_API_VERSION 1 24 #if PT_API_VERSION != 1 25 #error "Including mixed versions of Protocol API" 28 #ifndef PT_DEVICE_OBJECT_H_ 29 #define PT_DEVICE_OBJECT_H_ 32 #define DEPRECATED(func) func __attribute__((deprecated)) 34 #pragma message("WARNING: Implement DEPRECATED macro, it is missing.") 35 #define DEPRECATED(func) func 41 #define PT_DEVICE_OBJECT_ID 3 42 #define PT_MANUFACTURER_RESOURCE_ID 0 43 #define PT_MODEL_NUMBER_RESOURCE_ID 1 44 #define PT_SERIAL_NUMBER_RESOURCE_ID 2 45 #define PT_FIRMWARE_VERSION_RESOURCE_ID 3 46 #define PT_REBOOT_RESOURCE_ID 4 47 #define PT_FACTORY_RESET_RESOURCE_ID 5 49 #define PT_ERROR_CODE_RESOURCE_ID 11 50 #define PT_RESET_ERROR_CODE_RESOURCE_ID 12 52 #define PT_DEVICE_TYPE_RESOURCE_ID 17 53 #define PT_HARDWARE_VERSION_RESOURCE_ID 18 54 #define PT_SOFTWARE_VERSION_RESOURCE_ID 19 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
char * software_version
Definition: pt_device_object.h:85
char * device_type
Definition: pt_device_object.h:86
pt_resource_callback factory_reset_callback
Definition: pt_device_object.h:88
char * manufacturer
Definition: pt_device_object.h:80
char * firmware_version
Definition: pt_device_object.h:83
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
char * serial_number
Definition: pt_device_object.h:82
char * hardware_version
Definition: pt_device_object.h:84
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:178
DEPRECATED(pt_status_t ptdo_initialize_device_object(pt_device_t *device, ptdo_device_object_data_t *device_object_data))
Create the device object ID:3.
char * model_number
Definition: pt_device_object.h:81
struct ptdo_device_object_data ptdo_device_object_data_t
The device object data ID:3.
**Deprecated** Protocol translator client for API v1.