Poseidon2
– Family manual
HW group
www.HW-group.com
88 / 104
File spilog.bin
u_char occupied_bytes;
// record length (total include length)
u_char type; // log_type - type of record
time_t time; // time of sampling (u_long)
u_char type; // log_group - sensor type
u_char count;
// value count
u_short id; // value_id[i]
int val; // value[i]
Aspilog.bin format
- Log current values when Alarm started and finisher
- log digital inputs and outputs
/*
* RECORD STRUCTURE
* spi_record_header|data_record_header|data_1|data_2|...|data_n
*
*/
typedef struct {
u_char occupied_bytes; // record length (data + TSpiRecordHeader)
u_char type; // Record type: LOG_FILE_DATA_TYPE: LOG - 0, ALARM - 1
time_t time; // sampling time (u_long)
} TSpiRecordHeader;
typedef struct {
u_char type; // Sensor type 0 - Wire1 sensors, 1 - RS232 sensors, 2 - RS485
sensors, 3 - inputs, 4 - outputs
u_char count;
} TDataRecordHeader;
typedef struct {
u_short id;
int val;
} TIdVal;
typedef enum
{ WIRE_1_TEMP = 0, RS232_TEMP, RS485_TEMP, BINARY_IN, BINARY_OUT }
DataType;