21
21
*
22
22
* http://www.FreeRTOS.org
23
23
* http://aws.amazon.com/freertos
24
+ *
24
25
*/
25
26
26
27
/*
@@ -172,7 +173,7 @@ static void prvMQTTDemoTask( void * pvParameters );
172
173
* Timeout value will exponentially increase until maximum
173
174
* timeout value is reached or the number of attempts are exhausted.
174
175
*
175
- * @param pxNetworkContext The output parameter to return the created network context.
176
+ * @param[out] pxNetworkContext The parameter to return the created network context.
176
177
*
177
178
* @return The status of the final connection attempt.
178
179
*/
@@ -181,8 +182,8 @@ static PlaintextTransportStatus_t prvConnectToServerWithBackoffRetries( NetworkC
181
182
/**
182
183
* @brief Sends an MQTT Connect packet over the already connected TCP socket.
183
184
*
184
- * @param pxMQTTContext MQTT context pointer.
185
- * @param pxNetworkContext Network context.
185
+ * @param[in, out] pxMQTTContext MQTT context pointer.
186
+ * @param[in] pxNetworkContext Network context.
186
187
*
187
188
*/
188
189
static void prvCreateMQTTConnectionWithBroker ( MQTTContext_t * pxMQTTContext ,
@@ -193,7 +194,7 @@ static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
193
194
* information from Subscribe ACK. Called by the event callback after processing
194
195
* an incoming SUBACK packet.
195
196
*
196
- * @param Server response to the subscription request.
197
+ * @param[in] Server response to the subscription request.
197
198
*/
198
199
static void prvUpdateSubAckStatus ( MQTTPacketInfo_t * pxPacketInfo );
199
200
@@ -202,22 +203,22 @@ static void prvUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo );
202
203
* this file. In the case of a Subscribe ACK failure, then subscription is
203
204
* retried using an exponential backoff strategy with jitter.
204
205
*
205
- * @param pxMQTTContext MQTT context pointer.
206
+ * @param[in] pxMQTTContext MQTT context pointer.
206
207
*/
207
208
static void prvMQTTSubscribeWithBackoffRetries ( MQTTContext_t * pxMQTTContext );
208
209
209
210
/**
210
211
* @brief Publishes a message mqttexampleMESSAGE on mqttexampleTOPIC topic.
211
212
*
212
- * @param pxMQTTContext MQTT context pointer.
213
+ * @param[in] pxMQTTContext MQTT context pointer.
213
214
*/
214
215
static void prvMQTTPublishToTopic ( MQTTContext_t * pxMQTTContext );
215
216
216
217
/**
217
218
* @brief Unsubscribes from the previously subscribed topic as specified
218
219
* in mqttexampleTOPIC.
219
220
*
220
- * @param pxMQTTContext MQTT context pointer.
221
+ * @param[in] pxMQTTContext MQTT context pointer.
221
222
*/
222
223
static void prvMQTTUnsubscribeFromTopic ( MQTTContext_t * pxMQTTContext );
223
224
@@ -230,19 +231,19 @@ static uint32_t prvGetTimeMs( void );
230
231
231
232
/**
232
233
* @brief Process a response or ack to an MQTT request (PING, SUBSCRIBE
233
- * or UNSUBSCRIBE). This function processes PINGRESP, SUBACK, UNSUBACK
234
+ * or UNSUBSCRIBE). This function processes PINGRESP, SUBACK, and UNSUBACK.
234
235
*
235
- * @param pxIncomingPacket is a pointer to structure containing deserialized
236
+ * @param[in] pxIncomingPacket is a pointer to structure containing deserialized
236
237
* MQTT response.
237
- * @param usPacketId is the packet identifier from the ack received.
238
+ * @param[in] usPacketId is the packet identifier from the ack received.
238
239
*/
239
240
static void prvMQTTProcessResponse ( MQTTPacketInfo_t * pxIncomingPacket ,
240
241
uint16_t usPacketId );
241
242
242
243
/**
243
244
* @brief Process incoming Publish message.
244
245
*
245
- * @param pxPublishInfo is a pointer to structure containing deserialized
246
+ * @param[in] pxPublishInfo is a pointer to structure containing deserialized
246
247
* Publish message.
247
248
*/
248
249
static void prvMQTTProcessIncomingPublish ( MQTTPublishInfo_t * pxPublishInfo );
@@ -251,9 +252,9 @@ static void prvMQTTProcessIncomingPublish( MQTTPublishInfo_t * pxPublishInfo );
251
252
* @brief The application callback function for getting the incoming publish
252
253
* and incoming acks reported from the MQTT library.
253
254
*
254
- * @param pxMQTTContext MQTT context pointer.
255
- * @param pxPacketInfo Packet Info pointer for the incoming packet.
256
- * @param pxDeserializedInfo Deserialized information from the incoming packet.
255
+ * @param[in] pxMQTTContext MQTT context pointer.
256
+ * @param[in] pxPacketInfo Packet Info pointer for the incoming packet.
257
+ * @param[in] pxDeserializedInfo Deserialized information from the incoming packet.
257
258
*/
258
259
static void prvEventCallback ( MQTTContext_t * pxMQTTContext ,
259
260
MQTTPacketInfo_t * pxPacketInfo ,
@@ -367,7 +368,7 @@ static void prvMQTTDemoTask( void * pvParameters )
367
368
368
369
/**************************** Subscribe. ******************************/
369
370
370
- /* If server rejected the subscription request, attempt to resubscribe to
371
+ /* If server rejected the subscription request, attempt to resubscribe to
371
372
* the topic. Attempts are made according to the exponential backoff retry
372
373
* strategy declared in retry_utils.h. */
373
374
prvMQTTSubscribeWithBackoffRetries ( & xMQTTContext );
@@ -383,7 +384,7 @@ static void prvMQTTDemoTask( void * pvParameters )
383
384
* to the same topic, the broker will send the same publish message
384
385
* back to the application. */
385
386
LogInfo ( ( "Attempt to receive publish message from broker." ) );
386
- xMQTTStatus = MQTT_ProcessLoop ( & xMQTTContext ,
387
+ xMQTTStatus = MQTT_ProcessLoop ( & xMQTTContext ,
387
388
mqttexamplePROCESS_LOOP_TIMEOUT_MS );
388
389
configASSERT ( xMQTTStatus == MQTTSuccess );
389
390
@@ -397,7 +398,7 @@ static void prvMQTTDemoTask( void * pvParameters )
397
398
prvMQTTUnsubscribeFromTopic ( & xMQTTContext );
398
399
399
400
/* Process the incoming packet from the broker. */
400
- xMQTTStatus = MQTT_ProcessLoop ( & xMQTTContext ,
401
+ xMQTTStatus = MQTT_ProcessLoop ( & xMQTTContext ,
401
402
mqttexamplePROCESS_LOOP_TIMEOUT_MS );
402
403
configASSERT ( xMQTTStatus == MQTTSuccess );
403
404
@@ -406,7 +407,7 @@ static void prvMQTTDemoTask( void * pvParameters )
406
407
/* Send an MQTT Disconnect packet over the connected TCP socket.
407
408
* There is no corresponding response for a disconnect packet. After
408
409
* sending the disconnect, the client must close the network connection. */
409
- LogInfo ( ( "Disconnecting the MQTT connection with %s." ,
410
+ LogInfo ( ( "Disconnecting the MQTT connection with %s." ,
410
411
democonfigMQTT_BROKER_ENDPOINT ) );
411
412
xMQTTStatus = MQTT_Disconnect ( & xMQTTContext );
412
413
configASSERT ( xMQTTStatus == MQTTSuccess );
0 commit comments