Tree: logging

From RFID Wiki

[edit] Logging

The logging module can be used to create logs, i.e. data that is written to file, and that can be read and analysed later. Records in the log are preceded by a descriptor of type mrg_log_command_t. The descriptor MRG_LOG_COMMAND_DATA is used to write arbitrary data. There is special support to write RFID frame logs; logs come with a log port, which writes/reads a (concise) binary representation to/from the log file. For 15693, these use the descriptors MRG_LOG_COMMAND_REQUEST_15693 and MRG_LOG_COMMAND_RESPONSE_15693.


The RFID Guardian Main program uses a logging module to record incoming RFID requests. It is implemented as a filter in the RFID port's filter chain. Its operation is controlled from the User Interface.


Logs are usually read off-line. An example program is provided in ~MRG/test/log-reader/ that reads a log file and displays its contents on the screen.


Depends on:

port type
Two ports for logging: first, the Guardian Main program uses a filter in the RFID ports' filter chain to intercept and log incoming requests. Second, a log port type is used to write/read RFID frames to/from a log file.
port filter chain
The Guardian Main program uses a filter in the RFID ports' filter chain to intercept and log incoming requests.