44 #ifndef PALM_EDC_0230_ETHERCAT_PROTOCOL_H_INCLUDED 45 #define PALM_EDC_0230_ETHERCAT_PROTOCOL_H_INCLUDED 47 #include "../0220_palm_edc/0220_palm_edc_ethercat_protocol.h" 82 int32u which_motor_data_arrived;
83 int32u which_motor_data_had_errors;
93 }
__attribute__((packed)) ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_STATUS;
95 #define STATUS_HEADER_START 0 96 #define STATUS_TACTILE_START (offsetof(ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_STATUS, tactile_data_type)) 97 #define STATUS_AUX_START (offsetof(ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_STATUS, aux_spi_data_type)) 98 #define STATUS_MOTOR_START (offsetof(ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_STATUS, motor_data_type)) 99 #define STATUS_IDLETIME_START (offsetof(ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_STATUS, idle_time_us)) 101 #define STATUS_TOTAL_LENGTH (sizeof(ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_STATUS)) 102 #define STATUS_JOINTS_LENGTH (STATUS_TACTILE_START - STATUS_HEADER_START) 103 #define STATUS_TACTILE_LENGTH (STATUS_AUX_START - STATUS_TACTILE_START) 104 #define STATUS_AUX_LENGTH (STATUS_MOTOR_START - STATUS_AUX_START) 105 #define STATUS_MOTOR_LENGTH (STATUS_IDLETIME_START - STATUS_MOTOR_START) 106 #define STATUS_IDLETIME_LENGTH (STATUS_TOTAL_LENGTH - STATUS_IDLETIME_START) 127 }
__attribute__((packed)) ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_COMMAND;
130 #define PALM_0230_ETHERCAT_COMMAND_HEADER_SIZE ( sizeof(EDC_COMMAND) + \ 131 sizeof(FROM_MOTOR_DATA_TYPE) + \ 133 sizeof(TO_MOTOR_DATA_TYPE) + \ 136 #define PALM_0230_ETHERCAT_STATUS_DATA_SIZE sizeof(ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_STATUS) 137 #define PALM_0230_ETHERCAT_COMMAND_DATA_SIZE sizeof(ETHERCAT_DATA_STRUCTURE_0230_PALM_EDC_COMMAND) 144 #define ETHERCAT_STATUS_0230_AGREED_SIZE 416 145 #define ETHERCAT_COMMAND_0230_AGREED_SIZE 62 161 #define PALM_0230_ETHERCAT_COMMAND_DATA_ADDRESS 0x1000 162 #define PALM_0230_ETHERCAT_CAN_BRIDGE_DATA_COMMAND_ADDRESS (PALM_0230_ETHERCAT_COMMAND_DATA_ADDRESS + PALM_0230_ETHERCAT_COMMAND_DATA_SIZE) 164 #define PALM_0230_ETHERCAT_STATUS_DATA_ADDRESS (PALM_0230_ETHERCAT_CAN_BRIDGE_DATA_COMMAND_ADDRESS + ETHERCAT_CAN_BRIDGE_DATA_SIZE) 165 #define PALM_0230_ETHERCAT_CAN_BRIDGE_DATA_STATUS_ADDRESS (PALM_0230_ETHERCAT_STATUS_DATA_ADDRESS + PALM_0230_ETHERCAT_STATUS_DATA_SIZE)
AUX_SPI_SENSOR aux_spi_sensor
int32u aux_spi_data_type
4 bytes
This needs to be a #define for symmetry with SENSORS_NUM.
int32u aux_data_type
Request for specific aux data.
EDC_COMMAND
The host can request different types of data from the palm.