/* ------------------------------------------------------------------------
*   Module name : defines.js
*   Description : Bitmask definitions used in the webpages that match
*			the application bitmasks.
*		THIS FILE SHOULD ALWAYS MATCH THE BIT DEFINITIONS IN THE SOURCE CODE
*	Author  : JCBlood
*  ------------------------------------------------------------------------
*/

/*
* system software features bitmask definitions
*/
var SYSTEM_GPS =      0x01;	/* GPS enabled */
var SYSTEM_EPOS =     0x02;	/* text - in - images */
var SYSTEM_EMAIL =    0x04;	/* email reporting */
var SYSTEM_SMS =      0x08;	/* SMS server / client */
var SYSTEM_485BUS =   0x10;	/* CBus support */
var SYSTEM_ALM_DIAL = 0x20;	/* remote reporting of alarms */
var SYSTEM_DOWNLOAD = 0x40;	/* automated FTP download */
var SYSTEM_WEBCAM =   0x80;	/* automated webcam uploads */
var SYSTEM_SMBSRV =   0x100;	/* SMB/CIFS server*/
var SYSTEM_ACCEL =    0x200;	/* Accelerator option*/
var SYSTEM_DATA =     0x400;	/* DATA??? TransVu*/
var SYSTEM_IPCAM =    0x800;	/* IP Cameras enabled*/

/*
* supported features bitmask definitions
*/
var FNC_AUDIO =       0x001;	/* audio supported */
var FNC_CBASIC =      0x002;	/* Cbasic supported (not necessarily enabled */
var FNC_POWERMAN =    0x004;	/* power management hardware support */
var FNC_OEM =         0x008;	/* OEM product */
var FNC_PPP =         0x010;	/* PPP enabled */
var FNC_TELEMETRY =   0x020;	/* telemetry enabled */
var FNC_VMD =         0x040;	/* VMD enabled */
var FNC_LOCAL_ALARM = 0x080;	/* on-board alarm inputs */
var FNC_LOCAL_RELAY = 0x100;	/* on-board relay outputs */
var FNC_COMPRESS =    0x200;	/* compression codecs detected */
var FNC_DECOMPRESS =  0x400;	/* decompression codecs detected */
var FNC_100BASE_T =   0x800;	/* hardware support for 100BaseT */
var FNC_SMB_SERVER = 0x1000;	/* Network Neighbourhood support */
var FNC_ACCEL =      0x2000;	/* Accelerometer support */
var FNC_SPOTMON =    0x4000;	/* Hardware spot monitor */

/*
* GPS features
*/
var GPS_TIMED =       0x01	// send SMS messages every n minutes
var GPS_DISTANCE =    0x02	// send SMS messages every n miles
var GPS_ZONE =        0x04	// send SMS messages on Zone change
var GPS_DBASE_ZONE =  0x08	// log zone changes to database

/*
* EMAIL features
*/
var EMAIL_STARTUP = 0x01	// send messages on startup
var EMAIL_ALARM =   0x02	// send SMS messages on alarm
var EMAIL_CAMFAIL = 0x04	// send SMS messages on camera fail
var EMAIL_VMD =     0x08	// send SMS messages every n minutes

/*
* SMS features
*/
var SMS_SERVER =  0x001		// handle received SMS messages & log to disk
var SMS_STARTUP = 0x002		// send SMS messages on startup
var SMS_ALARM =   0x004		// send SMS messages on alarm
var SMS_CAMFAIL = 0x008		// send SMS messages on camera fail
var SMS_VMD =     0x040		// send SMS messages on VMD activation
var SMS_VERBOSE = 0x100		// send verbose SMS messages (to 'phones)

/*
* VMD features
*/
var VMD_LOGGING =      0x001;	// create database entry
var VMD_RATE_CHANGE =  0x002;	// update standard record rate on VMD 
var VMD_ASYNC_CHANGE = 0x004;	// update async record rate on VMD
var VMD_REPORTING =    0x008;	// remote reporting of VMD activation
var VMD_24HR =         0x010;	// 24 hour alarm ie always active
var VMD_STILL =        0x020;	// record still image
var VMD_PROTECT =      0x040;	// protect VMD images
var VMD_PRESET =       0x080;	// drive telemetry camera to preset position
var VMD_RELAY =        0x100;	// close relay on VMD activation
var VMD_AUDIO =        0x200;	// drive audio message on VMD activation
var VMD_ZONE =         0x400;	// create a zone input contact
var VMD_ARCHIVE =      0x800;	// mark VMD alarms for automatic download
var VMD_EMAIL_IMAGE = 0x1000;	// email a VMD image on activation
var VMD_SPOTMON =     0x2000;	// switch spot monitor to VMD camera

/*
* alarm zone features
*/
var ALARM_LOGGING =      0x001;		// create database entry
var ALARM_RATE_CHANGE =  0x002;		// update standard record rate on zone activation
var ALARM_ASYNC_CHANGE = 0x004;		// update async record rate on zone activation
var ALARM_REPORTING =    0x008;		// remote reporting of zone activation
var ALARM_24HR =         0x010;		// 24 hour alarm ie always active
var ALARM_STILL =        0x020;		// record still image
var ALARM_PROTECT =      0x040;		// protect alarm images
var ALARM_PRESET =       0x080;		// drive telemetry camera to preset position
var ALARM_RELAY =        0x100;		// close relay on zone activation
var ALARM_AUDIO =        0x200;		// drive audio message on zone activation
var ALARM_ARCHIVE =      0x400;		// mark zone alarms for automatic download
var ALARM_EMAIL_IMAGE =  0x800;		// email image on alarm activation
var ALARM_SPOTMON =      0x1000;	// switch spot monitor to alarm camera
var ALARM_SYSTEM_SET =   0x8000;	// alarm contact used as system set/unset

/*
* webcam features
*/
var WEBCAM_ALWAYS_ON = 0x01;	// do not break the FTP connection between transfers
var WEBCAM_SEQUENCE =  0x02;	// collect & upload all cameras in one go

/*
*	remote reporting options
*/
var REPORT_ALARM = 	0x01;		// report alarm & VMD activations
var REPORT_CAMFAIL = 	0x02;		// report camera fail / restore events
var REPORT_TAMPER = 	0x04;		// report EOL tamper conditions

