smart-serial
SMART Serial Service
Synopsis
smart-serial
Description
smart-serial runs as a service and writes bat pass events and periodic status data to the specified serial port as events are collected from the SMART event infrastructure.
The serial.conf configuration file contains 8 lines with the following structure:
- 1. TTY
-
The serial port to use e.g. "ttyS0".
- 2. {7|8}{N|E|O}{1|2}<baudrate>
-
Specifies the data bits, parity, and baudrate e.g. "8N19600" indicates 8 data bits, no parity, 1 stop bit, and 9600 baud.
- 3. mask
-
The mask is a 32-bit hexadecimal number indicating which output fields to include lines written to the serial port. See below for details.
- 4. event line preamble
-
Characters to send at each event line start. \r and \n can be used to indicate carriage-return and new-line characters respectively.
- 5. event line epilogue
-
Characters to send at each event line end including line termination. \r and \n can be used to indicate carriage-return and new-line characters respectively.
- 6. polling interval
-
Polling interval for output of periodic status information in seconds, or zero to disable periodic status information output. 7. status line preamble Characters to send at each status line start. \r and \n can be used to indicate carriage-return and new-line characters respectively.
- 8. status line epilogue
-
Characters to send at each status line end including line termination. \r and \n can be used to indicate carriage-return and new-line characters respectively.
The following table describes the mask bits (hex values or'ed together):
| Mask Bits | Description |
|---|---|
| 0x00000001 | Prefix |
| 0x00000002 | Date |
| 0x00000004 | Time |
| 0x00000008 | Duration |
| 0x00000010 | N |
| 0x00000020 | Fc |
| 0x00000040 | Sc |
| 0x00000080 | Fmax |
| 0x00000100 | Fmin |
| 0x00000200 | Fmean |
| 0x00000400 | TBC |
| 0x00000800 | Fk |
| 0x00001000 | Tk |
| 0x00002000 | S1 |
| 0x00004000 | Tc |
| 0x00008000 | Dur |
| 0x00010000 | nPulsesClassified |
| 0x00020000 | nPulsesMatching |
| 0x00040000 | Top1Match |
| 0x00080000 | Top1Margin |
| 0x00100000 | Top2Match |
| 0x00200000 | Top2Margin |
| 0x00400000 | Top3Margin |
| 0x00800000 | Top3Margin |
| 0x01000000 | Event generated CRC7 |
| 0x02000000 | Status Date |
| 0x04000000 | Status Time |
| 0x08000000 | Status Disk Utilization (%) |
| 0x10000000 | Status Events since last poll |
| 0x20000000 | Voltage |
| 0x40000000 | Reserved |
| 0x80000000 | Status generated CRC7 |
Exit Codes
- 0
-
Success
- 1
-
Fail
Files
- /var/www/html/storage/serial.conf
-
Configuration file
