Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FW-694: statistics to monitor the openwsn device #171

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions software/openvisualizer/bin/openVisualizerApp/logging.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ keys=std,console
[handler_std]
class=handlers.RotatingFileHandler
# args: filename, open mode, max file size, backup file count
args=('%(logDir)s/openVisualizer.log', 'a', 2000000, 5)
args=('%(logDir)s/openVisualizer.log', 'a', 20000000, 5)
formatter=std

[handler_console]
Expand All @@ -32,7 +32,7 @@ formatter=console
#============================ loggers =========================================

[loggers]
keys=root,eventBusMonitor,openTun,openTunWindows,openTunLinux,eventBusClient,lbrClient,moteConnector,moteProbe,moteProbeUtils,moteState,openLbr,OpenParser,Parser,OpenHdlc,ParserData,ParserPrintf,ParserInfoErrorCritical,ParserStatus,RPL,SourceRoute,udpInject,JRC,openVisualizerApp,openVisualizerGui,openVisualizerCli,openVisualizerWeb,OVtracer
keys=root,eventBusMonitor,openTun,openTunWindows,openTunLinux,eventBusClient,lbrClient,moteConnector,moteProbe,moteProbeUtils,moteState,openLbr,OpenParser,Parser,OpenHdlc,ParserData,ParserStat,ParserPrintf,ParserInfoErrorCritical,ParserStatus,RPL,SourceRoute,udpInject,JRC,openVisualizerApp,openVisualizerGui,openVisualizerCli,openVisualizerWeb,OVtracer

[logger_root]
level=ERROR
Expand Down Expand Up @@ -146,6 +146,12 @@ handlers=std
propagate=0
qualname=ParserStatus

[logger_ParserStat]
level=INFO
handlers=std
propagate=0
qualname=ParserStat

[logger_RPL]
level=INFO
handlers=std
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import ParserInfoErrorCritical as ParserIEC
import ParserData
import ParserPacket
import ParserStat
import ParserPrintf

class OpenParser(Parser.Parser):
Expand All @@ -27,8 +28,8 @@ class OpenParser(Parser.Parser):
SERFRAME_MOTE2PC_CRITICAL = ParserIEC.ParserInfoErrorCritical.SEVERITY_CRITICAL
SERFRAME_MOTE2PC_REQUEST = ord('R')
SERFRAME_MOTE2PC_SNIFFED_PACKET = ord('P')
SERFRAME_MOTE2PC_STAT = ord('T')
SERFRAME_MOTE2PC_PRINTF = ord('F')

SERFRAME_PC2MOTE_SETDAGROOT = ord('R')
SERFRAME_PC2MOTE_DATA = ord('D')
SERFRAME_PC2MOTE_TRIGGERSERIALECHO = ord('S')
Expand All @@ -53,8 +54,8 @@ def __init__(self):
self.parserCritical = ParserIEC.ParserInfoErrorCritical(self.SERFRAME_MOTE2PC_CRITICAL)
self.parserData = ParserData.ParserData()
self.parserPacket = ParserPacket.ParserPacket()
self.parserStat = ParserStat.ParserStat()
self.parserPrintf = ParserPrintf.ParserPrintf()

# register subparsers
self._addSubParser(
index = 0,
Expand Down Expand Up @@ -86,12 +87,16 @@ def __init__(self):
val = self.SERFRAME_MOTE2PC_SNIFFED_PACKET,
parser = self.parserPacket.parseInput,
)
self._addSubParser(
index = 0,
val = self.SERFRAME_MOTE2PC_STAT,
parser = self.parserStat.parseInput,
)
self._addSubParser(
index = 0,
val = self.SERFRAME_MOTE2PC_PRINTF,
parser = self.parserPrintf.parseInput,
)

#======================== public ==========================================

#======================== private =========================================
Loading