Mapper
Classes | Macros | Functions
database.h File Reference
#include <sys/types.h>
Include dependency graph for database.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  msgbuf
 
struct  update
 
struct  alarm_save
 
struct  report
 
struct  databank
 
struct  old_databank
 
struct  database
 
struct  old_database
 
struct  dial_message
 
struct  error_message
 
struct  group
 
struct  old_group
 
struct  handbook5
 
struct  old_handbook5
 
struct  interrogate
 
struct  interrogate::channel_gage
 
struct  overindx
 
struct  old_overindx
 
struct  agency
 
struct  rating
 
struct  rating::shift_factors
 
struct  rating::rating_curve
 
struct  rating::record_stage
 
struct  rating::sig_stages
 
struct  sensorgrps
 
struct  old_sensorgrps
 
struct  absolute_alarm
 
struct  roc_alarm
 
struct  sensor_file
 
struct  alt_alarm
 
struct  old_sensor_file
 
struct  sensor_type
 
struct  old_sensor_type
 
struct  sindx
 
struct  old_sindx
 
struct  sensor_name
 
struct  old_sensor_name
 
struct  dbmsg_req
 
struct  period_rain
 
struct  work_array
 

Macros

#define EOL   0x0A
 
#define QNX2_EOL   0x1E
 
#define HB5_ID_LEN   17
 
#define PC_LEN   11
 
#define NAME_LEN   51
 
#define MSG_OUT   0x01
 
#define DATA_IN   0x02
 
#define READ_SINDX   0x03
 
#define UPDATE   0x04
 
#define SHOWREPORTS   0x05
 
#define VERIFY   0x06
 
#define ALARMS   0x07
 
#define STATS_OUT   0x08
 
#define STATS_CLEAR   0x09
 
#define UNKNOWN   0x00
 
#define ASCII   0x01 /* ALERT ASCII format */
 
#define BINARY   0x02 /* ALERT binary format */
 
#define ENHANCED   0x03 /* ALERT enhanced format */
 
#define DARDC   0x04 /* NWS DARDC formatted gage */
 
#define LARC   0x05 /* Handar 550A in smart mode */
 
#define HANDAR_560A   0x06 /* Handar 560A in smart mode */
 
#define SYNERGETICS   0x07
 
#define TELMK   0x08
 
#define BDT   0x09
 
#define SSBDT   0x0A
 
#define COMPULOGGER   0x0B
 
#define CLIMATRONICS   0x0C
 
#define CAMBELL_21   0x0D
 
#define CAMBELL_10   0x0E
 
#define ASOS   0x0F
 
#define FTS11   0x10
 
#define STEVENS   0x11
 
#define SUTRON   0x12
 
#define TALKAMARK   0x13
 
#define NOT_USED   0xFFFFFFFF
 
#define OLD_NOT_USED   0xFFFF
 
#define ALARMDIR   "/usr/DAT/alarm"
 
#define ALARM_SAVE   "/usr/DAT/ALARM.LOG"
 
#define DEFAULTACTION   "/usr/DAT/alarm/defaultaction"
 
#define POS_LEVEL_1   0x01 /* Bit 1 (00000001), Positive Level 1 */
 
#define POS_LEVEL_2   0x02 /* Bit 2 (00000010), Positive Level 2 */
 
#define POS_ROC   0x04 /* Bit 3 (00000100), Positive Rate of Change */
 
#define NEG_LEVEL_1   0x10 /* Bit 5 (00010000), Negative Level 1 */
 
#define NEG_LEVEL_2   0x20 /* Bit 6 (00100000), Negative Level 2 */
 
#define NEG_ROC   0x40 /* Bit 7 (01000000), Negative Rate Of Change */
 
#define DB_DIR   "/usr/DAT"
 
#define DATABANK   "/usr/DAT/DATABANK.DAT"
 
#define RPTS_PER_REC   365
 
#define DATABASE   "/usr/DAT/DATABASE.DAT"
 
#define DIAL   "/usr/DAT/DIAL.DAT"
 
#define DIALLOG   "/usr/DAT/DIAL.LOG"
 
#define ERRORLOG   "/usr/DAT/ERROR.LOG"
 
#define GROUP   "/usr/DAT/GROUP.DAT"
 
#define HANDBOOK5   "/usr/DAT/HANDBOOK5.DAT"
 
#define THANDBOOK5   "/tmp/HANDBOOK5.DAT"
 
#define INTERROGATE   "/usr/DAT/INTERROGATE.DAT"
 
#define OVERINDX   "/usr/DAT/OVERINDX.DAT"
 
#define DEFAULTOV   10
 
#define ONOT_USED   0xFFFFFFFF
 
#define OVIDX_RECS   0x100
 
#define OVERLOAD   "/usr/DAT/OVERLOAD.DAT"
 
#define OWNER   "/usr/DAT/OWNER.DAT"
 
#define RATING   "/usr/DAT/RATING.DAT"
 
#define LINEAR   '1'
 
#define LOG   '2'
 
#define SENSORGRPS   "/usr/DAT/SENSORGRPS.DAT"
 
#define SENSOR_FILE   "/usr/DAT/SENSOR_FILE.DAT"
 
#define NO_OWNER   0x00
 
#define INACTIVE   0x00
 
#define ACTIVE   0x01
 
#define ACTIVE1   0x01
 
#define ACTIVE2   0x02
 
#define ACTIVE3   0x03
 
#define ACTIVE4   0x04
 
#define ALARMED   0x05
 
#define ALT_ALARM   "/usr/DAT/ALT_ALARM.DAT"
 
#define ALARM_ABOVE   0x01
 
#define ALARM_BELOW   0x02
 
#define ALARM_ABOVE_ROC   0x03
 
#define ALARM_BELOW_ROC   0x04
 
#define SENSOR_TYPE   "/usr/DAT/SENSOR_TYPE.DAT"
 
#define SINDX   "/usr/DAT/SINDX.DAT"
 
#define TSINDX   "/tmp/SINDX.DAT"
 
#define SNAME   "/usr/DAT/SNAME.DAT"
 
#define TSNAME   "/tmp/SNAME.DAT"
 
#define CNOT_USED   0x7E
 
#define SIMPARMS   "/usr/DAT/SIMPARMS.DAT"
 
#define QSIM   "/usr/DAT/QSIM.DAT"
 
#define QFCST   "/usr/DAT/QFCST"
 
#define CONT   "/usr/DAT/CONT.DAT"
 
#define DIALGROUPS   "/usr/DAT/DIALGROUPS.DAT"
 
#define VERSION   "/usr/DAT/VERSION.DAT"
 
#define ALARMPORT   18 /* port number attached to by alarm functions */
 
#define NDATABANK   0x00000000 /* /usr/DAT/DATABANK.DAT */
 
#define NDATABASE   0x00000001 /* /usr/DAT/DATABASE.DAT */
 
#define NSENSOR_FILE   0x00000002 /* /usr/DAT/SENSOR_FILE.DAT */
 
#define NSENSOR_TYPE   0x00000003 /* /usr/DAT/SENSOR_TYPE.DAT */
 
#define NTHANDBOOK5   0x00000004 /* /tmp/HANDBOOK5.DAT */
 
#define NTSINDX   0x00000005 /* /tmp/SINDX.DAT */
 
#define NTSNAME   0x00000006 /* /tmp/SNAME.DAT */
 
#define NALARMLOG   0x00000007 /* /usr/DAT/ALARM.LOG */
 
#define NERRORLOG   0x00000008 /* /usr/DAT/ERROR.LOG */
 
#define NGROUP   0x00000009 /* /usr/DAT/GROUP.DAT */
 
#define NHANDBOOK5   0x0000000A /* /usr/DAT/HANDBOOK5.DAT */
 
#define NOVERINDX   0x0000000B /* /usr/DAT/OVERINDX.DAT */
 
#define NOVERLOAD   0x0000000C /* /usr/DAT/OVERLOAD.DAT */
 
#define NOWNER   0x0000000D /* /usr/DAT/OWNER.DAT */
 
#define NSENSORGRPS   0x0000000E /* /usr/DAT/SENSORGRPS.DAT */
 
#define NSINDX   0x0000000F /* /usr/DAT/SINDX.DAT */
 
#define NSNAME   0x00000010 /* /usr/DAT/SNAME.DAT */
 
#define NDIAL   0x00000011 /* /usr/DAT/DIAL.DAT */
 
#define NINTERROGATE   0x00000012 /* /usr/DAT/INTERROGATE.DAT */
 
#define NDIALLOG   0x00000013 /* /usr/DAT/DIAL.LOG */
 
#define NSIMPARMS   0x00000014 /* /usr/DAT/SIMPARMS.DAT */
 
#define NQSIM   0x00000015 /* /usr/DAT/QSIM.DAT */
 
#define NQFCST   0x00000016 /* /usr/DAT/QFCST.DAT */
 
#define NCONT   0x00000017 /* /usr/DAT/CONT.DAT */
 
#define NDIALGROUPS   0x00000018 /* /usr/DAT/DIALGROUPS.DAT */
 
#define NRATING   0x00000019 /* /usr/DAT/RATING.DAT */
 
#define NALT_ALARM   0x0000001A /* /usr/DAT/ALT_ALARM.DAT */
 
#define NVERSION   0x0000001B /* /usr/DAT/VERSION.DAT */
 
#define NOT_ALWAYS_OPEN   0x00000007
 
#define DB_RESERVED   0x0000001C
 
#define DBCLOSE   0x00000001
 
#define DBOPEN   0x00000002
 
#define DBREAD   0x00000003
 
#define DBSIZE   0x00000004
 
#define DBTRUNC   0x00000005
 
#define DBWRITE   0x00000006
 
#define MAX_MSG_SIZE   16384L
 

Functions

unsigned int dbclose (unsigned long int file_num)
 
unsigned int dbopen (unsigned long int file_num)
 
unsigned long int dbread (unsigned long int file_num, signed long int offset, unsigned long int rec_size, unsigned long int num_recs, void *buf)
 
signed long int dbsize (unsigned long int file_num)
 
signed long int dbtrunc (unsigned long int file_num, signed long int offset)
 
unsigned long int dbwrite (unsigned long int file_num, signed long int offset, unsigned long int rec_size, unsigned long int num_recs, void *buf)
 
struct period_rain sumALERTrain (struct work_array *work, time_t clock_start, time_t clock_end, float max_accumulator)
 
struct period_rain sum_rain (struct work_array *work, time_t clock_start, time_t clock_end)
 
struct handbook5 bs_hb5 (unsigned char *hb5_pc, size_t max_recs, struct handbook5 *hb)
 
void bubble_hb5 (size_t num_items)
 
void bubble_sindx (struct sindx *sid_array, unsigned int num_items)
 
void bubble_sname (size_t num_items)
 
void bub_hb5 (unsigned long int num_items)
 
void bub_sindx (unsigned long int num_items)
 
void bub_sname (unsigned long int num_items)
 
void check_alarm (struct msgbuf *msg, struct databank *dbk, size_t rec_num, unsigned int reactivate_msg)
 
void chg_reports (unsigned int index, struct databank *dbk, float chgval, signed char all_data, time_t told)
 
pid_t find_databuf (void)
 
unsigned long int get_reports (unsigned long int index, struct databank *dbk, time_t tnew, time_t told, char *qualifier, unsigned long int report_limit, struct report *rpt)
 
signed long get_timezone (unsigned char tz_name[4])
 
void mk_dial_msg (unsigned char *pname, unsigned char *msg, struct dial_message *dialmsg)
 
void mk_err_msg (char *pname, char *errmsg, struct error_message *err)
 
unsigned long read_ovidx (struct overindx *oi, unsigned long num_oi)
 
unsigned char read_sindx (void)
 
struct msgbuf rec_update (void)
 
void red_alert (struct error_message *err)
 
unsigned int send_databuf (unsigned int id, unsigned char *hb5_id, unsigned char *pc, float data, time_t clock, unsigned char dq, unsigned char gage_type, signed int tid, unsigned int node_num, signed int tty_num)
 
struct update update_on (void)
 
unsigned char update_off (struct update)
 
unsigned long write_ovidx (struct overindx *oi, unsigned long num_oi)
 

Macro Definition Documentation

◆ ACTIVE

#define ACTIVE   0x01

Definition at line 409 of file database.h.

◆ ACTIVE1

#define ACTIVE1   0x01

Definition at line 410 of file database.h.

◆ ACTIVE2

#define ACTIVE2   0x02

Definition at line 411 of file database.h.

◆ ACTIVE3

#define ACTIVE3   0x03

Definition at line 412 of file database.h.

◆ ACTIVE4

#define ACTIVE4   0x04

Definition at line 413 of file database.h.

◆ ALARM_ABOVE

#define ALARM_ABOVE   0x01

Definition at line 458 of file database.h.

◆ ALARM_ABOVE_ROC

#define ALARM_ABOVE_ROC   0x03

Definition at line 460 of file database.h.

◆ ALARM_BELOW

#define ALARM_BELOW   0x02

Definition at line 459 of file database.h.

◆ ALARM_BELOW_ROC

#define ALARM_BELOW_ROC   0x04

Definition at line 461 of file database.h.

◆ ALARM_SAVE

#define ALARM_SAVE   "/usr/DAT/ALARM.LOG"

Definition at line 116 of file database.h.

◆ ALARMDIR

#define ALARMDIR   "/usr/DAT/alarm"

Definition at line 115 of file database.h.

◆ ALARMED

#define ALARMED   0x05

Definition at line 414 of file database.h.

◆ ALARMPORT

#define ALARMPORT   18 /* port number attached to by alarm functions */

Definition at line 570 of file database.h.

◆ ALARMS

#define ALARMS   0x07

Definition at line 71 of file database.h.

◆ ALT_ALARM

#define ALT_ALARM   "/usr/DAT/ALT_ALARM.DAT"

Definition at line 457 of file database.h.

◆ ASCII

#define ASCII   0x01 /* ALERT ASCII format */

Definition at line 77 of file database.h.

◆ ASOS

#define ASOS   0x0F

Definition at line 91 of file database.h.

◆ BDT

#define BDT   0x09

Definition at line 85 of file database.h.

◆ BINARY

#define BINARY   0x02 /* ALERT binary format */

Definition at line 78 of file database.h.

◆ CAMBELL_10

#define CAMBELL_10   0x0E

Definition at line 90 of file database.h.

◆ CAMBELL_21

#define CAMBELL_21   0x0D

Definition at line 89 of file database.h.

◆ CLIMATRONICS

#define CLIMATRONICS   0x0C

Definition at line 88 of file database.h.

◆ CNOT_USED

#define CNOT_USED   0x7E

Definition at line 551 of file database.h.

◆ COMPULOGGER

#define COMPULOGGER   0x0B

Definition at line 87 of file database.h.

◆ CONT

#define CONT   "/usr/DAT/CONT.DAT"

Definition at line 565 of file database.h.

◆ DARDC

#define DARDC   0x04 /* NWS DARDC formatted gage */

Definition at line 80 of file database.h.

◆ DATA_IN

#define DATA_IN   0x02

Definition at line 66 of file database.h.

◆ DATABANK

#define DATABANK   "/usr/DAT/DATABANK.DAT"

Definition at line 140 of file database.h.

◆ DATABASE

#define DATABASE   "/usr/DAT/DATABASE.DAT"

Definition at line 220 of file database.h.

◆ DB_DIR

#define DB_DIR   "/usr/DAT"

Definition at line 137 of file database.h.

◆ DB_RESERVED

#define DB_RESERVED   0x0000001C

Definition at line 607 of file database.h.

◆ DBCLOSE

#define DBCLOSE   0x00000001

Definition at line 610 of file database.h.

◆ DBOPEN

#define DBOPEN   0x00000002

Definition at line 611 of file database.h.

◆ DBREAD

#define DBREAD   0x00000003

Definition at line 612 of file database.h.

◆ DBSIZE

#define DBSIZE   0x00000004

Definition at line 613 of file database.h.

◆ DBTRUNC

#define DBTRUNC   0x00000005

Definition at line 614 of file database.h.

◆ DBWRITE

#define DBWRITE   0x00000006

Definition at line 615 of file database.h.

◆ DEFAULTACTION

#define DEFAULTACTION   "/usr/DAT/alarm/defaultaction"

Definition at line 117 of file database.h.

◆ DEFAULTOV

#define DEFAULTOV   10

Definition at line 312 of file database.h.

◆ DIAL

#define DIAL   "/usr/DAT/DIAL.DAT"

Definition at line 241 of file database.h.

◆ DIALGROUPS

#define DIALGROUPS   "/usr/DAT/DIALGROUPS.DAT"

Definition at line 566 of file database.h.

◆ DIALLOG

#define DIALLOG   "/usr/DAT/DIAL.LOG"

Definition at line 244 of file database.h.

◆ ENHANCED

#define ENHANCED   0x03 /* ALERT enhanced format */

Definition at line 79 of file database.h.

◆ EOL

#define EOL   0x0A

Definition at line 16 of file database.h.

◆ ERRORLOG

#define ERRORLOG   "/usr/DAT/ERROR.LOG"

Definition at line 251 of file database.h.

◆ FTS11

#define FTS11   0x10

Definition at line 92 of file database.h.

◆ GROUP

#define GROUP   "/usr/DAT/GROUP.DAT"

Definition at line 256 of file database.h.

◆ HANDAR_560A

#define HANDAR_560A   0x06 /* Handar 560A in smart mode */

Definition at line 82 of file database.h.

◆ HANDBOOK5

#define HANDBOOK5   "/usr/DAT/HANDBOOK5.DAT"

Definition at line 270 of file database.h.

◆ HB5_ID_LEN

#define HB5_ID_LEN   17

Definition at line 45 of file database.h.

◆ INACTIVE

#define INACTIVE   0x00

Definition at line 408 of file database.h.

◆ INTERROGATE

#define INTERROGATE   "/usr/DAT/INTERROGATE.DAT"

Definition at line 285 of file database.h.

◆ LARC

#define LARC   0x05 /* Handar 550A in smart mode */

Definition at line 81 of file database.h.

◆ LINEAR

#define LINEAR   '1'

Definition at line 355 of file database.h.

◆ LOG

#define LOG   '2'

Definition at line 356 of file database.h.

◆ MAX_MSG_SIZE

#define MAX_MSG_SIZE   16384L

Definition at line 620 of file database.h.

◆ MSG_OUT

#define MSG_OUT   0x01

Definition at line 65 of file database.h.

◆ NALARMLOG

#define NALARMLOG   0x00000007 /* /usr/DAT/ALARM.LOG */

Definition at line 583 of file database.h.

◆ NALT_ALARM

#define NALT_ALARM   0x0000001A /* /usr/DAT/ALT_ALARM.DAT */

Definition at line 602 of file database.h.

◆ NAME_LEN

#define NAME_LEN   51

Definition at line 47 of file database.h.

◆ NCONT

#define NCONT   0x00000017 /* /usr/DAT/CONT.DAT */

Definition at line 599 of file database.h.

◆ NDATABANK

#define NDATABANK   0x00000000 /* /usr/DAT/DATABANK.DAT */

Definition at line 574 of file database.h.

◆ NDATABASE

#define NDATABASE   0x00000001 /* /usr/DAT/DATABASE.DAT */

Definition at line 575 of file database.h.

◆ NDIAL

#define NDIAL   0x00000011 /* /usr/DAT/DIAL.DAT */

Definition at line 593 of file database.h.

◆ NDIALGROUPS

#define NDIALGROUPS   0x00000018 /* /usr/DAT/DIALGROUPS.DAT */

Definition at line 600 of file database.h.

◆ NDIALLOG

#define NDIALLOG   0x00000013 /* /usr/DAT/DIAL.LOG */

Definition at line 595 of file database.h.

◆ NEG_LEVEL_1

#define NEG_LEVEL_1   0x10 /* Bit 5 (00010000), Negative Level 1 */

Definition at line 132 of file database.h.

◆ NEG_LEVEL_2

#define NEG_LEVEL_2   0x20 /* Bit 6 (00100000), Negative Level 2 */

Definition at line 133 of file database.h.

◆ NEG_ROC

#define NEG_ROC   0x40 /* Bit 7 (01000000), Negative Rate Of Change */

Definition at line 134 of file database.h.

◆ NERRORLOG

#define NERRORLOG   0x00000008 /* /usr/DAT/ERROR.LOG */

Definition at line 584 of file database.h.

◆ NGROUP

#define NGROUP   0x00000009 /* /usr/DAT/GROUP.DAT */

Definition at line 585 of file database.h.

◆ NHANDBOOK5

#define NHANDBOOK5   0x0000000A /* /usr/DAT/HANDBOOK5.DAT */

Definition at line 586 of file database.h.

◆ NINTERROGATE

#define NINTERROGATE   0x00000012 /* /usr/DAT/INTERROGATE.DAT */

Definition at line 594 of file database.h.

◆ NO_OWNER

#define NO_OWNER   0x00

Definition at line 402 of file database.h.

◆ NOT_ALWAYS_OPEN

#define NOT_ALWAYS_OPEN   0x00000007

Definition at line 606 of file database.h.

◆ NOT_USED

#define NOT_USED   0xFFFFFFFF

Definition at line 110 of file database.h.

◆ NOVERINDX

#define NOVERINDX   0x0000000B /* /usr/DAT/OVERINDX.DAT */

Definition at line 587 of file database.h.

◆ NOVERLOAD

#define NOVERLOAD   0x0000000C /* /usr/DAT/OVERLOAD.DAT */

Definition at line 588 of file database.h.

◆ NOWNER

#define NOWNER   0x0000000D /* /usr/DAT/OWNER.DAT */

Definition at line 589 of file database.h.

◆ NQFCST

#define NQFCST   0x00000016 /* /usr/DAT/QFCST.DAT */

Definition at line 598 of file database.h.

◆ NQSIM

#define NQSIM   0x00000015 /* /usr/DAT/QSIM.DAT */

Definition at line 597 of file database.h.

◆ NRATING

#define NRATING   0x00000019 /* /usr/DAT/RATING.DAT */

Definition at line 601 of file database.h.

◆ NSENSOR_FILE

#define NSENSOR_FILE   0x00000002 /* /usr/DAT/SENSOR_FILE.DAT */

Definition at line 576 of file database.h.

◆ NSENSOR_TYPE

#define NSENSOR_TYPE   0x00000003 /* /usr/DAT/SENSOR_TYPE.DAT */

Definition at line 577 of file database.h.

◆ NSENSORGRPS

#define NSENSORGRPS   0x0000000E /* /usr/DAT/SENSORGRPS.DAT */

Definition at line 590 of file database.h.

◆ NSIMPARMS

#define NSIMPARMS   0x00000014 /* /usr/DAT/SIMPARMS.DAT */

Definition at line 596 of file database.h.

◆ NSINDX

#define NSINDX   0x0000000F /* /usr/DAT/SINDX.DAT */

Definition at line 591 of file database.h.

◆ NSNAME

#define NSNAME   0x00000010 /* /usr/DAT/SNAME.DAT */

Definition at line 592 of file database.h.

◆ NTHANDBOOK5

#define NTHANDBOOK5   0x00000004 /* /tmp/HANDBOOK5.DAT */

Definition at line 578 of file database.h.

◆ NTSINDX

#define NTSINDX   0x00000005 /* /tmp/SINDX.DAT */

Definition at line 579 of file database.h.

◆ NTSNAME

#define NTSNAME   0x00000006 /* /tmp/SNAME.DAT */

Definition at line 580 of file database.h.

◆ NVERSION

#define NVERSION   0x0000001B /* /usr/DAT/VERSION.DAT */

Definition at line 603 of file database.h.

◆ OLD_NOT_USED

#define OLD_NOT_USED   0xFFFF

Definition at line 111 of file database.h.

◆ ONOT_USED

#define ONOT_USED   0xFFFFFFFF

Definition at line 313 of file database.h.

◆ OVERINDX

#define OVERINDX   "/usr/DAT/OVERINDX.DAT"

Definition at line 311 of file database.h.

◆ OVERLOAD

#define OVERLOAD   "/usr/DAT/OVERLOAD.DAT"

Definition at line 331 of file database.h.

◆ OVIDX_RECS

#define OVIDX_RECS   0x100

Definition at line 314 of file database.h.

◆ OWNER

#define OWNER   "/usr/DAT/OWNER.DAT"

Definition at line 334 of file database.h.

◆ PC_LEN

#define PC_LEN   11

Definition at line 46 of file database.h.

◆ POS_LEVEL_1

#define POS_LEVEL_1   0x01 /* Bit 1 (00000001), Positive Level 1 */

Definition at line 129 of file database.h.

◆ POS_LEVEL_2

#define POS_LEVEL_2   0x02 /* Bit 2 (00000010), Positive Level 2 */

Definition at line 130 of file database.h.

◆ POS_ROC

#define POS_ROC   0x04 /* Bit 3 (00000100), Positive Rate of Change */

Definition at line 131 of file database.h.

◆ QFCST

#define QFCST   "/usr/DAT/QFCST"

Definition at line 564 of file database.h.

◆ QNX2_EOL

#define QNX2_EOL   0x1E

Definition at line 17 of file database.h.

◆ QSIM

#define QSIM   "/usr/DAT/QSIM.DAT"

Definition at line 563 of file database.h.

◆ RATING

#define RATING   "/usr/DAT/RATING.DAT"

Definition at line 352 of file database.h.

◆ READ_SINDX

#define READ_SINDX   0x03

Definition at line 67 of file database.h.

◆ RPTS_PER_REC

#define RPTS_PER_REC   365

Definition at line 150 of file database.h.

◆ SENSOR_FILE

#define SENSOR_FILE   "/usr/DAT/SENSOR_FILE.DAT"

Definition at line 401 of file database.h.

◆ SENSOR_TYPE

#define SENSOR_TYPE   "/usr/DAT/SENSOR_TYPE.DAT"

Definition at line 495 of file database.h.

◆ SENSORGRPS

#define SENSORGRPS   "/usr/DAT/SENSORGRPS.DAT"

Definition at line 390 of file database.h.

◆ SHOWREPORTS

#define SHOWREPORTS   0x05

Definition at line 69 of file database.h.

◆ SIMPARMS

#define SIMPARMS   "/usr/DAT/SIMPARMS.DAT"

Definition at line 562 of file database.h.

◆ SINDX

#define SINDX   "/usr/DAT/SINDX.DAT"

Definition at line 535 of file database.h.

◆ SNAME

#define SNAME   "/usr/DAT/SNAME.DAT"

Definition at line 549 of file database.h.

◆ SSBDT

#define SSBDT   0x0A

Definition at line 86 of file database.h.

◆ STATS_CLEAR

#define STATS_CLEAR   0x09

Definition at line 73 of file database.h.

◆ STATS_OUT

#define STATS_OUT   0x08

Definition at line 72 of file database.h.

◆ STEVENS

#define STEVENS   0x11

Definition at line 93 of file database.h.

◆ SUTRON

#define SUTRON   0x12

Definition at line 94 of file database.h.

◆ SYNERGETICS

#define SYNERGETICS   0x07

Definition at line 83 of file database.h.

◆ TALKAMARK

#define TALKAMARK   0x13

Definition at line 95 of file database.h.

◆ TELMK

#define TELMK   0x08

Definition at line 84 of file database.h.

◆ THANDBOOK5

#define THANDBOOK5   "/tmp/HANDBOOK5.DAT"

Definition at line 271 of file database.h.

◆ TSINDX

#define TSINDX   "/tmp/SINDX.DAT"

Definition at line 536 of file database.h.

◆ TSNAME

#define TSNAME   "/tmp/SNAME.DAT"

Definition at line 550 of file database.h.

◆ UNKNOWN

#define UNKNOWN   0x00

Definition at line 76 of file database.h.

◆ UPDATE

#define UPDATE   0x04

Definition at line 68 of file database.h.

◆ VERIFY

#define VERIFY   0x06

Definition at line 70 of file database.h.

◆ VERSION

#define VERSION   "/usr/DAT/VERSION.DAT"

Definition at line 567 of file database.h.

Function Documentation

◆ bs_hb5()

struct handbook5 bs_hb5 ( unsigned char *  hb5_pc,
size_t  max_recs,
struct handbook5 hb 
)

◆ bub_hb5()

void bub_hb5 ( unsigned long int  num_items)

◆ bub_sindx()

void bub_sindx ( unsigned long int  num_items)

◆ bub_sname()

void bub_sname ( unsigned long int  num_items)

◆ bubble_hb5()

void bubble_hb5 ( size_t  num_items)

◆ bubble_sindx()

void bubble_sindx ( struct sindx sid_array,
unsigned int  num_items 
)

◆ bubble_sname()

void bubble_sname ( size_t  num_items)

◆ check_alarm()

void check_alarm ( struct msgbuf msg,
struct databank dbk,
size_t  rec_num,
unsigned int  reactivate_msg 
)

◆ chg_reports()

void chg_reports ( unsigned int  index,
struct databank dbk,
float  chgval,
signed char  all_data,
time_t  told 
)

◆ dbclose()

unsigned int dbclose ( unsigned long int  file_num)

◆ dbopen()

unsigned int dbopen ( unsigned long int  file_num)

◆ dbread()

unsigned long int dbread ( unsigned long int  file_num,
signed long int  offset,
unsigned long int  rec_size,
unsigned long int  num_recs,
void *  buf 
)

Definition at line 22 of file dbread.c.

Here is the caller graph for this function:

◆ dbsize()

signed long int dbsize ( unsigned long int  file_num)

Definition at line 13 of file dbsize.c.

Here is the caller graph for this function:

◆ dbtrunc()

signed long int dbtrunc ( unsigned long int  file_num,
signed long int  offset 
)

◆ dbwrite()

unsigned long int dbwrite ( unsigned long int  file_num,
signed long int  offset,
unsigned long int  rec_size,
unsigned long int  num_recs,
void *  buf 
)

Definition at line 22 of file dbwrite.c.

Here is the caller graph for this function:

◆ find_databuf()

pid_t find_databuf ( void  )

◆ get_reports()

unsigned long int get_reports ( unsigned long int  index,
struct databank dbk,
time_t  tnew,
time_t  told,
char *  qualifier,
unsigned long int  report_limit,
struct report rpt 
)

◆ get_timezone()

signed long get_timezone ( unsigned char  tz_name[4])

◆ mk_dial_msg()

void mk_dial_msg ( unsigned char *  pname,
unsigned char *  msg,
struct dial_message dialmsg 
)

◆ mk_err_msg()

void mk_err_msg ( char *  pname,
char *  errmsg,
struct error_message err 
)

Definition at line 29 of file mk_err_msg.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_ovidx()

unsigned long read_ovidx ( struct overindx oi,
unsigned long  num_oi 
)

◆ read_sindx()

unsigned char read_sindx ( void  )

◆ rec_update()

struct msgbuf rec_update ( void  )

◆ red_alert()

void red_alert ( struct error_message err)

◆ send_databuf()

unsigned int send_databuf ( unsigned int  id,
unsigned char *  hb5_id,
unsigned char *  pc,
float  data,
time_t  clock,
unsigned char  dq,
unsigned char  gage_type,
signed int  tid,
unsigned int  node_num,
signed int  tty_num 
)

◆ sum_rain()

struct period_rain sum_rain ( struct work_array work,
time_t  clock_start,
time_t  clock_end 
)

◆ sumALERTrain()

struct period_rain sumALERTrain ( struct work_array work,
time_t  clock_start,
time_t  clock_end,
float  max_accumulator 
)

◆ update_off()

unsigned char update_off ( struct update  )

◆ update_on()

struct update update_on ( void  )

◆ write_ovidx()

unsigned long write_ovidx ( struct overindx oi,
unsigned long  num_oi 
)