Appendix B. G3-PLC SQLite Log Database

The PLC Sniffer creates a relational database using SQLite to store the G3-PLC logs. Using this type of database to store the information helps to handle logs from complex networks and to inspect the data in very flexible ways. Third party tools to handle SQLite databases can also be used. A useful tool for SQLite database inspection is the SQLite Manager plug-in for Firefox browser.

The current version of the database has 14 tables:

All tables are linked through a common “idFrame” index. This unique index is assigned when a new frame is inserted on the database. This allows building complex search queries with SQL. Figure 1 and Figure 2 show the tables and relations of a G3-PLC log database. Table fields are encoded as specified in the PRIME standard except CmdType Identifier. This field is specified in the next section.

Figure 1. PLC Sniffer G3 Log Database, Part-1
Figure 2. PLC Sniffer G3 Log Database, Part-2