// Auto-generated template file: command_ECHO4.tpl.c // Generation timestamp: 2021-06-21 19:42:34.864200 #include "../typedefs.h" #include "../communication.h" #include "../hardware.h" err_t command_ECHO4(void) { // Command: ECHO4 // Description: Echo (4 bytes) // // Request code: CMDCODE_ECHO4_REQ // Response code: CMDCODE_ECHO4_REQ // Request payload (length in bytes is 4): // field #0 (1 byte) [type: uint8_t ] : VALUE_0 (Echoed byte) // field #1 (1 byte) [type: uint8_t ] : VALUE_1 (Echoed byte) // field #2 (1 byte) [type: uint8_t ] : VALUE_2 (Echoed byte) // field #3 (1 byte) [type: uint8_t ] : VALUE_3 (Echoed byte) // Response payload (length in bytes is 4): // field #0 (1 byte) [type: uint8_t ] : VALUE_0 (Echoed byte) // field #1 (1 byte) [type: uint8_t ] : VALUE_1 (Echoed byte) // field #2 (1 byte) [type: uint8_t ] : VALUE_2 (Echoed byte) // field #3 (1 byte) [type: uint8_t ] : VALUE_3 (Echoed byte) // Auto-generated section: request payload fields reading uint8_t req_value_0 = (uint8_t)communication_request_payload_retrieve_uint8_t(); uint8_t req_value_1 = (uint8_t)communication_request_payload_retrieve_uint8_t(); uint8_t req_value_2 = (uint8_t)communication_request_payload_retrieve_uint8_t(); uint8_t req_value_3 = (uint8_t)communication_request_payload_retrieve_uint8_t(); // End of auto-generated section // USER CODE HERE // TODO implement command callback function command_ECHO4 // TODO: assign response field VALUE_0 in command ECHO4 callback uint8_t resp_value_0 = -1; // TODO: assign response field VALUE_1 in command ECHO4 callback uint8_t resp_value_1 = -1; // TODO: assign response field VALUE_2 in command ECHO4 callback uint8_t resp_value_2 = -1; // TODO: assign response field VALUE_3 in command ECHO4 callback uint8_t resp_value_3 = -1; // Auto-generated section: response payload fields writing communication_response_payload_appender_reset(); communication_response_payload_append_uint8_t((uint8_t)resp_value_0); communication_response_payload_append_uint8_t((uint8_t)resp_value_1); communication_response_payload_append_uint8_t((uint8_t)resp_value_2); communication_response_payload_append_uint8_t((uint8_t)resp_value_3); return NOERR; // End of auto-generated section }