Setups a parameter Set parameters related to the given HTTPc Connection ObjectTCP and MQTT Client Connection.
Files
httpmqtt-c.h/httpmqtt-c.c
Prototype
Code Block |
---|
void MQTTc_ConnSetParam (MQTTc_CONN *p_conn,
MQTTc_PARAM_TYPE type,
void *p_param,
MQTTc_ERR *p_err); |
Arguments
p_conn_obj
Pointer to the HTTPc Connection Object on which to setup parametercurrent MQTTc Connection.
type
Parameter type:
HTTPcMQTTc_PARAM_TYPE_BROKER_SERVER_PORT
HTTPcIP_ADDR Broker's IP addr.
MQTTc_PARAM_TYPE_PERSISTENT
HTTPcBROKER_NAME Broker's name.
MQTTc_PARAM_TYPE_CONNECT_TIMEOUT
HTTPcBROKER_PORT_NBR Broker's port nbr.
MQTTc_PARAM_TYPE_INACTIVITY_TIMEOUT
HTTPc_S Inactivity timeout, in seconds.
MQTTc_PARAM_TYPE_CLIENT_ID_STR Client ID str.
MQTTc_PARAM_TYPE_USERNAME_STR Client username str.
MQTTc_PARAM_TYPE_PASSWORD_STR Client password str.
MQTTc_PARAM_TYPE_SECUREKEEP_ALIVE_COMMON_NAME
HTTPcTMR_SEC Keep alive tmr, in seconds.
MQTTc_PARAM_TYPE_SECURE_TRUST_CALLBACK
HTTPc_WILL_CFG_PTR Will cfg ptr, if any.
MQTTc_PARAM_TYPE_CALLBACK_ON_COMPL Generic on cmpl callback.
MQTTc_PARAM_TYPE_CONNCALLBACK_ON_CONNECT_CMPL On connect cmpl callback.
MQTTc_PARAM_TYPE_CALLBACK
HTTPc_ON_PUBLISH_CMPL On publish cmpl callback.
MQTTc_PARAM_TYPE_CALLBACK_ON_SUBSCRIBE_CMPL On subscribe cmpl callback.
MQTTc_PARAM_TYPE_CALLBACK_ON_UNSUBSCRIBE_CMPL On unsubscribe cmpl callback.
MQTTc_PARAM_TYPE_CONN_CLOSE_CALLBACK
HTTPcCALLBACK_ON_PINGREQ_CMPL On pingreq cmpl callback.
MQTTc_PARAM_TYPE_CALLBACK_ON_DISCONNECT_CMPL On disconnect cmpl callback.
MQTTc_PARAM_TYPE_CALLBACK_CONNON_ERR_CALLBACK On err callback.
MQTTc_PARAM_TYPE_CALLBACK_ON_PUBLISH_RX On publish rx'd callback.
MQTTc_PARAM_TYPE_CALLBACK_ARG_PTR Ptr on arg passed to callback.
MQTTc_PARAM_TYPE_TIMEOUT_MS 'Open' timeout, in milliseconds.
MQTTc_PARAM_TYPE_PUBLISH_RX_MSG_PTR Ptr on msg that is used to rx publish.
p_param
Pointer to parameter to setupParameter's value.
p_err
Pointer to variable that will receive the return error code from this function:HTTPc
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/HTTPMQTT-client Suite Initialization has been completed.