Skip to content
Snippets Groups Projects
command_VALCHECK.tpl.c 2.37 KiB
// Auto-generated template file: command_VALCHECK.tpl.c
// Generation timestamp: 2021-05-28 16:22:48.444169


#include "../typedefs.h"  
#include "../communication.h"  
#include "../hardware.h"

err_t command_VALCHECK(void) {
    // Command: VALCHECK
    // Description: Return a some data to check endianness
    // 
    // Request code: CMDCODE_VALCHECK_REQ
    // Response code: CMDCODE_VALCHECK_REQ
    // Request payload (length in bytes is 0):
    // Response payload (length in bytes is 14):
    //     field #0   (4 bytes) [type: uint32_t  ] : VALUE_0    (Read as 128)
    //     field #1   (4 bytes) [type: uint32_t  ] : VALUE_1    (Read as 2**31 = 2147483648)
    //     field #2   (2 bytes) [type: uint16_t  ] : VALUE_2    (Read as 128)
    //     field #3   (2 bytes) [type: uint16_t  ] : VALUE_3    (Read as 2**15 = 32768)
    //     field #4   (1 byte) [type: uint8_t   ] : VALUE_4    (Read as 4)
    //     field #5   (1 byte) [type: uint8_t   ] : VALUE_5    (Read as 64)

    // Auto-generated section: request payload fields reading
    // End of auto-generated section

    // USER CODE HERE
    // TODO implement command callback function command_VALCHECK

    // TODO: assign response field VALUE_0 in command VALCHECK callback
    uint32_t resp_value_0 = -1;

    // TODO: assign response field VALUE_1 in command VALCHECK callback
    uint32_t resp_value_1 = -1;

    // TODO: assign response field VALUE_2 in command VALCHECK callback
    uint16_t resp_value_2 = -1;

    // TODO: assign response field VALUE_3 in command VALCHECK callback
    uint16_t resp_value_3 = -1;

    // TODO: assign response field VALUE_4 in command VALCHECK callback
    uint8_t resp_value_4 = -1;

    // TODO: assign response field VALUE_5 in command VALCHECK callback
    uint8_t resp_value_5 = -1;

    // Auto-generated section: response payload fields writing
    communication_response_payload_appender_reset();
    communication_response_payload_append_uint32_t((uint32_t)resp_value_0);
    communication_response_payload_append_uint32_t((uint32_t)resp_value_1);
    communication_response_payload_append_uint16_t((uint16_t)resp_value_2);
    communication_response_payload_append_uint16_t((uint16_t)resp_value_3);
    communication_response_payload_append_uint8_t((uint8_t)resp_value_4);
    communication_response_payload_append_uint8_t((uint8_t)resp_value_5);
    return NOERR;
    // End of auto-generated section
}