@@ -48,137 +48,137 @@ lwmqtt_err_t lwmqtt_detect_packet_type(uint8_t *buf, size_t buf_len, lwmqtt_pack
4848lwmqtt_err_t lwmqtt_detect_remaining_length (uint8_t * buf , size_t buf_len , uint32_t * rem_len );
4949
5050/**
51- * Encodes a connect packet into the supplied buffer.
52- *
53- * @param buf - The buffer into which the packet will be encoded.
54- * @param buf_len - The length of the specified buffer.
55- * @param len - The encoded length of the packet.
56- * @param options - The options to be used to build the connect packet.
57- * @param will - The last will and testament.
58- * @return An error value.
59- */
51+ * Encodes a connect packet into the supplied buffer.
52+ *
53+ * @param buf - The buffer into which the packet will be encoded.
54+ * @param buf_len - The length of the specified buffer.
55+ * @param len - The encoded length of the packet.
56+ * @param options - The options to be used to build the connect packet.
57+ * @param will - The last will and testament.
58+ * @return An error value.
59+ */
6060lwmqtt_err_t lwmqtt_encode_connect (uint8_t * buf , size_t buf_len , size_t * len , lwmqtt_options_t options ,
6161 lwmqtt_will_t * will );
6262
6363/**
64- * Decodes a connack packet from the supplied buffer.
65- *
66- * @param buf - The raw buffer data.
67- * @param buf_len - The length of the specified buffer.
68- * @param session_present - The session present flag.
69- * @param return_code - The return code.
70- * @return An error value.
71- */
64+ * Decodes a connack packet from the supplied buffer.
65+ *
66+ * @param buf - The raw buffer data.
67+ * @param buf_len - The length of the specified buffer.
68+ * @param session_present - The session present flag.
69+ * @param return_code - The return code.
70+ * @return An error value.
71+ */
7272lwmqtt_err_t lwmqtt_decode_connack (uint8_t * buf , size_t buf_len , bool * session_present ,
7373 lwmqtt_return_code_t * return_code );
7474
7575/**
76- * Encodes a zero (disconnect, pingreq) packet into the supplied buffer.
77- *
78- * @param buf - The buffer into which the packet will be encoded.
79- * @param buf_len - The length of the specified buffer.
80- * @param len - The encoded length of the packet.
81- * @param packet_type - The packets type.
82- * @return An error value.
83- */
76+ * Encodes a zero (disconnect, pingreq) packet into the supplied buffer.
77+ *
78+ * @param buf - The buffer into which the packet will be encoded.
79+ * @param buf_len - The length of the specified buffer.
80+ * @param len - The encoded length of the packet.
81+ * @param packet_type - The packets type.
82+ * @return An error value.
83+ */
8484lwmqtt_err_t lwmqtt_encode_zero (uint8_t * buf , size_t buf_len , size_t * len , lwmqtt_packet_type_t packet_type );
8585
8686/**
87- * Decodes an ack (puback, pubrec, pubrel, pubcomp, unsuback) packet from the supplied buffer.
88- *
89- * @param buf - The raw buffer data.
90- * @param buf_len - The length of the specified buffer.
91- * @param packet_type - The packet type.
92- * @param dup - The dup flag.
93- * @param packet_id - The packet id.
94- * @return An error value.
95- */
87+ * Decodes an ack (puback, pubrec, pubrel, pubcomp, unsuback) packet from the supplied buffer.
88+ *
89+ * @param buf - The raw buffer data.
90+ * @param buf_len - The length of the specified buffer.
91+ * @param packet_type - The packet type.
92+ * @param dup - The dup flag.
93+ * @param packet_id - The packet id.
94+ * @return An error value.
95+ */
9696lwmqtt_err_t lwmqtt_decode_ack (uint8_t * buf , size_t buf_len , lwmqtt_packet_type_t packet_type , bool * dup ,
9797 uint16_t * packet_id );
9898
9999/**
100- * Encodes an ack (puback, pubrec, pubrel, pubcomp) packet into the supplied buffer.
101- *
102- * @param buf - The buffer into which the packet will be encoded.
103- * @param buf_len - The length of the specified buffer.
104- * @param len - The encoded length of the packet.
105- * @param packet_type - The packets type.
106- * @param dup - The dup flag.
107- * @param packet_id - The packet id.
108- * @return An error value.
109- */
100+ * Encodes an ack (puback, pubrec, pubrel, pubcomp) packet into the supplied buffer.
101+ *
102+ * @param buf - The buffer into which the packet will be encoded.
103+ * @param buf_len - The length of the specified buffer.
104+ * @param len - The encoded length of the packet.
105+ * @param packet_type - The packets type.
106+ * @param dup - The dup flag.
107+ * @param packet_id - The packet id.
108+ * @return An error value.
109+ */
110110lwmqtt_err_t lwmqtt_encode_ack (uint8_t * buf , size_t buf_len , size_t * len , lwmqtt_packet_type_t packet_type , bool dup ,
111111 uint16_t packet_id );
112112
113113/**
114- * Decodes a publish packet from the supplied buffer.
115- *
116- * @param buf - The raw buffer data.
117- * @param buf_len - The length of the specified buffer.
118- * @param dup - The dup flag.
119- * @param packet_id - The packet id.
120- * @param topic - The topic.
121- * @parma msg - The message.
122- * @return An error value.
123- */
114+ * Decodes a publish packet from the supplied buffer.
115+ *
116+ * @param buf - The raw buffer data.
117+ * @param buf_len - The length of the specified buffer.
118+ * @param dup - The dup flag.
119+ * @param packet_id - The packet id.
120+ * @param topic - The topic.
121+ * @parma msg - The message.
122+ * @return An error value.
123+ */
124124lwmqtt_err_t lwmqtt_decode_publish (uint8_t * buf , size_t buf_len , bool * dup , uint16_t * packet_id , lwmqtt_string_t * topic ,
125125 lwmqtt_message_t * msg );
126126
127127/**
128- * Encodes a publish packet into the supplied buffer.
129- *
130- * @param buf - The buffer into which the packet will be encoded.
131- * @param buf_len - The length of the specified buffer.
132- * @param len - The encoded length of the packet.
133- * @param dup - The dup flag.
134- * @param packet_id - The packet id.
135- * @param topic - The topic.
136- * @param msg - The message.
137- * @return An error value.
138- */
128+ * Encodes a publish packet into the supplied buffer.
129+ *
130+ * @param buf - The buffer into which the packet will be encoded.
131+ * @param buf_len - The length of the specified buffer.
132+ * @param len - The encoded length of the packet.
133+ * @param dup - The dup flag.
134+ * @param packet_id - The packet id.
135+ * @param topic - The topic.
136+ * @param msg - The message.
137+ * @return An error value.
138+ */
139139lwmqtt_err_t lwmqtt_encode_publish (uint8_t * buf , size_t buf_len , size_t * len , bool dup , uint16_t packet_id ,
140140 lwmqtt_string_t topic , lwmqtt_message_t msg );
141141
142142/**
143- * Encodes a subscribe packet into the supplied buffer.
144- *
145- * @param buf - The buffer into which the packet will be encoded.
146- * @param buf_len - The length of the specified buffer.
147- * @param len - The encoded length of the packet.
148- * @param packet_id - The packet id.
149- * @param count - The number of members in the topic_filters and qos_levels array.
150- * @param topic_filters - The array of topic filter.
151- * @param qos_levels - The array of requested QoS levels.
152- * @return An error value.
153- */
143+ * Encodes a subscribe packet into the supplied buffer.
144+ *
145+ * @param buf - The buffer into which the packet will be encoded.
146+ * @param buf_len - The length of the specified buffer.
147+ * @param len - The encoded length of the packet.
148+ * @param packet_id - The packet id.
149+ * @param count - The number of members in the topic_filters and qos_levels array.
150+ * @param topic_filters - The array of topic filter.
151+ * @param qos_levels - The array of requested QoS levels.
152+ * @return An error value.
153+ */
154154lwmqtt_err_t lwmqtt_encode_subscribe (uint8_t * buf , size_t buf_len , size_t * len , uint16_t packet_id , int count ,
155155 lwmqtt_string_t * topic_filters , lwmqtt_qos_t * qos_levels );
156156
157157/**
158- * Decodes a suback packet from the supplied buffer.
159- *
160- * @param buf - The raw buffer data.
161- * @param buf_len - The length of the specified buffer.
162- * @param packet_id - The packet id.
163- * @param max_count - The maximum number of members allowed in the granted_qos_levels array.
164- * @param count - The number of members in the granted_qos_levels array.
165- * @param granted_qos_levels - The granted QoS levels.
166- * @return An error value.
167- */
158+ * Decodes a suback packet from the supplied buffer.
159+ *
160+ * @param buf - The raw buffer data.
161+ * @param buf_len - The length of the specified buffer.
162+ * @param packet_id - The packet id.
163+ * @param max_count - The maximum number of members allowed in the granted_qos_levels array.
164+ * @param count - The number of members in the granted_qos_levels array.
165+ * @param granted_qos_levels - The granted QoS levels.
166+ * @return An error value.
167+ */
168168lwmqtt_err_t lwmqtt_decode_suback (uint8_t * buf , size_t buf_len , uint16_t * packet_id , int max_count , int * count ,
169169 lwmqtt_qos_t * granted_qos_levels );
170170
171171/**
172- * Encodes the supplied unsubscribe data into the supplied buffer, ready for sending
173- *
174- * @param buf - The buffer into which the packet will be encoded.
175- * @param buf_len - The length of the specified buffer.
176- * @param len - The encoded length of the packet.
177- * @param packet_id - The packet id.
178- * @param count - The number of members in the topic_filters array.
179- * @param topic_filters - The array of topic filters.
180- * @return An error value.
181- */
172+ * Encodes the supplied unsubscribe data into the supplied buffer, ready for sending
173+ *
174+ * @param buf - The buffer into which the packet will be encoded.
175+ * @param buf_len - The length of the specified buffer.
176+ * @param len - The encoded length of the packet.
177+ * @param packet_id - The packet id.
178+ * @param count - The number of members in the topic_filters array.
179+ * @param topic_filters - The array of topic filters.
180+ * @return An error value.
181+ */
182182lwmqtt_err_t lwmqtt_encode_unsubscribe (uint8_t * buf , size_t buf_len , size_t * len , uint16_t packet_id , int count ,
183183 lwmqtt_string_t * topic_filters );
184184
0 commit comments