MQTTc_MsgSetParam

Set parameter related to a given MQTT Message.

Files

mqtt-c.h/mqtt-c.c

Prototype

void  MQTTc_MsgSetParam (MQTTc_MSG         *p_msg,
                         MQTTc_PARAM_TYPE   type,
                         void              *p_param,
                         MQTTc_ERR         *p_err);

Arguments

p_msg

Pointer to message object.

type

Parameter type:

MQTTc_PARAM_TYPE_MSG_BUF_PTR        Msg's buf ptr.

MQTTc_PARAM_TYPE_MSG_BUF_LEN        Msg's buf len.

p_param

Parameter's value.

p_err

Pointer to variable that will receive the return error code from this function:

MQTTc_ERR_NONE

MQTTc_ERR_NULL_PTR

MQTTc_ERR_INVALID_ARG

Returned Values

None.

Required Configuration

None.

Notes / Warnings

  • This function MUST be called after the µC/MQTT-client suite initialization has been completed.