Update README

Add Tips for Debug
Delete unused define

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2019-07-19 11:41:44 +09:00
parent 93e297c6d3
commit 04bc61dbca
2 changed files with 18 additions and 12 deletions

View File

@@ -94,18 +94,15 @@ When **QoS-1** is **YES**, QoS-1 PUBLISH is available. All clients which send Qo
When **PredefinedTopic** is **YES**, **Pre-definedTopicId**s specified by **PredefinedTopicList** are effective. This file defines Pre-definedTopics of the clients. In this file, ClientID,TopicName and TopicID are declared in CSV format. When **PredefinedTopic** is **YES**, **Pre-definedTopicId**s specified by **PredefinedTopicList** are effective. This file defines Pre-definedTopics of the clients. In this file, ClientID,TopicName and TopicID are declared in CSV format.
When **Forwarder** is **YES**, Forwarder Encapsulation Message is available. Connectable Forwarders must be declared by a **ClientsList** file. When **Forwarder** is **YES**, Forwarder Encapsulation Message is available. Connectable Forwarders must be declared by a **ClientsList** file.
### ** How to monitor the gateway from remote. ** ### ** How to monitor the gateway from remote. **
Change gateway.conf as follows:
Uncomment line32 in MQTTSNGWDefined.h. ```
# LOG
`//#define RINGBUFFER // print out Packets log into shared memory./"` ShearedMemory=YES;
````
$ make
$ make install
$ make clean
```` ````
restart the gateway.
Restart the gateway with sudo only once to create shared memories.
open ssh terminal and execute LogMonitor. open ssh terminal and execute LogMonitor.
`$ ./MQTT-SNLogmonitor` `$ ./MQTT-SNLogmonitor`
@@ -113,4 +110,15 @@ open ssh terminal and execute LogMonitor.
Now you can get the Log on your terminal. Now you can get the Log on your terminal.
## ** Tips: **
Uncomment the line 62, 63 in MQTTSNDefines.h then you can get more precise logs.
```
/*=================================
* Log controls
==================================*/
//#define DEBUG // print out log for debug
//#define DEBUG_NWSTACK // print out SensorNetwork log
```

View File

@@ -13,8 +13,6 @@
* Contributors: * Contributors:
* Tomoaki Yamaguchi - initial API and implementation and/or initial documentation * Tomoaki Yamaguchi - initial API and implementation and/or initial documentation
**************************************************************************************/ **************************************************************************************/
#define RINGBUFFER
#include "MQTTSNGWProcess.h" #include "MQTTSNGWProcess.h"
#include "MQTTSNGWLogmonitor.h" #include "MQTTSNGWLogmonitor.h"
#include <stdio.h> #include <stdio.h>