Database Tables
Regardless of the type of equipment connection, database tables are created for each connection based on the prefix specified in the connection if they do not already exist.
Caution: No automatic maintenance (such as pruning or partitioning) is performed on these tables. Some of the tables can grow quite large, so it is up to the user to properly manage each set of tables from each equipment connection.
SECSGEM_EquipmentInfo Table
The SECSGEM_EquipmentInfo table is unique in that only one will get created for all databases that use the same database connection and will not use a prefix in its name. Each row of the SECSGEM_EquipmentInfo table contains information about a specific Equipment Connection.
SECSGEM_EquipmentInfo |
---|
Column Name | Datatype | Description |
---|
Equipment | String | The name of the equipment |
Prefix | String | The prefix that the equipment connection uses for its unique tables. |
Status | String | The status of the equipment connection. |
SDL File | String | The SDL File that was uploaded for this equipment connection. If no file was uploaded, it will use the default messages.sdl. |
Messages Table
The Messages table is where SECS messages are stored after they are sent or received. It will include a prefix in the name if one was specified in the equipment connection. Multiple equipment connections can use the same prefix which will have them write to the same messages table. Because this table records every message between the Gateway and equipment, it can grow quite large.
prefixMessages |
---|
Column Name | Datatype | Description |
---|
ID | Auto incrementing PrimaryID, Integer | The ID of the row. |
Equipment | String | The name of the equipment. |
StreamFunction | String | The Stream and Function such as "S1F1". |
Direction | String | Whether the message was received or sent. |
RequestResponse | String | Whether the message was a request or a response. |
CommonID | String | A special identifier that will link together multiple related messages. |
TxID | Integer | The transaction ID of the message. |
Reply | Integer | Whether the message expects a reply or not. |
Message | String | The JSON string message. |
TimeSentReceived | DateTime | A datetime value of when the message was sent or received. |
Errors Table
Any errors that occur are logged to the Errors table. It will include a prefix in the name if one was specified in the equipment connection. Multiple equipment connections can use the same prefix which will have them write to the same errors table.
prefixErrors |
---|
Column Name | Datatype | Description |
---|
ID | Auto incrementing PrimaryID, Integer | The ID of the row. |
Equipment | String | The name of the equipment. |
StreamFunction | String | The Stream and Function such as "S1F1". Only used if the error is related to a SECS Message |
ErrorType | String | The type of error that occurred, such as Connection Error, Timeout, or JSON Syntax Error. |
Error | String | The error message. |
Time | DateTime | The date and time when the error occurred. |