Menu

Payload

Thierry CHOMAUD

Payload

Declaration of protocol types that are used for Coronis implementation of Protocol implementation.

/**

 * Length used for buffering the payload information
 * over Coronis Protocol implementation
 * 2560 bytes for data storage + 4 for length
 */
#define PAYLOAD_BUFFER_LEN  2564

/**

 * Length used for buffering the radioAddress information
 * over Coronis Protocol implementation
 * 12 bytes + 1 byte for null terminated C string
 */
#define RADIOADDRESS_BUFFER_LEN  13

/**

 * Structure used to store payload information
 * for Coronis Protocol implementation usage.
 *      frame: data that contains the payload in byte[] format
 *      len: length of the data that contains in the payload value
 */
typedef struct tagIPayload {
    byte         frame[PAYLOAD_BUFFER_LEN - 4];
    unsigned int len;
} Payload;

/**

 * This interface describes radio address methods available to manipulate RadioAddress content.
 * Address is stored as hex string
 *      addressValue: data that contains the radio address value
 */
typedef struct tagIRadioAddress {
    char addressValue[RADIOADDRESS_BUFFER_LEN];
} RadioAddress;

Related

Wiki: C-CPP_Protocol_UserGuide

MongoDB Logo MongoDB