Skip to content

Commit b51c77b

Browse files
authored
Update doxygen (#1024)
1 parent d557cb3 commit b51c77b

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

core/MyGatewayTransport.h

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,45 @@
2424
* @ingroup internals
2525
* @{
2626
*
27-
*
2827
* Gateway transport-related log messages, format: [!]SYSTEM:[SUB SYSTEM:]MESSAGE
29-
* -[!] Exclamation mark is prepended in case of error
30-
* -SYSTEM:
31-
* -<b>GWT</b>: messages emitted by MyGatewayTransport
32-
* -SUB SYSTEMS:
33-
* -GWT:<b>TIN</b> from @ref gatewayTransportInit()
34-
* -GWT:<b>TPS</b> from @ref gatewayTransportSend()
35-
* -GWT:<b>RFC</b> from _readFromClient()
36-
* -GWT:<b>TSA</b> from @ref gatewayTransportAvailable()
37-
* -GWT:<b>TRC</b> from @ref gatewayTransportReceive()
28+
* - [!] Exclamation mark is prepended in case of error
29+
* - SYSTEM:
30+
* - <b>GWT</b>: messages emitted by MyGatewayTransport
31+
* - SUB SYSTEMS:
32+
* - GWT:<b>TIN</b> from @ref gatewayTransportInit()
33+
* - GWT:<b>TPS</b> from @ref gatewayTransportSend()
34+
* - GWT:<b>IMQ</b> from incomingMQTT()
35+
* - GWT:<b>RMQ</b> from reconnectMQTT()
36+
* - GWT:<b>TPC</b> from gatewayTransportConnect()
37+
* - GWT:<b>RFC</b> from _readFromClient()
38+
* - GWT:<b>TSA</b> from @ref gatewayTransportAvailable()
39+
* - GWT:<b>TRC</b> from @ref gatewayTransportReceive()
3840
*
3941
* Gateway transport debug log messages :
4042
*
4143
* |E| SYS | SUB | Message | Comment
4244
* |-|-----|-------|---------------------------|---------------------------------------------------------------------
4345
* | | GWT | TIN | CONNECTING... | Connecting to router
44-
* | | GWT | TIN | IP=%s | IP address obtained
46+
* | | GWT | TIN | IP=%%s | IP address [%%s] obtained
4547
* |!| GWT | TIN | DHCP FAIL | DHCP request failed
4648
* | | GWT | TIN | ETH OK | Connected to network
4749
* |!| GWT | TIN | ETH FAIL | Connection failed
50+
* | | GWT | TPS | TOPIC=%%s,MSG SENT | MQTT message sent on topic [%%s]
4851
* | | GWT | TPS | ETH OK | Connected to network
4952
* |!| GWT | TPS | ETH FAIL | Connection failed
50-
* | | GWT | RFC | C%d,MSG=%s | Received message [%s] from client [%d]
51-
* |!| GWT | RFC | C%d,MSG TOO LONG | Received message from client [%d] too long
52-
* | | GWT | TSA | UDP MSG=%s | Received UDP message [%s]
53+
* | | GWT | IMQ | TOPIC=%%s,MSG RECEIVE | MQTT message received on topic [%%s]
54+
* | | GWT | RMQ | MQTT RECONNECT | Reconnecting to MQTT broker
55+
* | | GWT | RMQ | MQTT CONNECTED | Connected to MQTT broker
56+
* | | GWT | TPC | CONNECTING... | Connecting to MQTT broker
57+
* | | GWT | TPC | IP=%%s | IP address [%%s] obtained
58+
* |!| GWT | TPC | DHCP FAIL | DHCP request failed
59+
* | | GWT | RFC | C=%%d,MSG=%%s | Received message [%%s] from client [%%d]
60+
* |!| GWT | RFC | C=%%d,MSG TOO LONG | Received message from client [%%d] too long
61+
* | | GWT | TSA | UDP MSG=%%s | Received UDP message [%%s]
5362
* | | GWT | TSA | ETH OK | Connected to network
5463
* |!| GWT | TSA | ETH FAIL | Connection failed
55-
* | | GWT | TSA | C%d,DISCONNECTED | Client [%d] disconnected
56-
* | | GWT | TSA | C%d,CONNECTED | Client [%d] connected
64+
* | | GWT | TSA | C=%d,DISCONNECTED | Client [%%d] disconnected
65+
* | | GWT | TSA | C=%d,CONNECTED | Client [%%d] connected
5766
* |!| GWT | TSA | NO FREE SLOT | No free slot for client
5867
* |!| GWT | TRC | IP RENEW FAIL | IP renewal failed
5968
*

core/MyGatewayTransportEthernet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ bool _readFromClient(uint8_t i)
263263
if (inChar == '\n' || inChar == '\r') {
264264
// Add string terminator and prepare for the next message
265265
inputString[i].string[inputString[i].idx] = 0;
266-
GATEWAY_DEBUG(PSTR("GWT:RFC:C%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
266+
GATEWAY_DEBUG(PSTR("GWT:RFC:C=%" PRIu8 ",MSG=%s\n"), i, inputString[i].string);
267267
inputString[i].idx = 0;
268268
if (protocolParse(_ethernetMsg, inputString[i].string)) {
269269
return true;
@@ -275,7 +275,7 @@ bool _readFromClient(uint8_t i)
275275
}
276276
} else {
277277
// Incoming message too long. Throw away
278-
GATEWAY_DEBUG(PSTR("!GWT:RFC:C%" PRIu8 ",MSG TOO LONG\n"), i);
278+
GATEWAY_DEBUG(PSTR("!GWT:RFC:C=%" PRIu8 ",MSG TOO LONG\n"), i);
279279
inputString[i].idx = 0;
280280
// Finished with this client's message. Next loop() we'll see if there's more to read.
281281
break;
@@ -373,14 +373,14 @@ bool gatewayTransportAvailable(void)
373373
for (uint8_t i = 0; i < ARRAY_SIZE(clients); i++) {
374374
if (!clients[i].connected()) {
375375
if (clientsConnected[i]) {
376-
GATEWAY_DEBUG(PSTR("GWT:TSA:C%" PRIu8 ",DISCONNECTED\n"), i);
376+
GATEWAY_DEBUG(PSTR("GWT:TSA:C=%" PRIu8 ",DISCONNECTED\n"), i);
377377
clients[i].stop();
378378
}
379379
//check if there are any new clients
380380
if (_ethernetServer.hasClient()) {
381381
clients[i] = _ethernetServer.available();
382382
inputString[i].idx = 0;
383-
GATEWAY_DEBUG(PSTR("GWT:TSA:C%" PRIu8 ",CONNECTED\n"), i);
383+
GATEWAY_DEBUG(PSTR("GWT:TSA:C=%" PRIu8 ",CONNECTED\n"), i);
384384
gatewayTransportSend(buildGw(_msgTmp, I_GATEWAY_READY).set(MSG_GW_STARTUP_COMPLETE));
385385
// Send presentation of locally attached sensors (and node if applicable)
386386
presentNode();

core/MyGatewayTransportMQTTClient.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ bool gatewayTransportSend(MyMessage &message)
6363
}
6464
setIndication(INDICATION_GW_TX);
6565
char *topic = protocolFormatMQTTTopic(MY_MQTT_PUBLISH_TOPIC_PREFIX, message);
66-
GATEWAY_DEBUG(PSTR("GWT:TPS:Sending message on topic: %s\n"), topic);
66+
GATEWAY_DEBUG(PSTR("GWT:TPS:TOPIC=%s,MSG SENT\n"), topic);
6767
#if defined(MY_MQTT_CLIENT_PUBLISH_RETAIN)
6868
bool retain = mGetCommand(message) == C_SET ||
6969
(mGetCommand(message) == C_INTERNAL && message.type == I_BATTERY_LEVEL);
@@ -75,20 +75,20 @@ bool gatewayTransportSend(MyMessage &message)
7575

7676
void incomingMQTT(char* topic, uint8_t* payload, unsigned int length)
7777
{
78-
GATEWAY_DEBUG(PSTR("GWT:TPS:Message arrived on topic: %s\n"), topic);
78+
GATEWAY_DEBUG(PSTR("GWT:IMQ:TOPIC=%s, MSG RECEIVED\n"), topic);
7979
_MQTT_available = protocolMQTTParse(_MQTT_msg, topic, payload, length);
8080
}
8181

8282
bool reconnectMQTT(void)
8383
{
84-
GATEWAY_DEBUG(PSTR("GWT:TPS:Attempting MQTT connection...\n"));
84+
GATEWAY_DEBUG(PSTR("GWT:RMQ:MQTT RECONNECT\n"));
8585
// Attempt to connect
8686
if (_MQTT_client.connect(MY_MQTT_CLIENT_ID
8787
#if defined(MY_MQTT_USER) && defined(MY_MQTT_PASSWORD)
8888
, MY_MQTT_USER, MY_MQTT_PASSWORD
8989
#endif
9090
)) {
91-
GATEWAY_DEBUG(PSTR("GWT:TPS:MQTT connected\n"));
91+
GATEWAY_DEBUG(PSTR("GWT:RMQ:MQTT CONNECTED\n"));
9292

9393
// Send presentation of locally attached sensors (and node if applicable)
9494
presentNode();

0 commit comments

Comments
 (0)