You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
248 lines
5.1 KiB
248 lines
5.1 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: FileStructs.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of FileStructs.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __FILE__STRUCTS__
|
|
#define __FILE__STRUCTS__
|
|
|
|
#define STRING_MAX 31
|
|
#define MAX_BITSENS 32
|
|
#define NUMBEROFTAGS 20
|
|
#define MAX_LINKS 20
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#define FILE_CHAR CHAR
|
|
#define FILE_BYTE BYTE
|
|
|
|
#define FILE_SHORT SHORT
|
|
#define FILE_WORD WORD
|
|
|
|
#define FILE_INT INT
|
|
#define FILE_DWORD DWORD
|
|
|
|
#define FILE_DOUBLE double
|
|
|
|
#define FILE_BOOL FILE_BYTE
|
|
|
|
#pragma pack(1)
|
|
|
|
#else
|
|
|
|
#define FILE_CHAR CHAR
|
|
#define FILE_BYTE BYTE
|
|
|
|
#define FILE_SHORT SHORT
|
|
#define FILE_WORD WORD
|
|
|
|
#define FILE_INT INT
|
|
#define FILE_DWORD DWORD
|
|
|
|
#define FILE_DOUBLE double
|
|
|
|
#define FILE_BOOL FILE_BYTE
|
|
|
|
#pragma pack(1)
|
|
|
|
#endif
|
|
|
|
#define TAG_ZONE "ZONES"
|
|
#define TAG_GUARD "GUARDS"
|
|
#define TAG_SUPER "SUPRES"
|
|
#define TAG_SENSOR "SENSORS"
|
|
#define TAG_DEVICE "DEVICES"
|
|
#define TAG_LINE "LINES"
|
|
#define TAG_BACKUP "BACKUP"
|
|
#define TAG_SYNOPTIC "SYNOPTIC"
|
|
#define TAG_ECS "ECS"
|
|
#define TAG_CONDITION "CONDITIONS"
|
|
#define TAG_FILTER "FILTERS"
|
|
#define TAG_COMMAND "COMMANDS"
|
|
#define TAG_OPTIONS "OPTIONS"
|
|
#define TAG_PATROL "PATROL"
|
|
|
|
struct FILE_ZONE
|
|
{
|
|
FILE_CHAR pName[STRING_MAX]; // name
|
|
FILE_INT nPriority; // priority
|
|
FILE_DOUBLE Pos[2]; //position
|
|
};
|
|
|
|
struct FILE_LINE
|
|
{
|
|
FILE_CHAR pPortName[STRING_MAX];
|
|
};
|
|
|
|
struct FILE_SENSOR
|
|
{
|
|
FILE_CHAR pName[STRING_MAX]; // name
|
|
FILE_CHAR pAlarmMsg[STRING_MAX]; //
|
|
|
|
FILE_INT nAddress; // address
|
|
FILE_INT BitMask; // mask
|
|
FILE_INT nPriority; // priority
|
|
FILE_INT bEnable; // enable/disable
|
|
|
|
FILE_INT iZone; // zone number (index in zones array)
|
|
FILE_INT iLine; // line number (index in lines array)
|
|
FILE_INT iType; // type of sensor (index in array of types)(bkgrnd etc.)
|
|
|
|
FILE_DOUBLE Pos[2]; // position
|
|
};
|
|
|
|
struct FILE_DEVICE
|
|
{
|
|
FILE_CHAR pName[STRING_MAX];
|
|
FILE_DOUBLE Pos[MAX_BITSENS][2]; //position on picture
|
|
FILE_INT BitCount; //number of sensors, 0-7
|
|
FILE_INT iBackground; //background index
|
|
};
|
|
|
|
struct FILE_TAG
|
|
{
|
|
FILE_CHAR pName[STRING_MAX]; //names: Devices, Zones, Sensors, etc..
|
|
FILE_INT iStart; //offset
|
|
};
|
|
|
|
struct FILE_BACKUP
|
|
{
|
|
FILE_CHAR pPort[STRING_MAX];
|
|
};
|
|
|
|
struct FILE_SINOPTIC
|
|
{
|
|
FILE_CHAR pPort[STRING_MAX];
|
|
};
|
|
|
|
struct FILE_GUARD
|
|
{
|
|
FILE_CHAR pName[STRING_MAX];
|
|
};
|
|
|
|
struct FILE_SUPER
|
|
{
|
|
FILE_CHAR pName[STRING_MAX];
|
|
FILE_CHAR pPassword[STRING_MAX];
|
|
//general actions (GA)
|
|
FILE_BYTE sys_shutdown;
|
|
FILE_BYTE access_all;
|
|
FILE_BYTE access;
|
|
FILE_BYTE general_report;
|
|
FILE_BYTE clock_updating;
|
|
//system_check (SC)
|
|
FILE_BYTE show_mal_sprus;
|
|
FILE_BYTE show_non_comm_sprus;
|
|
FILE_BYTE show_undef_sprus;
|
|
FILE_BYTE show_statistics;
|
|
FILE_BYTE prn_exceptional_sprus;
|
|
FILE_BYTE selftest;
|
|
FILE_BYTE comm_retry;
|
|
//special_reports (SR)
|
|
FILE_BYTE system;
|
|
FILE_BYTE guard_control;
|
|
FILE_BYTE wakeup;
|
|
FILE_BYTE changing_guards;
|
|
//SPRU REPORT (RR)
|
|
FILE_BYTE alarms;
|
|
FILE_BYTE comms;
|
|
FILE_BYTE hardware_faults;
|
|
FILE_BYTE acc_sec;
|
|
//USER _DEFINE (UD)
|
|
FILE_BYTE day_night;
|
|
FILE_BYTE interlock;
|
|
FILE_BYTE oper_option;
|
|
FILE_BYTE access_lines_option;
|
|
} ;
|
|
|
|
enum FILE_SENSORSTATE
|
|
{
|
|
FILE_SS_UNKNOWN = 0x01,
|
|
FILE_SS_NORMAL = 0x02,
|
|
FILE_SS_DISABLE = 0x04,
|
|
FILE_SS_TIMEOUT = 0x08,
|
|
FILE_SS_POSTALARM = 0x10,
|
|
FILE_SS_ALARM = 0x20
|
|
};
|
|
|
|
struct FILE_CONDITION
|
|
{
|
|
FILE_INT nSensor;
|
|
FILE_INT nBitMask; //Selected Bits
|
|
FILE_BOOL bAll; //True if all, false if anyone
|
|
FILE_INT nDelay; //Timeout, second
|
|
FILE_INT nState; //Bit mask: Alarm-0, Normal-1, etc...
|
|
};
|
|
|
|
struct FILE_FILTER
|
|
{
|
|
FILE_INT inputs[MAX_LINKS]; //links to index in "Inputs"
|
|
FILE_INT nInputCount;
|
|
FILE_INT commands[MAX_LINKS]; //links to index in "Commands"
|
|
FILE_INT nCommandCount;
|
|
};
|
|
|
|
struct FILE_COMMAND
|
|
{
|
|
FILE_INT nCommand;
|
|
FILE_INT nAddress;
|
|
FILE_INT nLine;
|
|
};
|
|
|
|
struct FILE_OPTIONS
|
|
{
|
|
FILE_INT nZoomFactor;
|
|
FILE_BOOL bNeedAutorization;
|
|
};
|
|
|
|
struct FILE_PATROL_HEADER
|
|
{
|
|
FILE_CHAR pName[STRING_MAX];
|
|
FILE_INT nCount;
|
|
};
|
|
|
|
struct FILE_PATROL_POINT
|
|
{
|
|
FILE_INT nAddress;
|
|
FILE_INT nBitMask;
|
|
FILE_INT nTime;
|
|
FILE_INT nTolerance;
|
|
};
|
|
|
|
/**************************************
|
|
struct FILE
|
|
{
|
|
int line_count
|
|
FILE_LINE lines[line_count]
|
|
|
|
int device_count
|
|
FILE_DEVICE devices[device_count]
|
|
|
|
int sensor_count
|
|
FILE_SENSOR sensors[sensor_count]
|
|
|
|
int zone_count
|
|
FILE_ZONE zones[zone_count]
|
|
};
|
|
**************************************/
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma pack()
|
|
#else
|
|
#pragma pack()
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|