Download as pdf or txt
Download as pdf or txt
You are on page 1of 95

Version 8

Programming Guide
SecurOS Programming Guide (PG - EN, build 64 on 22.09.2015).

© Copyright Intelligent Security Systems, 2015.

Printed in US.

Intelligent Security Systems reserves the right to make changes to both this Manual and to the products it describes. System
specifications are subject to change without notice. Nothing contained within this Manual is intended as any offer, warranty, promise
or contractual condition, and must not be taken as such.

No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system or translated into any human or
computer language in any form by any means without the express written permission of the copyright holder. Unauthorized copying
of this publication may not only infringe copyright but also reduce the ability of Intelligent Security Systems to provide accurate and
up-to-date information to both users and operators.
SecurOS 3 Programming Guide
Contents

Contents
1 Preface 6
1.1 Scope
........................................................................... 6
1.2 Target
. . . Audience
........................................................................ 6
1.3 Using
. . .This
. . . .Manual
.................................................................... 6
1.4 Getting
. . . .Technical
. . . . . . . . .Support
.............................................................. 6
1.5 SecurOS
. . . . . Editions
. . . . . . . .Naming
. . . . . . .Convention
....................................................... 7
1.6 Design
. . . .Convention
....................................................................... 8
1.7 Design
. . . .Elements
....................................................................... 8

2 VB/JScript Module 9
2.1 General
. . . . Features
....................................................................... 9
2.1.1 Supported
. . . JScript
. . . . . . .and
. . . VBScript
. . . . . . . . Engines
................................................................ 9
2.2 Installing
. . . . . . .Module
. . . . . . .Software
............................................................. 10

3 Working with Module 11


3.1 Module
. . . . .Configuration
. . . . . . . . . . . . and
. . . .Interface
...................................................... 11
3.1.1 Module. .Working
. . . . . . . Principles
............................................................................ 11
3.1.2 Creating
. . .and
. . . Configuring
. . . . . . . . . . .VB/JScript
. . . . . . . . . programs
. . . . . . . . .object
.................................................. 11
3.1.3 Creating
. . .and
. . . Configuring
. . . . . . . . . . .VB/JScript
. . . . . . . . . program
. . . . . . . .object
................................................... 11
3.2 Creating
. . . . . .and
. . . .Executing
. . . . . . . . .Scripts
........................................................ 13
3.2.1 JScript. Fundamentals
. . . . . . . . . . . . .for
. . .Novice
. . . . . .Users
.............................................................. 13
3.2.2 How Does
. . . .Script
. . . . . .Work
........................................................................... 13
3.2.2.1 Script Initialization . . . .and
. . .Termination
................................................................... 14
3.2.2.2 Script Special Objects .......................................................................... 15
3.2.2.3 Event Handler Functions.......................................................................... 15
3.2.2.4 Logging .......................................................................... 16
3.2.3 Working. . .with
. . . .Event
. . . . .Parameters
......................................................................... 17
3.2.3.1 Specifics of Event . . . Parameters
. . . . . . . . . .Processing
............................................................. 18
3.2.4 Working. . .with
. . . .Arrays
.............................................................................. 19
3.2.5 Delayed. . Code
. . . . .Execution
.............................................................................. 20
3.2.5.1 Scheduled Actions .......................................................................... 20
3.2.5.2 Execution Delay . .and
. . . Periodical
. . . . . . . . .Actions
............................................................ 21
3.2.6 Handler. .Function
. . . . . . . .Definition
. . . . . . . . .Methods
.................................................................. 21
3.2.7 Working. . .with
. . . .ActiveX
.............................................................................. 22
3.2.7.1 Recording Data. .into . . .Database
..................................................................... 22
3.2.7.2 Sending HTTP.Request ......................................................................... 23
3.2.8 Destroy()
. . .Function
.................................................................................. 23
3.3 SecurOS
. . . . . . Object
. . . . . . Methods
............................................................... 24
3.3.1 Core Object
. . . . . Methods
................................................................................ 24
3.3.1.1 RegisterEventHandler
.......................................................................... 24
3.3.1.2 UnregisterEventHandler
.......................................................................... 25
3.3.1.3 RegisterTimerHandler
.......................................................................... 25
3.3.1.4 UnregisterTimerHandler
.......................................................................... 26
3.3.1.5 GetSelfId .......................................................................... 26
3.3.1.6 RegisterReact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3.1.7 UnregisterReact .......................................................................... 26
3.3.1.8 SendEvent .......................................................................... 27
3.3.1.9 DoReact .......................................................................... 27
3.3.1.10 GetObjectName .......................................................................... 27

www.isscctv.com
SecurOS 4 Programming Guide
Contents

3.3.1.11 GetObjectState.......................................................................... 28
3.3.1.12 GetObjectParam.......................................................................... 28
3.3.1.13 GetObjectParentId
.......................................................................... 28
3.3.1.14 GetObjectParentType
.......................................................................... 29
3.3.1.15 GetObjectIds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.3.1.16 GetObjectChildIds
.......................................................................... 29
3.3.1.17 IsObjectExists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.3.1.18 IsObjectDisabled
.......................................................................... 29
3.3.1.19 IsObjectState. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3.2 Script .Object
. . . . . Methods
............................................................................... 30
3.3.2.1 SetTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3.2.2 ClearTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3.2.3 SetInterval .......................................................................... 31
3.3.2.4 ClearInterval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3.3 Log Object
. . . . .Methods
................................................................................ 31
3.4 Checking
. . . . . . .Script
. . . . . Syntax
............................................................... 32
3.5 Debugging
. . . . . . . .Script
................................................................... 33
3.6 Launching
. . . . . . . .SecurOS
. . . . . . . .in
. .Debug
. . . . . . Mode
................................................... 34
3.7 Script
. . . .Examples
....................................................................... 34
3.7.1 Stopped. . .Vehicles
. . . . . . . Report
........................................................................... 34
3.7.2 Database
. . . Recording
. . . . . . . . . .of. .Recognition
. . . . . . . . . . Results
. . . . . . . for
. . .Wagon
. . . . . . Numbers
............................................ 35
3.7.3 Vehicle. .Speed
. . . . . Measurement
. . . . . . . . . . . . Report
.................................................................. 36

4 Developing HTML Forms 38


4.1 Setting
. . . . .up
. . .HTML
. . . . .Forms
. . . . . .within
. . . . . .SecurOS
.................................................. 38
4.2 _system.js
. . . . . . . .File
................................................................... 38
4.3 window.external.dispSOCoreProvider
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Object
............................................ 39
4.4 IMsgFilter
. . . . . . . Object
. . . . . . Type
.............................................................. 40
4.5 ICoreMsg
. . . . . . .Object
. . . . . .Type
.............................................................. 41
4.6 Sample
. . . . .HTML
. . . . . .Form
................................................................ 42

5 Appendixes 43
5.1 Appendix
. . . . . . .A.
. .VB/JScript
. . . . . . . . . .Program
. . . . . . . .Object
. . . . . .Events
.......................................... 43
5.2 Appendix
. . . . . . .B.
. . SecurOS
. . . . . . . . Objects
. . . . . . . Events
. . . . . . .and
. . . .Commands
. . . . . . . . . .Reference
.............................. 43
5.2.1 Core Subsystem
..................................................................................... 43
5.2.1.1 System .......................................................................... 43
5.2.1.2 User account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.2.1.3 Computer .......................................................................... 44
5.2.1.4 Region .......................................................................... 47
5.2.2 Interface
. . .Subsystem
.................................................................................. 47
5.2.2.1 Desktop .......................................................................... 47
5.2.2.2 Map Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.2.2.3 Event Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.2.2.4 HTML Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2.2.5 HTML Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2.3 Video Subsystem
..................................................................................... 49
5.2.3.1 Video Capture .Device
......................................................................... 50
5.2.3.2 Camera .......................................................................... 50
5.2.3.3 Zone .......................................................................... 58
5.2.3.4 Light Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.2.3.5 Zone Object Detector
.......................................................................... 59
5.2.3.6 PTZ Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.2.3.7 Archive Converter
.......................................................................... 64
5.2.3.8 Archiver .......................................................................... 67

www.isscctv.com
SecurOS 5 Programming Guide
Contents

5.2.3.9 Monitor .......................................................................... 68


5.2.3.10 Media Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.2.3.11 Image Processor
.......................................................................... 75
5.2.3.12 Edge Storage.Sync
......................................................................... 80
5.2.4 Audio Subsystem
..................................................................................... 80
5.2.4.1 Microphone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.2.4.2 Audio Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.2.5 I/O Subsystem
..................................................................................... 82
5.2.5.1 Sensor .......................................................................... 82
5.2.5.2 Relay .......................................................................... 85
5.2.6 Notification
. . . . . Subsystem
................................................................................ 87
5.2.6.1 E-mail Message .......................................................................... 87
5.2.6.2 Short Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.2.6.3 Audible Notification
. . . . Service
...................................................................... 88
5.2.7 Automation
. . . . . Subsystem
................................................................................ 88
5.2.7.1 Time Zone .......................................................................... 88
5.2.7.2 Macro .......................................................................... 89
5.2.7.3 CellBox .......................................................................... 89
5.3 Technical
. . . . . . .Support
. . . . . . . .Information
............................................................ 90

Index 92

www.isscctv.com
SecurOS 6 Programming Guide
Preface

1 Preface
This section contains general information about this document, the means of its design and use, as well
as how to get additional technical support for the product.

1.1 Scope
This manual focuses on SecurOS security system programming in VBScript and JScript programming
languages using implemented SecurOS's VB/ JScript program object. A SecurOS' object methods,
available for use in scenarios are described in this manual. It also contains description of the specific
VB/ JScript program object events and events and commands of the SecurOS' subsystem objects.

It is assumed that the user have already deployed the security network physically and installed
SecurOS software on all computers of this network.

1.2 Target Audience


We have designed this guide particularly for SecurOS programmers. It is assumed the user has practical
experience with TCP/IP networking, VBScript/JScript programming and general CCTV knowledge
and overview.

1.3 Using This Manual


This document is organized as a book, so the user can print it or use the electronic version. In the latter
case one can use the Adobe Reader’s Bookmarks feature as well as cross-reference hyperlinks to
navigate through content. In several topics this manual refers to other SecurOS manuals (SecurOS
Administration Guide etc.). One can find these manuals as separate files on the SecurOS installation
CD or download them from our website (www.isscctv.com).

1.4 Getting Technical Support

If you have any questions after reading this manual, please address them to your system administrator
or supervisor.

For any further information you can contact the Intelligent Security Systems Technical Support Team:

in USA:
phone: +1 732 855 1111 (Monday to Friday, 8:30am - 6pm EST);
e-mail: support@isscctv.com
in Russia:
phone: +7 (495) 645 21 21 (Monday to Thursday, 9am - 6pm MST; Friday 9am - 5pm MST);
e-mail: support@iss.ru

www.isscctv.com
SecurOS 7 Programming Guide
Preface

in Brazil:
phone: +55 11 2262 2894 (Monday to Friday, 9am - 6pm BRT);
e-mail: suporte@isscctv.com
in Mexico:
phone: +52 1 551330 0181 (Monday to Friday, 9am - 6pm CDT);
e-mail: supportlatam@isscctv.com
in Colombia/Ecuador:
phone: +57 300 442 2808 (Monday to Friday, 9am - 6pm COT/ECT);
e-mail: supportlatam@isscctv.com
in Chile:
phone: +56 9 6573 2993 (Monday to Friday, 9am - 6pm CLT);
e-mail: supportlatam@isscctv.com
in Ukraine:
phone: +38 (044) 238 24 83 (Monday to Friday, 9am - 6pm EET);
e-mail: support@isscctv.com.ua
in Peru/Bolivia:
phone: +51 997 111 678 (Monday to Friday, 9am - 6pm PET/BOT);
e-mail: supportlatam@isscctv.com
in Argentina:
phone: +54 91152528779 (Monday to Friday, 9am - 6pm ART);
e-mail: supportlatam@isscctv.com

To solve problems faster, we recommend preparing the service information described in the Technical
Support Information Section before addressing the Technical Support Team.

1.5 SecurOS Editions Naming Convention


This document represents a common manual for several editions of the "SecurOS security system" that
differ in functional capabilities:

SecurOS Monitoring & Control Center;


SecurOS Enterprise;
SecurOS Premium;
SecurOS Prof essional;
SecurOS Xpress;
SecurOS Lite.

For product designation regardless of its edition the SecurOS general term is used in the framework of
the given document.

Sections that describe the functionality available for some editions are marked by a special footnote as
in the example below:

www.isscctv.com
SecurOS 8 Programming Guide
Preface

The functionality is available in the following editions: SecurOS Monitoring & Control Center,
SecurOS Enterprise, SecurOS Premium, SecurOS Prof essional, SecurOS Xpress, SecurOS Lite.

1.6 Design Convention


For representation of various terms and titles the following fonts and formatting tools are used in this
document.

Font Description

Used in writing workstation names, utilities or screens, windows


bold type and dialog boxes as well as the names of their elements (GUI
elements).

italic type Used to mark out the SecurOS objects.

bold italic type Used to mark out the elements of homogeneous lists.

Used to mark out macro text and programming code, file names and
monospace their paths. Also it is used to specify the necessary options, to mark
out values specified by the user from the keyboard (manually).

Used to mark out the cross-references within the document and


green
links to the external available ones.

1.7 Design Elements


Warning! Serves to alert the user to information which is necessary for the correct perception of the text set
out below. Typically, this information has a warning character.

Note. Note text in topic body.

Additional Information
Used to display additional information. These type of elements contain, for example, the description of options for
executing a task or reference to additional literature.

www.isscctv.com
SecurOS 9 Programming Guide
VB/JScript Module

2 VB/JScript Module
This section contains general description of the VB/JScript Module.

2.1 General Features


The VB/JScript Module (Module below) is intended for composition and functional configuration of
VBScript and JScript scripts within the SecurOS system.
Module provides:
SecurOS event processing;
SecurOS object control;
SecurOS object configuration control means;
ActiveX components usage, including:
File system operations.
Database communication.
Sending HTTP requests etc.
User-friendly environment for working with scripts (developer’s studio).

For details on scenario programming languages see:


VBScript — VBScript Language Reference (http:/ / msdn.microsoft.com/ en-us/ library/ d1wf56tt.aspx)
JScript — JScript Language Reference (http:/ / msdn.microsoft.com/ en-us/ library/ yek4tbz0
(VS.85).aspx)

Before you begin, it is recommended for novice users to get acquainted with the fundamentals of the
language JScript (see https:/ / msdn.microsoft.com/ en-us/ library/ 6974wx4d(v=vs.94).aspx).

2.1.1 Supported JScript and VBScript Engines

VB/JScript Module is designed to work with Microsoft jscript.dll and vbscript.dll libraries of
version 5.8, that are installed by operation systems supported by SecurOS (see SecurOS
Administration Guide).

To learn versions of the libraries installed in your operation system you can use the following scenarios:

Listing 1. Getting jscript.dll library version (JScript language)

function Init()
{
Log.Trace("JScript version: "+ ScriptEngineMajorVersion() + "."
+ ScriptEngineMinorVersion() + "." + ScriptEngineBuildVersion());
}

www.isscctv.com
SecurOS 10 Programming Guide
VB/JScript Module

Listing 2. Getting vbscript.dll library version (VBScript language)

Sub Init
Log.Trace "VBScript version: "& ScriptEngineMajorVersion() & "."
& ScriptEngineMinorVersion() & "." & ScriptEngineBuildVersion()
End Sub

2.2 Installing Module Software


Module software is installed automatically when installing SecurOS system software.

www.isscctv.com
SecurOS 11 Programming Guide
Working with Module

3 Working with Module


This section describes the procedures for configuring and working with the Module.

3.1 Module Configuration and Interface


This section provides a description of the Module interface and Module settings.

3.1.1 Module Working Principles

The Module work is determined by the VB/ JScript program object (see below). The Module object
settings window is a text editor window containing script settings and VBScript or JScript languages
script text. The Module’s configuration consists of selecting a certain time zone so the script runs within
this period of time in the background. If an error occurs during script execution, then the Module
generates an event (see Appendix A. VB/ JScript Program Object Events).

3.1.2 Creating and Configuring VB/JScript programs object

This object has no configurable parameters and is used to group module objects.

Parent object — Computer.

To create and configure the VB/ JScript programs object do the following:
1. Enter the administration mode.
2. Select the Computer object in the SecurOS Object Tree, then create a VB/ JScript programs child object.
Set required values in the Parameters of created object window (here and hereinafter is not
presented).
3. Apply new settings.

3.1.3 Creating and Configuring VB/JScript program object

This object contains the script’s settings interface as well as the programmer developing interface for
scripting.

Parent object — VB/ JScript programs.

www.isscctv.com
SecurOS 12 Programming Guide
Working with Module

Figure 1. VB/ JScript program object settings window

To create and configure the VB/ JScript program object do the following:
1. Enter administration mode.
2. Select the VB/ JScript programs object in the SecurOS Object Tree, then create the VB/ JScript program
child object. Set required values in the Parameters of created object window (here and hereinafter is
not presented).
3. In the object settings window set object parameters.
4. Create scenario (see Creating and Executing Scripts) and check its correctness (see Checking Script
Syntax).
5. To exit the script configuration window click the Setup button on the administrator toolbar or OK
button in the settings window.

Note. To close settings window with rejecting changes click the Cancel button.

www.isscctv.com
SecurOS 13 Programming Guide
Working with Module

3.2 Creating and Executing Scripts


All standard objects, functions and methods of the VBScript/JScript languages can be used within the
Module scripts (see JavaScript Reference web-site to get detailed information).

To create a script and configure its execution do the following:


1. Create a VB/ JScript program object. Designate it by the future script name, as the object will contain
script text.
2. Choose the script language (VBScript or JScript).
3. Type the script text within the Module window. Check script syntax, if necessary (see Checking
scripts).
4. Select time zone from the drop-down list. The script will be executed when the selected time zone is
active.

3.2.1 JScript Fundamentals for Novice Users

Before you begin, it is recommended for novice users to get acquainted with the fundamentals of the
JScript language (see https:/ / msdn.microsoft.com/ en-us/ library/ 6974wx4d%28v=vs.94%29.aspx).

3.2.2 How Does Script Work

Scripts are designed to automate working with SecurOS events and objects. They can be used to process
messages and perform various actions within the system.

Depending on assigned task different methods of VB/JScript are invoked. Example below illustrates
scenario, that automatically arms all cameras within the system according to schedule, specified in Time
Zone object settings.

Listing 3. Elemental JScript scenario

// initialize JScript scenario


function Init()
{
// register event handler function for
// Time Zone object with id=1.1 activation event
Core.RegisterEventHandler("TIME_ZONE", "1.1", "ACTIVATE",
ArmAllCameras);
};
// initialize event handler function
function ArmAllCameras(e)
{
// when time zone activation event occurs
// save "Timezone activated." string into log file
Log.Info("Timezone activated.");
// when time zone activation event occurs
// arm all cameras within system
Core.DoReact("CAM", "*", "ARM");
}

www.isscctv.com
SecurOS 14 Programming Guide
Working with Module

This example shows the basic structure of the program. Init() function is used to initialize scenario
and executes its code immediately after VBJScript program object settings are applied/object is enabled/
SecurOS is started (see Script Initialization and Termination section).

RegisterEventHandler method of the Core object (see Event Handler Functions section) is used to
declare custom event handler function. This function will be called if event, specified by first three
parameters of the method, will occur within the system.

Custom event handler function invokes the Info method of the Log object, that is intended to record
custom information into the log file/debug window (see Logging section). Log object methods help to
monitor correctness of the scenario execution, and also to detect errors when scenario is being created.

DoReact method of the Core object (see Script Special Objectssection) sends specified command to
specified objects within the system Command and object are specified in method parameters. In
example above an arm command is sent to all cameras within the system.

3.2.2.1 Script Initialization and Termination


Standard Init() and Destroy() functions can be used in script texts.

Every VB/JScript scenario can contain the Init() function. This function is called immediately after
scenario is started. Scenario is started in the following cases:
User changed settings or code of the scenario and applied new settings (if Time Zone specified in
scenario settings is active);
When Time Zone, specified in scenario setting, starts;
When SecurOS starts;
Init() function is used to initialize variables and call procedures, required to start working. For
example, in function code one can register event handler functions and timer functions (see sections
Event Handler Functions and Delayed Code Execution).

Note. Script global variables are initialized repeatedly every time the time zone rules are reactivated or after
script settings change.

Scenario terminates in the following cases:


User changed settings or code of the scenario and applied new settings. Before scenario will be
restarted with new settings, scenario with old settings will be terminated;
Scenario Time Zone is terminated;
Scenario is stopped when user temporarily disabled VB/ JScript program object with the Disable
command (see SecurOS Administration Guide);
The VB/ JScript program object is deleted from the SecurOS Object Tree.

When scenario is terminated, then all resources, that were used in scenario, are automatically
deallocated:
connections to the databases are closed (ADODB.Connection object);
files are closed (Scripting.FileSystemObject object);
scenario variables are destroyed.

www.isscctv.com
SecurOS 15 Programming Guide
Working with Module

In some cases it is necessary to perform specific actions to terminate scenario. For example, copy or
delete temporary files or record information into the database, etc. In such a cases a Destroy()
method is used, that, if it was defined within scenario code, is call every time before scenario
termination.

Note. Use of Destroy() method in scenario is optional. In most cases all resources will be deallocated
automatically at scenario termination.

3.2.2.2 Script Special Objects


The following special objects can be used in scenario code:
Core — has a methods to execute the following operations (see Core Object Methods section):
receive information about SecurOS objects;
execute commands, predefined for the SecurOS objects;
subscribe for SecurOS object events;
configure task scheduler.
Script — has an additional methods used in scenarios (see Script Object Methods section).
Log — has a methods to output messages into the Module log file (see Log Object Methods section).

SecurOS object events and commands are described below (see Appendix 2. SecurOS Objects Events
and Commands Reference).
Sample scripts for some problem solving scenarios can be found in Script Examples.

3.2.2.3 Event Handler Functions

Event handler f unction — function, that will be called when some event will occured within SecurOS
system. To register event handler function the RegisterEventHandler method of the Core object
(see Core Object Methods) is used. Event handler function can be defined with several ways
(see Handler Function Definition Methods). The only argument of the handler function is an "Event"
object with the following properties: type (sourceType) and identifier (sourceId) of the SecurOS
object (i.e. source of the processed event), name (action) and all parameters of the SecurOS object
event.

For example, to handle the CAR_IS_OUT_OF_LANES event, received from the SecurOS Auto Module's
Logic module (sourceType=LPR_LOGIC), whose id is 1 (sourceId=1), it is necessary to register the
handler function:

Core.RegisterEventHandler ("LPR_LOGIC", 1, "CAR_IS_OUT_OF_LANES",


OnCarIsOutOfLanes);

where OnCarIsOutOfLanes — handler function of the CAR_IS_OUT_OF_LANES event (see SecurOS


Auto User Guide).

To get event parameter value use the property of the same name of the "Event" object, for example:

function OnCarIsOutOfLanes(f)
{
var value1=f.recognizer_type;

www.isscctv.com
SecurOS 16 Programming Guide
Working with Module

var value2=f.recognizer_id;
var value3=f.recognizer_name;
var value4=f.number;
var value5=f.logic_id;
var value6=f.best_view_time;
}

3.2.2.4 Logging
Logging is performed by the Log object (see Log Object Methods) that output custom messages both
into the log-file of the VB/ JScript program object and debug window of the VB/ JScript program object
settings interface window. Log file is created in the SecurOS root directory in the Logs folder and is
similar to other SecurOS log files. File name is generated automatically in VbjScript.id.log format,
where id — identifier of the appropriate VB/ JScript program object in the SecurOS Object Tree.

Object has some methods to output data into the log file. All these methods are similar and differ only
by log level name (see Log Object Methods):
Trace;
Debug;
Info;
Warn;
Error;
Fatal.

Levels are intended for more convenient and informative data representation in the log file/debug
window.

Debug window is used when it is necessary to get script operation results operatively. When script
settings are changed or object enabled/disabled, then all information, displayed in the debug window,
is deleted.
Besides custom messages, the script syntax errors and run-time errors are output in the debug window.

Note. Debug window displays maximum 300 messages. If this amount of messages is exceeded, the oldest
message is deleted, a new message is placed at the end of the list.

Example of the information displayed in the debug window is illustrated in Figure 2.

www.isscctv.com
SecurOS 17 Programming Guide
Working with Module

Figure 2. Output information in debug window

Warning! The information is displayed in the debug window only on the computer that is running the script.

3.2.3 Working with Event Parameters

Each SecurOS event has a mandatory and optional parameters. The mandatory parameters are:
sourceType — type of the SecurOS object, that generated event;
sourceId — identifier of the SecurOS object, that generated event;
action — event name.

Set of an optional parameters is defined by type of the SecurOS object.

Note. SecurOS object events are described below (see Appendix 2. SecurOS Objects Events and Commands
Reference). Events of the objects of the intelligent Modules (SecurOS Auto, SecurOS Transit, etc.) are
described in appropriate Manuals.

Object of the SecurOS event is passed into event handler function as a parameter. To get event
parameter value use the property of the same name.

Example below illustrates script, that process an event of motion detection and export a frame, where
moving object, framed with colored rectangle, is displayed.

www.isscctv.com
SecurOS 18 Programming Guide
Working with Module

Listing 4. Working with event parameters (JScript language)

function Init()
{
// register event handler function to process EVENT
// event generated by any camera within system
Core.RegisterEventHandler("CAM", "*", "EVENT", ExportFrame);
};
// initialize event handler function,
// that returns EVENT event parameter set
function ExportFrame(e)
{
// once EVENT event is generated
// export a frame for appropriate camera by sending
// Image Processor with id 1 an EXPORT command
Core.DoReact("IMAGE_EXPORT", "1", "EXPORT",
// assign "time" parameter of the EXPORT command date and time
// values of EVENT event, cam parameter - identifier of camera,
// for which EVENT event is occurred
"import", "cam$" + e.sourceId + ";time$" + e.date + " " + e.time,
"export_engine", "file",
"export", "filename$" + "Event" + ";dir$c:\\test",
// draw a rectangle frame from TrackingKitII
"export_image", "format$jpg;quality$100","process",e.vizualization);
}

In given example event handler function is used to get the following event parameters and pass them
into frame export command:
e.sourceId — identifier of the Camera object, for which an EVENT event is occurred (assigned cam
parameter of the EXPORT command);
e.date — date of the EVENT event (assigned time parameter of the EXPORT command);
e.time — time of the EVENT event (assigned time parameter of the EXPORT command);
e.vizualization — coordinates of the frame line, that is drawn on the frame by TrackingKit II
Module.

3.2.3.1 Specifics of Event Parameters Processing


Normally, to get an object property (i.e. event parameter) the event.property_name syntax is used.
However, if the property name includes "." (dot) character, then the property name should be enclosed
in square brackets: event.[property_name] when using VBScript or event
["property_name"] when using JScript.

If names of the optional parameters concur with the names of the mandatory parameters, one must use
the "@" prefix to get optional parameter value.

For example, if the following event appeared within the system:

Event: CAM|7|CUSTOM_EVENT|action<move_camera>,sourceId<number_one>,
sourceType<camera_mover>

then to get it parameters you can use the following way:

www.isscctv.com
SecurOS 19 Programming Guide
Working with Module

Listing 5. Getting mandatory and optional event parameters

function onEventHandler(event){
// *** Getting mandatory parameters
// learn type of the event source object
// will assign variable "CAM" value
var objectType = event.sourceType;
// learn identifier of the event source object
// will assign variable "7" value
var objectId = event.sourceId;
// will assign variable "CUSTOM_EVENT" value
var eventName = event.action;

// *** Getting optional parameters

// will assign variable "move_camera" value


var actionFromEvent = event["@action"];
// will assign variable "camera_mover" value
var sourceTypeFromEvent = event["@sourceType"];
// will assign variable "number_one" value
var sourceIdFromEvent = event["@sourceId"];
}

3.2.4 Working with Arrays

VB/Jscript Module has a methods, that return string array as VBArray object (see https://
msdn.microsoft.com/library/ie/y39d47w8%28v=vs.94%29.aspx/). If JScript programming language is
used to create scenario, such array must be converted into JavaScript array before it can be accessible.

Example below illustrates scenario, that is used to check what system cameras are armed and what are
not. Checking results are output into the log file.

Listing 6. Working with arrays

function Init()
{
Core.RegisterEventHandler("MACRO", "1.1", "RUN", CheckArmedCams);
}

function CheckArmedCams() {
// variables to access array elements
var armedCams = [];
var disarmedCams = [];
// record all security system camera identifiers into array
var cams = Core.GetObjectIds("CAM").toArray();
// iterate through an array to search armed cameras
for (var i = 0; i < cams.length; i++) {
if (Core.GetObjectState("CAM", cams[i]) == "ARMED")
armedCams.push(cams[i]);
};

// iterate through an array in other way to search disarmed cameras


for (var cam in cams) {
if (Core.GetObjectState("CAM", cam) != "ARMED")
disarmedCams.push(cam);
};

www.isscctv.com
SecurOS 20 Programming Guide
Working with Module

// output identifiers of armed cameras into log file


Log.Info("Armed cams: " + armedCams);
// output identifiers of disarmed cameras into log file
Log.Info("Disarmed cams: " + disarmedCams);
}

In this example the toArray() method is used to convert initial VBArray array into standard JScript
array. Once array is converted, it can be accessible with JScript programming language means.

In the next procedure camera identifiers of the converted array are looped in for cycle to check camera
state: if camera is armed or disarmed. Then, the push method is used to populate user created array
with camera identifiers. This array later is output into the log file as a message, that contains a list of the
camera identifiers.

3.2.5 Delayed Code Execution

To execute some code at specified time-intervals a timer functions are used. Timer function can call
event handler function in the following cases:
at the specified time;
when specified timeout is expired;
in accordance with specified schedule.

To specify code execution conditions the SetTimeout and SetInterval methods of the Script
object (see Execution Delay and Periodical Actions section) are used, and also the
RegisterTimerHandler method of the Core object (see Scheduled Actions).

3.2.5.1 Scheduled Actions


Timer function, that is called in accordance with specified schedule, is registered with the
RegisterTimerHandler method of the Core object. The timer function programming code is placed into
the script main text. The timer function has no arguments.

Listing 7. Scheduled actions

. . .
function Init(){
Core.RegisterTimerHandler("*","*","23","30","0",OnTimer);
}
. . .
function OnTimer(){
. . .
}
. . .

function OnTimer(), described in example above, will be called every day at 11:30 p.m.

www.isscctv.com
SecurOS 21 Programming Guide
Working with Module

3.2.5.2 Execution Delay and Periodical Actions


Script object methods call timer function after a specified once (see SetTimeout) or regularly
(see SetInterval).

Listing 8. Delayed code execution

function Init()
{
// arm all cameras command
// is delayed for 1000 ms
Script.SetTimeout('Core.DoReact("CAM","*","ARM");', 1000);
};

In given example execution of the Core.DoReact("CAM","*","ARM") expression will be started in


1000 ms after scenario starts.

3.2.6 Handler Function Definition Methods

Event handler functions (callback-functions) — functions, that are implemented in script body, but are
called by VB/JScript Module when some event is occurred. Event handler functions are passed as a
parameters into the following methods of the Core object:
RegisterEventHandler;
RegisterTimerHandler;
and following methods of the Script object:
SetTimeout;
SetInterval.
The following objects can be used as event handler function:
anonymous function, declared "at place" (example 1);
previously declared function (example 2);
javascript-expression (example 3).

Listing 9. Types of the event handler functions

var n = 0;

function Init() {
Script.SetTimeout(function () {
Log.Trace("1. Anonymous event handler function,
declared "at place". n=", ++n);
}, 200);

Script.SetTimeout(callback, 400);

Script.SetTimeout("Log.Trace('3. Event handler function,


represented by expression. n=',
++n)", 600);
}
function callback() {
Log.Trace("2. Calling previously declared
event handler function. n=", ++n);
}

www.isscctv.com
SecurOS 22 Programming Guide
Working with Module

3.2.7 Working with ActiveX

An ActiveXObject object is used to embed ActiveX controls into the SecurOS's scripts. This object is used
to create instances of OLE Automation objects in Internet Explorer on Windows operating systems.

Note. For more information about ActiveXObject object see https://msdn.microsoft.com/library/


ie/7sw4ddf8%28v=vs.94%29.aspx/.

3.2.7.1 Recording Data into Database


Example below illustrates how to record into the SecurOS database the vehicle license plate and
country code, recognized by SecurOS Auto Module.

Listing 10. Recording into database

var DBConnection;
var DBRecordset;
function Init()
{
//Create an ActiveX object to conect to DB
DBConnection = new ActiveXObject("ADODB.Connection");
//Specify DB connection string parameters
//(based on custom DSN)
DBConnection.ConnectionString = "DSN=PostDB;UID=postgres;PWD=postgres";
//Open connection using specified connection string parameters
DBConnection.Open();

//Create an ActiveX object to work with DB


DBRecordset = new ActiveXObject("ADODB.Recordset");
//Open DB table for edit,
//using DBConnection
DBRecordset.Open('select * from "table"', DBConnection, 3, 3);
Core.RegisterEventHandler("LPR_CAM", "*", "CAR_LP_RECOGNIZED",
OnCarRecognized);
}

function OnCarRecognized(e)
{
//Add new record into DB and make it current
DBRecordset.AddNew();
//Add values into specified table fields
DBRecordset.Fields("number") = e.number;
DBRecordset.Fields("country") = e.template_country_name;
//Save changes of the current table record
DBRecordset.Update();
}

SecurOS Auto Module data are received by custom event handler function, which also used to record
information into the database. Standard Microsoft ADODB library is used to connect to the database
and save data into (see https://msdn.microsoft.com/en-us/library/windows/desktop/ms675532%
28v=vs.85%29.aspx).

www.isscctv.com
SecurOS 23 Programming Guide
Working with Module

3.2.7.2 Sending HTTP Request


Example below illustrates sending streaming data into SecurOS. HTTP POST-request is used to send
data. Request body contains xml-file, that contains recognized vehicle license plate accompanied with
date and time of it best viewing, defined by SecurOS Auto Module. Data transferring into SecurOS is
provided by Http Event Gate object.

Note. Detailed description of the Http Event Gate object and custom HTTP-requests is represented in SecurOS
Administration Guide.

Listing 11. Sending HTTP-request

var url = "http://127.0.0.1:9050/event?id=777";

function Init()
{
Core.RegisterEventHandler("LPR_CAM", "*", "CAR_LP_RECOGNIZED",
postHttpRequest);
}

function postHttpRequest(e) {
//Create ActiveX object to send XML using HTTP
var HTTP = new ActiveXObject("Msxml2.ServerXMLHTTP.3.0");
//Create XML on the base of event parameters
var XML = "<root><node1>"+e.number+"</node1><node2>"
+e.best_view_date_time+"</node2></root>"
//Open specified url to transmit POST-request
HTTP.open("POST", url, false);
//Send XML
HTTP.send(XML);
//Request an answer
var response = HTTP.responseXML;
Log.Trace(response);
}

SecurOS Auto Module data are received by custom event handler function, which also used to create
XML document. Standard Microsoft ServerXMLHTTP library (see https://msdn.microsoft.com/en-us/
library/ms762278%28v=vs.85%29.aspx) is used to initialize and send HTTP request.

3.2.8 Destroy() Function

Example below illustrates use of Destroy() function, that contains the following commands
terminating scenario operations (see Script Initialization and Termination section):

recording a message into log file of the VB/ JScript program object using Info() method of the Log
object;
deleting previously created file using DeleteFile() method of the
Scripting.FileSystemObject object.

Listing 12. Using Destroy function

var fso;
var path = "c:\\test.txt";

www.isscctv.com
SecurOS 24 Programming Guide
Working with Module

function Init() {
//Create an ActiveX object to work with file system
fso = new ActiveXObject("Scripting.FileSystemObject");
// Create file
file = fso.CreateTextFile(path, true);
// Output string into the file
file.WriteLine("This is a test.");
};

function Destroy() {
Log.Info("Script destroying...");
fso.DeleteFile(path);
};

Note. For more information about FileSystemObject object see https://msdn.microsoft.com/en-us/


library/aa242706%28v=vs.60%29.aspx.

3.3 SecurOS Object Methods


Methods of the SecurOS object accessible from the Module VB/JScript scenarios are described in this
section:
Core Object Methods;
Script Object Methods;
Log Object Methods.

3.3.1 Core Object Methods

Methods of the Core object accessible from the Module VB/JScript scenarios are described in this
section.

3.3.1.1 RegisterEventHandler

Syntax: RegisterEventHandler (sourceType, sourceId, action, handler)

Description: Registers a function to be called when the specified event of the specified object
occurs.

Parameters:

sourceType SecurOS object type identifier

sourceId SecurOS object identifier (number) with type type

action SecurOS event name with type type

Event handler function name.


handler
Warning! A handler function has a single argument, that describes event
parameter set (see Working with Event Parameters).

Return value:

www.isscctv.com
SecurOS 25 Programming Guide
Working with Module

Event identifier. Is used in UnregisterEventHandler method to cancel


event subscription.

Note. "*" value for sourceId, action parameters correspond to all their possible values (identifiers of all
accessible system objects and their events). For example, if "*" value is set for an object identifier then the
handler function will process the given events of all objects with sourceType type.

3.3.1.2 UnregisterEventHandler

Syntax: UnregisterEventHandler (id)

Description: Cancels an event subscription specified by id identifier returned by the


RegisterEventHandler function.

Parameters:

id Event identifier, returned by the RegisterEventHandler function.

3.3.1.3 RegisterTimerHandler

Syntax: RegisterTimerHandler (W, D, H, M, S, handler)

Description: Registers a schedule to call the handler function.

Parameters:

W Day of a week (0 — Monday,. . . , 6 — Sunday)

D Data with format DD-MM-YYYY

H Hours

M Minutes

S Seconds

handler Timer function name

Return value:

Schedule identifier. Is used in UnregisterTimerHandler method to cancel


function call by schedule.

Note. "*" value for W, D, H, M, S parameters correspond to all their possible values (any date, hour etc.). For
example, if "*" value is set for W parameter then the timer function will be called in any day of a week.

Warning! This method is obsolete, not recommended to use and will be deleted in the next SecurOS releases.
Instead of method use it is recommended to create a schedule with the help of Time Zone object and, further,
subscribe for it events.

www.isscctv.com
SecurOS 26 Programming Guide
Working with Module

3.3.1.4 UnregisterTimerHandler

Syntax: UnregisterTimerHandler (id)

Description: Cancels an function call by schedule, specified by id identifier returned by the


RegisterTimerHandler function.

Parameters:

id Schedule identifier, returned by the RegisterTimerHandler function.

3.3.1.5 GetSelfId

Syntax: GetSelfId

Description: Returns identifier of the current VB/ JScript program object.

Parameters: none

Return value:

Identifier of the current VB/ JScript program object in the SecurOS.

3.3.1.6 RegisterReact

Syntax: RegisterReact (action,handler)

Description: Registers an action command for the current VB/ JScript program object. Once a
command is registered it become accessible both from within a current script and other scripts and
can be called by using the Core.DoReact method.

Parameters:

action Command name

Name of the event handler function to process an action command, that


will be called if request to perform specified command will generated.
handler
Warning! A handler function has a single argument, that describes command
parameter set similarly to event parameters set (see Working with Event
Parameters).

Return value:

Command identifier. Is used in UnregisterReact method to cancel the


command registration.

3.3.1.7 UnregisterReact

Syntax: UnregisterReact (id)

www.isscctv.com
SecurOS 27 Programming Guide
Working with Module

Description: Cancels an command subscription specified by id identifier returned by the


RegisterReact function.

Parameters:

id Command identifier, returned by the RegisterReact function.

3.3.1.8 SendEvent

Syntax: SendEvent (type, id, event[, param1, value1[, param2, value2


[,. . .]]])

Description: Send the event with stated values of parameters into SecurOS system on behalf of a
given object.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

event SecurOS event name with type type


param1, param2, . The event event parameter names (number of parameters is unlimited)
. .
value1, value2, . Values of corresponding parameters
. .

3.3.1.9 DoReact

Syntax: DoReact (type, id, action[, param1, value1[, param2, value2


[,. . .]]])

Description: Send the SecurOS execution command with given parameters into the SecurOS system
on behalf of a given object.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

action Name of the command that is sent to a SecurOS object with type type
param1, param2, . Parameter names (number of parameters is unlimited)
. .
value1, value2, . Values of corresponding parameters
. .

3.3.1.10 GetObjectName

Syntax: GetObjectName (type, id)

www.isscctv.com
SecurOS 28 Programming Guide
Working with Module

Description: Get the object name. Returned value type: String.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

3.3.1.11 GetObjectState

Syntax: GetObjectState (type, id)

Description: Get the object state on the Map. Returned value type: String.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

3.3.1.12 GetObjectParam

Syntax: GetObjectParam (type, id, param)

Description: Get the object parameter value. Returned value type: String.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

param Object parameter name with type type

3.3.1.13 GetObjectParentId

Syntax: GetObjectParentId (type, id, parent)

Description: Get an identifier of the parent object from the given object type and identifier. If
parent parameter is absent then return first level parent object data (the given object is a child
object relative to returned one). Returned value type: String.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

parent Parent object type. Optional parameter

www.isscctv.com
SecurOS 29 Programming Guide
Working with Module

3.3.1.14 GetObjectParentType

Syntax: GetObjectParentType (type)

Description: Get first level parent object type from the given object type (the given object is a child
object relative to returned one). Returned value type: String.

Parameters:

type SecurOS object type identifier

3.3.1.15 GetObjectIds

Syntax: GetObjectIds (type)

Description: Get a list of all object identifiers with the given object type. Returned value type:
String array (VBArray object).

Parameters:

type SecurOS object type identifier

3.3.1.16 GetObjectChildIds

Syntax: GetObjectChildIds (type, id, childtype)

Description: Get a list of identifiers of child objects with childtype type related to the given
object. Returned value type: String array (VBArray object).

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

childtype Child object type.

3.3.1.17 IsObjectExists

Syntax: IsObjectExists (type, id)

Description: Check if the object with the given name exists. Returned value type: Logical.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

3.3.1.18 IsObjectDisabled

Syntax: IsObjectDisabled (type, id)

www.isscctv.com
SecurOS 30 Programming Guide
Working with Module

Description: Check if the object is disabled. Returned value type: Logical.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

3.3.1.19 IsObjectState

Syntax: IsObjectState (type, id, state)

Description: Check if the object is in the given state. Returned value type: Logical.

Parameters:

type SecurOS object type identifier

id SecurOS object identifier (number) with type type

state Specified name of the object state with type type

3.3.2 Script Object Methods

Methods of the Script object accessible from the Module VB/JScript scenarios are described in this
section.

3.3.2.1 SetTimeout

Syntax: SetTimeout (expression, timeout)

Description: Evaluates an expression program string after timeout milliseconds. Return an


identifier.

Parameters:

expression Program string in the current script programming language

timeout Time (in milliseconds)

3.3.2.2 ClearTimeout

Syntax: ClearTimeout (id)

Description: Cancels a timeout of program string evaluation specified by id identifier returned


from the SetTimeout function.

Parameters:

id Identifier returned by SetTimeout

www.isscctv.com
SecurOS 31 Programming Guide
Working with Module

3.3.2.3 SetInterval

Syntax: SetInterval (expression, interval)

Description: Evaluates an expression program string every interval milliseconds. Return an


identifier.

Parameters:

expression Program string on the current script programming language

interval Time (in milliseconds)

3.3.2.4 ClearInterval

Syntax: ClearInterval (id)

Description: Cancels a periodical program string evaluation specified by id identifier returned


from the SetInterval function.

Parameters:

id Identifier returned by SetInterval

3.3.3 Log Object Methods

Methods of the Log object accessible from the Module scripts are described in this section. Log object
methods are used to output messages, declared within VB/ JScript program program code, into the
Module's log-file (see Logging). Using the methods of the object can improve the convenience of
debugging scripts.

Generally, Log object methods call syntax is as follows:

Log.Method_Name(p1[,p2,p3,...]), where:

Method_Name — method name;


p1,p2,p3,... — method parameters. Method parameters can be represented by a string, array or
another jscript-object.

Object has the following methods:

Error — implements the output of the method parameters into log-file, if log level, specified in the
Log object settings (see Logging), does not exceed Error.
Warn — implements the output of the method parameters into log-file, if log level, specified in the
Log object settings (see Logging), does not exceed Warn.
Info — implements the output of the method parameters into log-file, if log level, specified in the
Log object settings (see Logging), does not exceed Info.
Debug — implements the output of the method parameters into log-file, if log level, specified in the
Log object settings (see Logging), does not exceed Debug.
Fatal — implements the output of the method parameters into log-file, if log level, specified in the
Log object settings (see Logging), is Fatal.

www.isscctv.com
SecurOS 32 Programming Guide
Working with Module

3.4 Checking Script Syntax


The Module provides tools for checking script syntax.

To check script syntax do the following:


1. Click the Check syntax button in the Module window. The resulting message is displayed in the
state line on the bottom (see the bottom of the window in figure 3).

Figure 3. Module window with syntax error message

2. In case of an error, the standard message according to the script language will appear in the state line
and the source line of error will be highlighted in red in the script body (see figure 3). To continue
searching for other errors or to make sure there is no more errors, correct the error and repeat the
procedure.

The Module generates events in case of errors during script execution. Module event parameters are
listed in Appendix A. VB/ JScript Program Object Events). To view events, use the SecurOS log when
debug mode is enabled (see Debugging Script) or the Event Viewer window (Event Viewer object).

www.isscctv.com
SecurOS 33 Programming Guide
Working with Module

3.5 Debugging Script


Configuring debugger
The Microsoft Visual Studio IDE embedded debugger is convenient to debug scenario, implemented in
JScript programming language. To use embedded debugger do the following (as example, when using
Microsoft Visual Studio 2010):
1. Unistall any other script language debuggers, installed earlier on your computer.
2. Activate Just-in-time debugging mode. To do this select the HKEY_CURRENT_USER\Software
\Microsoft\Windows Script\Settings system registry key and assign the JITDebug
REG_DWORD - parameter value 1.

Note. If parameter does not exist, create it in specified system registry key and assign it value 1.

3. To call debugger to debug SecurOS JScript code select Script checkbox in the Just-In_Time
Debugging tab of the IDE settings window (see Figure 4).

Figure 4. Just-In-Time Debugging option settings window

Debugging Script
Debugger is call from within script if script body contains the debugger key word (see Listing 13).

Listing 13. Calling debugger from within SecurOS JScript code

function Init(){
Core.RegisterEventHandler("MACRO","1.3","RUN",function()
{
debugger;
var x = 1;
var y = 0;
var z = x*y;

www.isscctv.com
SecurOS 34 Programming Guide
Working with Module

x = z + 5;
Script.Echo("X =" + x);
});
}

3.6 Launching SecurOS in Debug Mode

When creating and debugging scripts, it is always handy to track events passed within SecurOS
network.

To run SecurOS in Debug mode do the following:


1. Shutdown SecurOS.
2. Launch the system utility for registry editing (type regedit in Start Run box).
3. Open \HKEY_LOCAL_MACHINE\SOFTWARE\ISS\SecurOS\NISS400 key. Create debug string
parameter and set it to 2.

Note. For 64-bit Operating Systems open HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ISS


\SecurOS\Niss400.

4. Close the regedit utility.


5. Launch SecurOS.

Now SecurOS is in Debug mode. In the lower part of the screen of the administration mode an
additional ‘event log’ window will appear. Right-click on any log line to see it in a separate window.

To disable Debug mode do the following:


1. Set debug string parameter (see above) to 0.
2. Restart SecurOS.

3.7 Script Examples


This section contains examples of the VBScript and JScript scenarios.

3.7.1 Stopped Vehicles Report

Example: To obtain a report regarding vehicle stops occurring on a certain lane of the road based on the
results of the SecurOS Traffic Module.

Listing 14. Script for SecurOS Traffic events export into a plain text file (JScript language)

var file

function Init(){
var fso = new ActiveXObject("Scripting.FileSystemObject");
file = fso.CreateTextFile("C:\\cars.txt", true);
Core.RegisterEventHandler("TRAFFIC_CAM", 3, "STOPPED_VEHICLE",
OnStoppedVehicle);
}

www.isscctv.com
SecurOS 35 Programming Guide
Working with Module

function OnStoppedVehicle(e){
file.Write(e.time);
file.Write("\tSTOPPED VEHICLE\t");
file.Write(e.traffic_name);
file.Write("\t");
file.WriteLine(e.lane_number);
}
function Destroy(){
file.Close();
}

Stopped vehicle information contains an STOPPED_VEHICLE event of the SecurOS Traffic Module


(TRAFFIC_CAM object with 3 identifier as an event source). Event parameters are transmitted into the
OnStoppedVehicle handler function. File saving is processed by the
Scripting.FileSystemObject ActiveX object. Every line of the file contains a set of event
parameters (vehicle stop...), in the following order: time of the event, event name, traffic analyzer
camera name and lane number of the event detection.

Execution results of this script are stored in the cars.txt file on the C drive.

3.7.2 Database Recording of Recognition Results for Wagon Numbers

Example: To record a list of recognized wagon numbers to the existing database based on the results of
the SecurOS Transit Module.

Listing 15. Script for SecurOS Transit Module events export into a database (VBScript language).

Dim DBConnection, DBRecordset

Sub Init()
Set DBConnection = CreateObject("ADODB.Connection")
DBConnection.ConnectionString = "DRIVER={PostgreSQL Unicode};" & _
"SERVER=localhost;port=5432;DATABASE=MyDatabase;UID=Me;PWD=MyPassword;"
DBConnection.Open
Set DBRecordset = CreateObject("ADODB.Recordset")
DBRecordset.Open "select * from wagons", DBConnection, 3, 3
Core.RegisterEventHandler "WAGON_RECOGNIZER", 1, "WAGNUM_RECOGN",
"OnWagonRecognized"
End Sub

Sub OnWagonRecognized(e)
DBRecordset.AddNew
DBRecordset.Fields("time") = e.Data_Time
DBRecordset.Fields("train") = e.Train_ID
DBRecordset.Fields("wagon") = e.Recognition_Result
DBRecordset.Update
End Sub

Sub Destroy()
DBRecordset.Close
DBConnection.Close
End Sub

www.isscctv.com
SecurOS 36 Programming Guide
Working with Module

Recognized wagon numbers are contained in the SecurOS Transit Module WAGNUM_RECOGN event
parameters (WAGON_RECOGNIZER object as an event source). Database recording is performed by the
ADODB.RecordSet ActiveX object. ConnectionString property of the ADODB.Connection
ActiveX object contains database connection parameters string. Data saves into the wagons table of the
MyDatabase PostgreSQL database. The following table fields are filled with data: time — recognition
time/date, train — train identifier and wagon — wagon number recognition results.

Note. Before running the script make sure the database exists and is accessible for recording.

Execution of this script results in database records.

3.7.3 Vehicle Speed Measurement Report

Example: To get periodical graphic reports about vehicle speed measurements from the results of the
SecurOS Auto (License Plate Recognition) Module during a certain period of detection.

Listing 16. Script for SecurOS Auto (License Plate Recognition) Module data export into Microsoft Excel
file (VBScript language)

Dim currentLocale
currentLocale = GetLocale
Dim nMaxVelocity
nMaxVelocity = 0
Dim velocities(300,1)

Sub Init()
Core.RegisterTimerHandler "*", "*", "*", "0", "0", "OnTimer"
Core.RegisterEventHandler "LPR_CAM", 1, "CAR_LP_RECOGNIZED", _
"OnCarRecognized"
End Sub

Sub OnCarRecognized(e)
SetLocale("en-gb")
nVelocity = Fix(Abs(CDbl(e.velocity)) + 0.5)
SetLocale(currentLocale)
If nVelocity > 0 Then
velocities(nVelocity,0) = velocities(nVelocity,0) + 1
End If
If nVelocity > nMaxVelocity Then
nMaxVelocity = nVelocity
End If
End Sub

Sub OnTimer()
If nMaxVelocity <> 0 Then
Dim Rng, Wb, App
Set App = CreateObject("Excel.Application")
Directory_For_Writing = "C:\"
Set Wb = App.WorkBooks.Add
Set Rng = Wb.ActiveSheet.Range("A1").Resize(nMaxVelocity, 1)
Rng.Value = velocities
Wb.Charts.Add
Wb.ActiveChart.ChartType = 51
Wb.ActiveChart.SetSourceData Rng, 2
Wb.ActiveChart.Location 1, "Velocity"
App.ActiveWorkBook.SaveAs Directory_For_Writing & _

www.isscctv.com
SecurOS 37 Programming Guide
Working with Module

Replace(FormatDateTime(Now), ":", ".") & ".xls"


App.Quit
For i = 0 To nMaxVelocity
velocities(i,0) = 0
Next
nMaxVelocity = 0
End If
End Sub

The speed (velocity) value is a SecurOS Auto (License Plate Recognition) Module


CAR_LP_RECOGNIZED event parameter (LPR_CAM object as an event source), which is transmitted into
OnCarRecognized handler function. According to script OnTimer timer function, registered events
are saved to a file hourly. File is created by the Excel.Application ActiveX object and contains
vehicle speed distribution diagram.

Execution of the script results in Microsoft Excel file saved on the C disk. Syntax of the file name is the
following: DD.MM.YYYY hh.mm.ss.xls where DD, MM, YYYY stands for the day, month and year, and
hh, mm,ss stands for hour, minute and second of the moment of data saving into the file.

Note. Before running the script, make sure that the SecurOS Auto (License Plate Recognition) Module
calculates moving vehicle speeds correctly (see SecurOS Auto User Guide).

www.isscctv.com
SecurOS 38 Programming Guide
Developing HTML Forms

4 Developing HTML Forms


SecurOS has a mechanism of creating custom user interface by means of HTML forms.

4.1 Setting up HTML Forms within SecurOS


SecurOS provides two types of HTML-based interface objects:
HTML Form — this interface object belongs to a Desktop object and, thus, appears on monitor when
the corresponding desktop is activated. This object is displayed unless screen is deactivated or
SecurOS is shut down. Can be used to display PTZ control panel;
HTML Dialog — this object appears on monitor temporarily upon some external event or system
behavior. For example, it can be opened from SecurOS script when handling events. Objects of this
kind can be closed by users manually or automatically by system (and also with the help of scripts).

Before creating HTML Forms and HTML Dialogs, consider the following ideology behind HTML
Forms and Dialogs:
Define an onLoad event handling function within HTML to perform initialization at object startup.
This includes adding event and command filters and corresponding handlers if your HTML Form
should respond to these external events and commands;
Within event/command handlers write code that modifies the DHTML or otherwise responds to
incoming events;
Define onClick event handlers for buttons or other interactive elements within HTML to send
commands back to SecurOS.

4.2 _system.js File

SecurOS comes with _system.js file located in <SecurOS root_directory>\dialogscript


\Data, which wraps calls to window.external.dispSOCoreProvider object (see
window.external.dispSOCoreProvider Object) to be more easy-to-use and provides additional helper
functions. It also creates a global io window.external.dispSOCoreProvider variable as a shortcut to this
object. So you could use io.MethodName(...) syntax instead of
window.external.dispSOCoreProvider.MethodName(...).

Table 1. _system.js functions

Function Description

Wraps DoReact(RawString), constructing raw string


react automatically from target_type, target_id, command and
(target_type,target_i params_array array of parameters and values. Example:
d,command,params_arra
y) react("CAM","1","REC",["param1","value1","param2",
"value2"]);

www.isscctv.com
SecurOS 39 Programming Guide
Developing HTML Forms

Function Description

Wraps Send2Core(RawString), constructing raw string


automatically from own type and ID, command command and
params array of parameters and values, thus sending event on
event(command,params) behalf on oneself. Example:
event("ALARMED",
["param1","value1","param2","value2"]);

Wraps Send2Core(RawString), constructing RawString


automatically from source_type, source_id, command
event_from command and params array of parameters and values, thus
(source_type,source_i sending event on behalf on arbitrary object. Example:
d,command,params)
event_from("RAY","3","ALARMED",
"param1","value1","param2","value2"]);

react_raw(raw_string) Shortcut to io.DoReact(raw_string)

event_raw(raw_string) Shortcut to io.Send2Core(raw_string)

Resizes window to specified width and height, or content size,


obeying optional min and max constraints. Example:

resize_win() — automatically resize window by its contents;

resize_win(x, y) — set window size to x, y;


resize_win resize_win(0, 0, maxx, maxy) — automatically resize
(x,y,minx,miny,
window, but obey minimum size constraints;
maxx,maxy)
resize_win(0, 0, 0, 0, minx, miny) — automatically
resize window, but obey maximum size constraints;

resize_win(0, 0, minx, miny, maxx, maxy) —


automatically resize window, but obey minimum/maximum size
constraints.

4.3 window.external.dispSOCoreProvider Object

Special window.external.dispSOCoreProvider object provides interfaces for subscribing to system events,


enumerating and performing actions on security objects, checking their states, etc.This allows building
fully customized interface solutions that integrate tightly into SecurOS.

Table 2. window.external.dispSOCoreProvider object properties

Property Type Description

Type of an object this HTML document is loaded into. Read-only.


Possible values:
bsType String
SCREEN_FORM — object is an HTML Form;

DIALOG_POPUP — object is an HTML Dialog.

bsID String ID of an object this HTML document is loaded into. Read-only.

www.isscctv.com
SecurOS 40 Programming Guide
Developing HTML Forms

Property Type Description

nID Integer Same as bsID, but returns an integer value. Read-only.

Table 3. window.external.dispSOCoreProvider object methods

Method Description

createFilter() Creates and returns a new IMsgFilter object.

Sends raw event string to SecurOS. String syntax:


Send2Core(RawString) OBJ_TYPE|OBJ_ID|EVENT_TYPE|
param1<value1>,param2<value2>,...,paramN<valueN>.

Sends raw react string to SecurOS. String syntax:


DoReact(RawString) OBJ_TYPE|OBJ_ID|COMMAND|
param1<value1>,param2<value2>,...,paramN<valueN>.

ResizeTo Resize window to specified width and height. Use this function
(Width,Height) instead of external window.resizeTo() function.

4.4 IMsgFilter Object Type

System object type constants (OBJ_TYPE) and command identifier constants (COMMAND) as well as
events identifier constants (EVENT_TYPE) are listed in Appendix 2. SecurOS Object Events and
Commands Reference. In the following table, OBJ_ID means identifier (ID) of the given object type
OBJ_TYPE.

Table 4. IMsgFilter object methods

Method Description

Adds the handler for the to the given JavaScript


function. Upon event/command, the given javascript
addHandler(FunctionName) function will receive an ICoreMsg object as a
parameter. Returns event handler ID, which can be
passed to removeHandler method.

removeHandler(FunctionName) Removes the previously created handler.

clearHandlers() Clears all handlers.

Subscribes to specified commands. If the "*" wildcard is


addReact(COMMAND)
used, subscribes to all commands.

removeReact(COMMAND) Unsubscribes from the specified command.

clearReacts() Removes all commands from the filter.

Excludes the specified command from being processed


addBlockReact(COMMAND) by filter. If the "*" wildcard is used, excludes all
commands.

www.isscctv.com
SecurOS 41 Programming Guide
Developing HTML Forms

Method Description

removeBlockReact(COMMAND) Removes the specified command from block list.

clearBlockReacts() Removes all command exclusions from the filter.

Subscribes to all events that match provided object


addEvent
(OBJ_TYPE,OBJ_ID,EVENT_TYPE) type, ID and event type. Any parameter can accept the
"*" wildcard which means "any".

Removes the previous subscription. Combination of


removeEvent
(OBJ_TYPE,OBJ_ID,EVENT_TYPE) OBJ_TYPE, OBJ_ID and EVENT_TYPE should be the
same as in one of the previous calls to addEvent().

clearEvents() Removes all event subscriptions from the filter.

Excludes all events that match provided object type, ID


addBlockEvent and event type from being processed by filter. Any
(OBJ_TYPE,OBJ_ID,EVENT_TYPE) parameter can accept the "*" wildcard which means
"any".

Removes the previously set combination of event


removeBlockEvent exclusions. Combination of OBJ_TYPE, OBJ_ID and
(OBJ_TYPE,OBJ_ID,EVENT_TYPE) EVENT_TYPE should be the same as in one of the
previous calls to addBlockEvent().

clearBlockEvents() Removes all event exclusions from the filter.

4.5 ICoreMsg Object Type

Object of this type is passed to event handling function as a parameter. It contains the data about event
or command. The event handlers must be processed as fast as possible, not to be blocked by dialog
appearing procedures.

Table 5. ICoreMsg properties

Property Type Description

bsAction String Event or command identifier.

bsSourceType String Type of an object that fired event/command.

bsSourceID String ID of an object that fired event/command.

String Returns the string value of the specified named


bsParam(Name)
parameter.

Integer Returns the integer value of the specified named


intParam(Name)
parameter.

www.isscctv.com
SecurOS 42 Programming Guide
Developing HTML Forms

4.6 Sample HTML Form


Below is a sample form that subscribes to events and sends command upon button click.

Listing 17. Using event filter

<html>
<head>
<script type="text/javascript" src="data/_system.js"></script>

<script type="text/javascript">
function init() { // executed when object shows the first time
var f = io.createFilter(); // create new filter
f.addEvent("*","*","ALARM"); // monitor ‘ALARM’ events
// from any object
f.addHandler(onAlarm); // define a handler
// for this filter
}

function onAlarm(msg) { // event handler


var source = msg.bsParam("source");
var action = msg.bsParam("action");
var region = msg.bsParam("region");
var comment = msg.bsParam("comment");
var date = msg.bsParam("date");
var time = msg.bsParam("time");
var type = msg.bsParam("type");
// e. g. add record to list
...
}
</script>
</head>

<body onLoad="init()">
<!-- send "ALARM" event on button click -->
<input type="button" value="Alarm" onclick="event('ALARM');">
</body>
</html>

SecurOS comes with several HTML Forms, so you could use them as a starting point to create new
ones. These files have .html extension and can be found in <SecurOS_Folder>\dialogscript\
folder. The content of this folder must be the same for all the operator workstations, where HTML
Forms will be launched.

www.isscctv.com
SecurOS 43 Programming Guide
Appendixes

5 Appendixes
The section contains the following Appendixes:
Appendix A. VB/ JScript Program Object Events;
Appendix B. SecurOS Objects Events and Commands Reference.

5.1 Appendix A. VB/JScript Program Object Events


Object type identifier: VBJSCRIPT.

Table 6. VBJSCRIPT events

Event identifier: ERROR

Event name in macro: none

Description: Error occurs during script execution.

Parameters:

line Script line number

description Error description

source Standard error type

code Standard error code

5.2 Appendix B. SecurOS Objects Events and Commands Reference


This section describes the events and actions of the SecurOS subsystem's objects.

5.2.1 Core Subsystem

This section describes the events and actions of core subsystem's objects.

5.2.1.1 System

Object type identifier: ARCHITECT.

Warning! When calling command from DoReact method leave ARCHITECT object ID empty.

Table 7. ARCHITECT Commands

Command identifier: SAVE_CONFIG

Name used in Map/ Macros: none

www.isscctv.com
SecurOS 44 Programming Guide
Appendixes

Description: Save current SecurOS configuration to a xml-file

Parameters:

Name of the saved file. Only file name, not full path, is specified. File is
filename saved in <SecurOS_installation_folder>\Sys_config. Mandatory
parameter

Option that allows to overwrite file when file names are concurrent.
Possible values:
overwrite
0 — do not overwrite file;
1 — overwrite file.

5.2.1.2 User account

Object type identifier: PERSON.

Table 8. PERSON Events

Event identifier: CARD_DUPLICATED

Event name in macro: Person card duplicated

Description: Duplication of person card

Parameters: none

Event identifier: REGISTERED

Event name in macro: Registered

Description: Person registered

Parameters: none

Event identifier: UNREGISTERED (info)

Event name in macro: Unregistered

Description: Person finished session

Parameters: none

Commands: none.

5.2.1.3 Computer

Object type identifier: SLAVE.

Table 9. SLAVE Events

Event identifier: CONNECTED

Event name in macro: Connected

www.isscctv.com
SecurOS 45 Programming Guide
Appendixes

Description: Connected

Parameters: none

Event identifier: CONN_OVERLOAD (alarm)

Event name in macro: Core connection blocked

Description: Core connection blocked

Parameters: none

Event identifier: DB_OVERLOAD (alarm)

Event name in macro: Database overload

Description: Database overload

Parameters: none

Event identifier: DISCONNECTED (alarm)

Event name in macro: Disconnected

Description: Disconnected

Parameters: none

Event identifier: PROGRAM

Event name in macro: Program changed

Description: Program changed

Parameters: none

Event identifier: PROTOCOL_RCVD

Event name in macro: Protocol received

Description: Protocol received

Parameters: none

Event identifier: QUEUE_CRITICAL (alarm)

Event name in macro: Workload is critical

Description: Workload is critical

Parameters: none

Event identifier: QUEUE_NORMAL

Event name in macro: Workload is normal

Description: Workload is normal

Parameters: none

www.isscctv.com
SecurOS 46 Programming Guide
Appendixes

Event identifier: QUEUE_WARNING

Event name in macro: Workload is too high

Description: Workload is too high

Parameters: none

Event identifier: REGISTER_ERROR

Event name in macro: Register error

Description: Register error

Parameters: none

Event identifier: SHOW_INFO_MESSAGE

Event name in macro: Display a window with an information or error message

Description: Display a window with an information or error message

Parameters: none

Table 10. SLAVE Commands

Command identifier: CONNECT_ONE

Name used in Map/ Macros: Connect

Description: Connect to computer

Parameters: none

Command identifier: CONNECT_OTHER

Name used in Map/ Macros: Connect all

Description: Connect to core

Parameters: none

Command identifier: DISCONNECT_ONE

Name used in Map/ Macros: Disconnect

Description: Disconnect from computer

Parameters: none

Command identifier: SHOW_INFO_MESSAGE

Name used in Map/ Macros: none

Description: Display a splash window with an information or error message

Parameters::

text Text of the displayed message

www.isscctv.com
SecurOS 47 Programming Guide
Appendixes

Type of the displayed window. Possible values:


error true — error window is displayed;
false — informational window is displayed.
Command identifier: SYNC_PROTOCOL

Name used in Map/ Macros: Get protocol

Description: Receive protocol

Parameters: none

5.2.1.4 Region

Object type identifier: REGION.

Table 11. REGION Events

Event identifier: ARM

Event name in macro: Arm

Description: Region has been armed

Parameters: none

Event identifier: DISARM

Event name in macro: Disarm

Description: Region has been disarmed

Parameters: none

Commands: none.

5.2.2 Interface Subsystem

This section describes the events and actions of interface subsystem's objects.

5.2.2.1 Desktop

Object type identifier: DISPLAY.

Events: none.

Table 12. DISPLAY Commands

Command identifier: ACTIVATE

Name used in Map/ Macros: Show

Description: Show current monitor on computer display

www.isscctv.com
SecurOS 48 Programming Guide
Appendixes

Parameters: none

Command identifier: DEACTIVATE

Name used in Map/ Macros: Hide

Description: Hide current monitor from display

Parameters: none

5.2.2.2 Map Window

Object type identifier: MAP3.

Events: none.

Table 13. MAP3 Commands

Command identifier: FIND_OBJECT

Name used in Map/ Macros: none

Description: Jump to the object located on Map — displaying level where object is located and
backlighting object

Parameters:

type Type of the object that has to be found

id ID of the object that has to be found

5.2.2.3 Event Viewer

Object type identifier: EVENT_VIEWER.

Table 14. EVENT_VIEWER Events

Event identifier: ACTIVATE_OBJECT

Event name in macro: none

Description: Generated when a line is double clicked in the Event Viewer

Parameters:

event_objid ID of the object that is displayed in the Event Viewer line

event_objtype Type of the object that is displayed in the Event Viewer line

event_time Event time saved in the Event Viewer (in HH:MM:SS format)

event_date Event date saved in the Event Viewer (in DD:MM:YY format)

Commands: none.

www.isscctv.com
SecurOS 49 Programming Guide
Appendixes

5.2.2.4 HTML Form

Object type identifier: SCREEN_FORM.

Events: none.

Table 15. SCREEN_FORM Commands

Command identifier: SHOW

Name used in Map/ Macros: Show

Description: Show HTML form

Parameters: none

Command identifier: HIDE

Name used in Map/ Macros: Hide

Description: Hide HTML form

Parameters: none

5.2.2.5 HTML Dialog

Object type identifier: DIALOG_POPUP.

Events: none.

Table 16. DIALOG_POPUP Commands

Command identifier: SHOW

Name used in Map/ Macros: Show

Description: Show HTML dialog

Parameters: none

Command identifier: HIDE

Name used in Map/ Macros: Hide

Description: Hide HTML dialog

Parameters: none

5.2.3 Video Subsystem

This section describes the events and actions of video subsystem's objects.

www.isscctv.com
SecurOS 50 Programming Guide
Appendixes

5.2.3.1 Video Capture Device

Object type identifier: GRABBER.

Events: none.

Table 17. GRABBER Commands

Command identifier: SETUP

Name used in Map/ Macro: none

Description: Change settings of video card. Settings are applied temporarily (until server which is
responsible for that object restarts)

Parameters:

chan Channel number (0, 1, 2, . . . )

mode Frame rate (0 — maximum, 1 — medium, 2 — minimum)

Resolution: 0 — quarter frame (384×288); 1 — half frame (768×288); 2 —
resolution
full frame (768×576)

format Format (PAL or NTSC)

drives Disk for video archive (DRIVE1:\, DRIVE2:\, . . . )

ip IP address for network hardware (in digital or string format)

watchdog Enabling watchdog function (0 — disable, 1 — enable)

Command identifier: SET_DRIVERS

Name used in Map/ Macro: none

Description: Set drives for video archiving

Parameters:

drives Disks for video archiving

5.2.3.2 Camera

Object type identifier: CAM.

Table 18. CAM Events

Event identifier: ARMED

Event name in macro: Camera was armed

Description: Camera was armed by the ARM command from a Zone object.

Note. On arming camera by means of a Monitor (the Arm button) all corresponding zones are arming too,
the ARMED event takes place.

www.isscctv.com
SecurOS 51 Programming Guide
Appendixes

Parameters: none

Event identifier: ATTACH

Event name in macro: Attached

Description: Camera signal has been detected

Parameters: none

Event identifier: BLINDING (alarm)

Event name in macro: Blinding

Description: Camera has been blinding

Parameters: none

Event identifier: DETACH (alarm)

Event name in macro: Detached

Description: Camera signal has been disrupted

Parameters: none

Event identifier: DISARMED

Event name in macro: Camera was disarmed

Description: Camera was disarmed by the DISARM command from a Zone object.

Note. On disarming camera by means of a Monitor (the Disarm button) all corresponding zones are
disarming too, the DISARMED event takes place.

Parameters: none

Event identifier: MD_START

Event name in macro: Alarm

Description: Generated at the moment of motion detection in the frame of the armed camera

Parameters: none

Event identifier: MD_STOP

Event name in macro: Alarm end

Description: Motion has stopped

Parameters: none

Event identifier: REC

Event name in macro: Record start

Description: Camera signal has begun recording onto hard disk

Parameters: none

www.isscctv.com
SecurOS 52 Programming Guide
Appendixes

Event identifier: REC_ERROR

Event name in macro: none

Description: Error recording to hard disk

Parameters: none

Event identifier: REC_STOP

Event name in macro: Record stop

Description: Camera signal has stopped recording

Parameters: none

Event identifier: UNBLINDING (alarm)

Event name in macro: Unblinding

Description: Camera has been unblinded

Parameters: none

Event identifier: DEFOCUSED

Name used in Map/ Macros: none

Description: Camera is out-of-focus, focus is lost

Parameters: none

Event identifier: FOCUSED

Name used in Map/ Macros: none

Description: Camera is focused, image is normalized

Parameters: none

Table 19. CAM Commands

Command identifier: ARM

Name used in Map/ Macros: Arm

Description: Arm camera

Parameters: none

Command identifier: DISARM

Name used in Map/ Macros: Disarm

Description: Disarm camera

Parameters: none

Command identifier: REC

www.isscctv.com
SecurOS 53 Programming Guide
Appendixes

Name used in Map/ Macros: Start record

Description: Begin recording

Parameters:

hot_rec_time Hot record time, s

Command priority. Possible values:

0 — recording is not restored after system rebooting; during system


operation recording can be stopped by command that has both 1 and 0
priority.

1 — recording is restored after system rebooting; during system operation


recording can be stopped only by command that has 1 priority. Parameter
priority is used when command is sent by operator from Media Client window,
Monitor window, Map Window or Macro (with specified priority).

If parameter is not specified when command is sent from the VB/ JScript
program, it is considered that camera is switched to recording mode with
priority of 0.

Note. Command will be ignored if Camera's current recording mode is Do not


record.

Command identifier: REC_ROLLBACK

Name used in Map/ Macros: Start record with prealarm

Description: Begin recording with rollback

Parameters:
rollback_time_a Absolute prealarm record time (if empty then the entire buffer is used)
bs

Record parameter (possible values: 1 or empty — record starts after


prealarm buffer saving; 0 — only prealarm buffer is used, and if it the
start_rec
rollback_time_abs is set then the one frame (the first after specified
time) is saved only)

www.isscctv.com
SecurOS 54 Programming Guide
Appendixes

Command priority. Possible values:

0 — recording is not restored after system rebooting; during system


operation recording can be stopped by command that has both 1 and 0
priority.

1 — recording is restored after system rebooting; during system operation


recording can be stopped only by command that has 1 priority. Parameter
priority is used when command is sent by operator from Media Client window,
Monitor window, Map Window or Macro (with specified priority).

If parameter is not specified when command is sent from the VB/ JScript
program, it is considered that camera is switched to recording mode with
priority of 0.

Note. Command will be ignored if Camera's current recording mode is Do not


record.

Command identifier: REC_STOP

Name used in Map/ Macros: Stop record

Description: End recording

Parameters:

Command priority. Possible values:

0 or not specified — recording will be stopped if camera was


switched to recording mode by command with priority of 0;

1 — recording will be stopped regardless of priority of command that


priority switched camera to the recording mode. Parameter is used when
command is sent by operator from Media Client window, Monitor window
or Map Window.

Note. Command will be ignored if Camera's current recording mode is


Continuous.

Command identifier: DELETE

Name used in Map/ Macros: none

Description: Remove camera from monitor (temporarily, until Monitor object is recreated)

Parameters: none

Command identifier: START_VIDEO

Name used in Map/ Macros: none

Description: Turn on video stream for current camera

Parameters:

slave_id Name of computer to which the camera is attached to

www.isscctv.com
SecurOS 55 Programming Guide
Appendixes

Compression enabling (0 — do not use compression, the compression


compress
parameter will be ignored; 1 — enable)

compression Compression (0 — no compression, 1 — max quality, . . . , 5 — min quality)

speed Video feed speed (fps)

Codec profile's XML file full name (including file name extension). If
codec specified file not exists or specified nothing, then current camera profile
from the server will be used (for example, "codec","mjpeg.xml")

Command identifier: STOP_VIDEO

Name used in Map/ Macros: none

Description: Turn off video stream for current camera

Parameters:

slave_id Name of computer to which the camera is attached to

Command identifier: REQUEST_MASK

Name used in Map/ Macros: none

Description: Request of the mask

Parameters:

mask Mask

Command identifier: SET_MUX

Name used in Map/ Macros: none

Description: Toggle playback video on the specified channel.


Warning! Is used only for Player AVI type Video Capture Device.

Parameters:

mux Channel number

Command identifier: ADD_SUBTITLES

Name used in Map/ Macros: none

Description: Add subtitles into the video stream

Note. Added subtitles are displayed in the Camera cell both on the Monitor and Media Client.

Parameters:

Subtitles text string.


command Note. HTML tags can be used straight in the script if necessary to change the
view of the titles (font, color, etc.).

www.isscctv.com
SecurOS 56 Programming Guide
Appendixes

Text stream identifier. Is used if video stream contains several text streams.
To display given text stream in the Camera cell on the Monitor, specify its
token identifier in the Token parameter of the Monitor object (see SecurOS
(optional) Administration Guide).
Warning! When working with Camera's subtitles displayed on the Media Client
parameter is ignored.

Command identifier: CLEAR_SUBTITLES

Name used in Map/ Macros: none

Description: Delete subtitles from the video stream

Note. Subtitles are deleted from the Camera cell both on the Monitor and Media Client.

Parameters:

Identifier of the text stream to be deleted. Is used if video stream contains


several text streams. To delete text stream that is displayed in the Camera cell
token on the Monitor, specify its identifier in the Token parameter of the Monitor
(optional) object (see SecurOS Administration Guide).
Warning! When working with Camera's subtitles displayed on the Media Client
parameter is ignored.

Command identifier: PRESET_RECALL

Name used in Map/ Macros: none

Description: Move to specified preset

Parameters:

preset_number Preset number

Command identifier: PATROL_PLAY

Name used in Map/ Macros: none

Description: Start tour

Parameters:

Tour identifier
patrol
Note. If not set the first tour from the camera's tour list is activated.

Command identifier: HOME

Name used in Map/ Macros: none

Description: Turn camera to the home position


Warning! Is used only for certain types of the Video Capture Devices.

Parameters: none

www.isscctv.com
SecurOS 57 Programming Guide
Appendixes

Command identifier: PATROL_STOP

Name used in Map/ Macros: none

Description: Stop tour

Parameters: none

Command identifier: FOCUS_IN

Name used in Map/ Macros: Focus +

Description: Increase lens focal distance

Note. Lens focal distance is changed continuously till FOCUS_STOP command is received.

Parameters: none

Command identifier: FOCUS_OUT

Name used in Map/ Macros: Focus -

Description: Decrease lens focal distance

Note. Lens focal distance is changed continuously till FOCUS_STOP command is received.

Parameters: none

Command identifier: FOCUS_STOP

Name used in Map/ Macros: Stop focus

Description: Stop changing lens focal distance

Parameters: none

Command identifier: FOCUS_AUTO_MODE

Name used in Map/ Macros: none

Description: Auto focus

Parameters: none

Command identifier: IRIS_OPEN

Name used in Map/ Macros: Open iris

Description: Open iris

Note. Iris is opened continuously till IRIS_STOP command is received.

Parameters: none

Command identifier: IRIS_CLOSE

Name used in Map/ Macros: Close iris

www.isscctv.com
SecurOS 58 Programming Guide
Appendixes

Description: Close iris

Note. Iris is closed continuously till IRIS_STOP command is received.

Parameters: none

Command identifier: IRIS_STOP

Name used in Map/ Macros: Stop iris

Description: Stop changing iris

Parameters: none

Command identifier: IRIS_AUTO_MODE

Name used in Map/ Macros: none

Description: Auto iris

Parameters: none

Listing 18. Use HTML tags

. . .
DoReact("CAM",CAM_ID,"ADD_SUBTITLES","command<<em><font color=green
face=cursive><font color=red>Alarm!</font><br>Motion detected
inside X area</font></em>>");
. . .

5.2.3.3 Zone

Object type identifier: CAM_ZONE.

Table 20. CAM_ZONE Events

Event identifier Event name in macro Description

ARM Arm

DISARM Disarm

MD_START Alarm

MD_STOP Alarm end

Table 21. CAM_ZONE Commands

Command identifier Name used in Map/Macro Description

ARM Arm

DISARM Disarm

www.isscctv.com
SecurOS 59 Programming Guide
Appendixes

5.2.3.4 Light Detector

Object type identifier: LD.

Table 22. LD Events

Event identifier Event name in macro Description

LIGHT_ON Light on

LIGHT_OFF Light off

Commands: none.

5.2.3.5 Zone Object Detector

Object type identifier: ZOD.

Table 23. ZOD Events

Event identifier: RESET

Event name in macro: Detector resets

Description: Initialization. Detector renews the scene

Parameters: none

Event identifier: ABSENT

Event name in macro: Object is disappeared from the zone

Description: Object is absent, disappeared from camera view

Parameters: none

Event identifier: PRESENT

Event name in macro: Object is appeared in the zone

Description: Object is present in zone, appeared in camera view

Parameters: none

Event identifier: UNKNOWN

Event name in macro: Detector state is unknown

Description: Unknown object state e. g. before initialization

Parameters: none

Table 24. ZOD Commands

Command identifier: SETUP

Name used in Map/ Macro: none

www.isscctv.com
SecurOS 60 Programming Guide
Appendixes

Description: Setup (change) detector parameters

Parameters:

contrast_threshol Level of filtering between an estimated background and an object


d (20. . . 50)

area_threshold Minimum size of object to be detected with ZOD (1. . . 10)

zone_id Zone ID

frames Number of frames for initial scene building stage

delay_frames Number of frames the ZOD is insensitive for state changing


min_bkgnd_thresho Low filtering level for background updating (1. . . 100)
ld
max_bkgnd_thresho High filtering level for background updating (1. . . 100)
ld

Turn on/off brightness compensation algorithm (possible values:: 1 —


compensation
on; 0 — off)

5.2.3.6 PTZ Device

Object type identifier: TELEMETRY.

Table 25. TELEMETRY Events

Event identifier: TIMEOUT

Event name in macro: Time for telemetry control expires

Description:

Parameters: none

Table 26. TELEMETRY Commands

Command identifier: AUTOFOCUS_ON

Name used in Map/ Macros: Autofocus on

Description:

Parameters: none

Command identifier: AUTOPAN_END_P

Name used in Map/ Macros: Autopan end point set

Description: Assign end position

Parameters: none

Command identifier: AUTOPAN_START

www.isscctv.com
SecurOS 61 Programming Guide
Appendixes

Event name in macro: Autopan begin

Description:

Parameters: none

Command identifier: AUTOPAN_START_P

Name used in Map/ Macros: Autopan begin point set

Description: Assign start position

Parameters: none

Command identifier: AUTOPAN_STOP

Name used in Map/ Macros: Autopan stop

Description:

Parameters: none

Command identifier: CLEAR_PRESET

Name used in Map/ Macros: Clear preset

Description:

Parameters: none

Command identifier: D2OFF

Name used in Map/ Macros: Super dynamic off

Description:

Parameters: none

Command identifier: D2ON

Name used in Map/ Macros: Super dynamic on

Description:

Parameters: none

Command identifier: DOWN (arm)

Name used in Map/ Macros: Down

Description:

Parameters: none

Command identifier: FOCUS_IN

Name used in Map/ Macros: Focus in

Description:

Parameters: none

www.isscctv.com
SecurOS 62 Programming Guide
Appendixes

Command identifier: FOCUS_OUT

Name used in Map/ Macros: Focus out

Description:

Parameters: none

Command identifier: FOCUS_STOP

Name used in Map/ Macros: Stop focus

Description:

Parameters: none

Command identifier: GO_PRESET

Name used in Map/ Macros: Go to preset

Description:

Parameters: none

Command identifier: IRIS_CLOSE

Name used in Map/ Macros: Close iris

Description:

Parameters: none

Command identifier: IRIS_OPEN

Name used in Map/ Macros: Open iris

Description:

Parameters: none

Command identifier: IRIS_STOP

Name used in Map/ Macros: Stop iris

Description:

Parameters: none

Command identifier: LEFT (arm)

Name used in Map/ Macros: Left

Description:

Parameters: none

Command identifier: LEFT_DOWN

Name used in Map/ Macros: Down-left

Description:

www.isscctv.com
SecurOS 63 Programming Guide
Appendixes

Parameters: none

Command identifier: LEFT_UP

Name used in Map/ Macros: Up-left

Description:

Parameters: none

Command identifier: PATROL_LEARN

Name used in Map/ Macros: Patrol learn

Description:

Parameters: none

Command identifier: PATROL_PLAY

Name used in Map/ Macros: Patrol play

Description:

Parameters: none

Command identifier: PATROL_STOP

Name used in Map/ Macros: Patrol stop

Description:

Parameters: none

Command identifier: RIGHT (arm)

Name used in Map/ Macros: Right

Description:

Parameters: none

Command identifier: RIGHT_DOWN (arm)

Name used in Map/ Macros: Down-right

Description:

Parameters: none

Command identifier: RIGHT_UP

Name used in Map/ Macros: Up-right

Description:

Parameters: none

Command identifier: SET_PRESET

Name used in Map/ Macros: Set preset

www.isscctv.com
SecurOS 64 Programming Guide
Appendixes

Description:

Parameters: none

Command identifier: STOP (arm)

Name used in Map/ Macros: Stop

Description:

Parameters: none

Command identifier: UP (arm)

Name used in Map/ Macros: Up

Description:

Parameters: none

Command identifier: ZOOM_IN

Name used in Map/ Macros: Zoom +

Description:

Parameters: none

Command identifier: ZOOM_OUT

Name used in Map/ Macros: Zoom -

Description:

Parameters: none

5.2.3.7 Archive Converter

Object type identifier: ARCH_CNV.

Table 27. ARCH_CNV Events

Event identifier: ARCH_EXPORT_CMD_FAILED

Event name in Macro: none

Description: Export parameters list is incorrect

Parameters:

problem Problem description

session_magic Session ID received from query

Event identifier: ARCH_CONVERT_CMD_FAILED

Event name in Macro: none

www.isscctv.com
SecurOS 65 Programming Guide
Appendixes

Description: Convert parameters list is incorrect

Parameters:

problem Problem description

session_magic Session ID received from query

Event identifier: TASK_ENQUEUED

Event name in Macro: none

Description: Task was put in queue

Parameters:

task_id Task ID (in queue)

session_magic Session ID received from query

Event identifier: TASK_STARTED

Event name in Macro: none

Description: Task is in process

Parameters:

task_id Task ID (in queue)

Event identifier: TASK_FINISHED

Event name in Macro: none

Description: Task was performed successfully

Parameters:

task_id Task ID (in queue)

Event identifier: TASK_FAILED

Event name in Macro: none

Description: Task was failed

Parameters:

task_id Task ID (in queue)

problem Problem description

Event identifier: TASK_NOT_EXISTS

Event name in Macro: none

Description: Task not exsists. Event is generated when Archive Converter cannot find the task that is
to be canceled.

Parameters:

www.isscctv.com
SecurOS 66 Programming Guide
Appendixes

task_id Task ID (in queue)

session_magic Session ID received from query

client_type Type of the query source object

client_id ID of the query source object

comment Any comment on the conversion process

Table 28. ARCH_CNV Commands

Command identifier: ARCH_EXPORT

Name used in Map/ Macros: none

Description: Archive export

Parameters:
channel_id Requested channel ID. Identifier of the camera to convert archive for
(mandatory)

time_start Left edge of the requested time interval (start search time) in DD-
(mandatory) MMYYYY HH:MM:SS.FFF format

time_end Right edge of the requested time interval (stop search time) in DD-
(mandatory) MMYYYY HH:MM:SS.FFF format

Identifier of the free microphone when converting audio only. If


mic_id
specified, then the channel_id parameter is skipped
session_magic Will be included in converter answer
(optional)

operator (optional) Name of the user (operator), who started conversion process

comment (optional) Any comment on the conversion process

Type of the query source object. Is used to address notifications about


client_type
(optional) conversion results. If exists, value will be transferred inside answer
notification without change

ID of the query source object. Is used to address notifications about


client_id
(optional) conversion results. If exists, value will be transferred inside answer
notification without change

Directory to save converted file (export directory). The absolute path


must be specified. If not set then value specified in the Archive converter
dir (optional) object settings will be used. When specifying directory name template it
is possible to use macro substitutions (see SecurOS Administration
Guide)

Name of the converted file. Only name (not path) must be specified. If
file_name not set then value specified in the Archive converter object settings will
(optional) be used. When specifying file name template it is possible to use macro
substitutions (see SecurOS Administration Guide)

www.isscctv.com
SecurOS 67 Programming Guide
Appendixes

Name of Computer parent to Archiver. Is used when converting long-


term archive files. Must be set in the following format: <Computer
arch_id (optional) Name.Archiver ID>.

If not set or is incorrect only files from operative archive can be


converted

arch_port Port to communicate with Archiver. Possible value — 901. If not set or
(optional) is incorrect only files from operative archive can be converted

5.2.3.8 Archiver

Object type identifier: ARCHIVER.

Events: none.

Table 29. ARCHIVER Commands

Command identifier: START

Name used in Map/ Macro: none

Description: Archive on time interval

Parameters:

The beginning of the time interval to archive (if not set then it’s value is
time1 the time of the longterm archive last frame for the camera; if there is no
such archive then the value is 01/01/1901)

The ending of the time interval to archive (if not set, then is the time of the
time2
command coming)

cam_count Number of cameras to archive

Cameras identifications to archive (if not set then all cameras from
archives settings)
cam_id.x
Note. The command may be without parameters.

Command identifier: STOP

Name used in Map/ Macro: none

Description: Stop archiving

Parameters:

cam_count Number of cameras to stop archive

Cameras identifications to stop archive (if not set then all cameras from
cam_id.x
archives settings)

www.isscctv.com
SecurOS 68 Programming Guide
Appendixes

5.2.3.9 Monitor

Object type identifier: MONITOR.

Table 30. MONITOR Events

Event identifier: ACTIVATE_CAM

Name used in Map/ Macros: none

Description: Selected camera has been activated

Parameters:

cam Selected camera ID

Event identifier: CAM_ADDED

Name used in Map/ Macros: none

Description: Camera has been added to monitor

Parameters:

camid Added camera ID

Event identifier: CAM_REMOVED

Name used in Map/ Macros: none

Description: Camera has been removed from monitor

Parameters:

camid Removed camera ID

Event identifier: EXPORTED_FRAME

Name used in Map/ Macros: none

Description: Displaying result of the image export, executed with EXPORT_FRAME

Parameters:

cam_id Camera ID for the exported image

path Name of the file (full path) containing exported image

Query identifier specified in the initial EXPORT_FRAME command.


seq_id
Optional parameter

Table 31. MONITOR Commands

Command identifier: ARCH_FRAME_TIME

Name used in Map/ Macros: none

Description: Locates the camera archive on the specified time

Parameters:

www.isscctv.com
SecurOS 69 Programming Guide
Appendixes

cam Camera ID

date Date (in DD-MM-YY format)

time Time (in HH:MM:SS:XXX format)

Command identifier: ARCH_FRAME_TIME_ANY

Name used in Map/ Macros: none

Description: Navigate through archive

Parameters:

time Date and Time (in DD-MM-YY HH:MM:SS format)

Position identifier. Possible values: 0 — jump to the first frame, 1 — jump


to the nearest to time parameter frame.
exact
Note. If the command was failed then the ARCH_ERROR event will be send.

Command identifier: ARCH_FRAME_FIRST

Name used in Map/ Macros: none

Description: Jump to the first frame of the specified video archive file

Parameters:

Video archive file name.


file
Note. If the command was failed then the ARCH_ERROR event will be send.

Command identifier: ARCH_FRAME_NEXT

Name used in Map/ Macros: none

Description: Jump to the next frame (relative to the current one) of the specified video archive file

Parameters:

Video archive file name.


file
Note. If the command was failed then the ARCH_ERROR event will be send.

Command identifier: ARCH_FRAME_PREV

Name used in Map/ Macros: none

Description: Jump to the previous frame (relative to the current one) of the specified video archive
file

Parameters:

Video archive file name.


file
Note. If the command was failed then the ARCH_ERROR event will be send.

www.isscctv.com
SecurOS 70 Programming Guide
Appendixes

Command identifier: ARCH_FRAME_LAST

Name used in Map/ Macros: none

Description: Jump to the last frame of the specified video archive file

Parameters:

Video archive file name.


file
Note. If the command was failed then the ARCH_ERROR event will be send.

Command identifier: ARCH_FRAME_TIME_EXACT

Name used in Map/ Macros: none

Description: Jump to the specified by time frame of the video archive file

Parameters:

date Date (in DD-MM-YY format)

Time (in HH:MM:SS:XXX format)


time
Note. If the command was failed then the ARCH_ERROR event will be send.

Command identifier: ARCH_FRAME_POSITION

Name used in Map/ Macros: none

Description: Jump to the specified frame of the video archive file

Parameters:

file Video archive file name

Frame number (id)


frame_number
Note. If the command was failed then the ARCH_ERROR event will be send.

Command identifier: ADD_SEQUENCE

Name used in Map/ Macros: none

Description: Switch monitor layout

Parameters:

mode Layout ID (e. g. 1, 4 etc.)

seq Cameras ID through the "|" separator

Command identifier: EXPORT_FRAME

Name used in Map/ Macros: none

Description: Export frame of the live video to a file. Supported file types: jpg, png

www.isscctv.com
SecurOS 71 Programming Guide
Appendixes

Parameters:

cam Camera ID (e. g. 1, 4 etc.)

Directory to save file, which is specified by file parameter (for example,


C:\\Exported frames). When specifying directory backslash mark (\
directory \) is allowed at the end of the string (C:\\Exported frames\\). If
specified directory does not exist, then it is created before export
operation execution

File name in the specified directory. If full file name is specified, then
file
directory parameter can be dropped

quality Image quality, in % of the source frame quality. Optional parameter

seq_id Query ID. Optional parameter. If was specified, returned in the answer
EXPORTED_FRAME

Command identifier: KEY_PRESSED

Name used in Map/ Macros: none

Description: Start/stop paging (layout auto scroll) mode

Parameters:

Possible values:

key LAYOUT_AUTOSCROLL_ON — start paging mode;

LAYOUT_AUTOSCROLL_OFF — stop paging mode.

5.2.3.10 Media Client

Object type identifier: MEDIA_CLIENT.

Events: none.

Table 32. MEDIA_CLIENT Commands

Command identifier: SEEK

Name used in Map/ Macros: none

Description: Jump to the specified time of the specified video archive file

Parameters:

date Date (in DD-MM-YY format)

time Time (in HH:MM:SS:XXX format)

cam Camera ID, which must be set to archive. If not specified, the number of cameras
(optional) that are in archive mode will not change

Command identifier: CAM_MODE

www.isscctv.com
SecurOS 72 Programming Guide
Appendixes

Name used in Map/ Macros: none

Description: Set camera operation mode

Parameters:

cams Comma separated camera IDs

Camera operation modes. Possible values:

mode live — live video mode;

arch — archive mode.

Command identifier: ACTIVATE_CAM

Name used in Map/ Macros: none

Description: Activate camera

Parameters:

ID of the camera to activate. After command execution the video page that
cam contains activated camera is displayed. Current layout of the Media Client is not
changed

Command identifier: PLAY

Name used in Map/ Macros: none

Description: Start playing archive

Parameters: none

Command identifier: STOP

Name used in Map/ Macros: none

Description: Stop playing archive

Parameters: none

Command identifier: NEXT_FRAME

Name used in Map/ Macros: none

Description: Jump specified camera to the next frame of the archive

Parameters:

cam Camera ID

Command identifier: PREV_FRAME

Name used in Map/ Macros: none

Description: Jump specified camera to the previous frame of the archive

Parameters:

www.isscctv.com
SecurOS 73 Programming Guide
Appendixes

cam Camera ID

Command identifier: NEXT_RECORD

Name used in Map/ Macros: none

Description: Jump specified camera to the next record of the archive

Parameters:

cam Camera ID

Command identifier: PREV_RECORD

Name used in Map/ Macros: none

Description: Jump specified camera to the previous record of the archive

Parameters:

cam Camera ID

Command identifier: ADD_SEQUENCE

Name used in Map/ Macros: none

Description: Set video monitor layout

Parameters:

Video monitor's layout ID. Possible values:

standard and wide layouts IDs:

"1x1" — 1x1 layout;

mode "2x2" — 2x2 layout;

"1w5" — 1+5 layout;

"4w3" — 4+3 layout, etc.

id of the custom Layout object.

The list of camera IDs, separated by a "|" character. Position in the list
corresponds to the number of the cell, where camera will be placed.
seq Note. Cameras are placed into a cells left to right from top to bottom. If the list contains
an empty, incorrectly specified or non-existent camera's identifiers, then cells
corresponding to the positions of such identifiers remain empty.

The list of camera IDs in archive mode, separated by a "," character (comma).
arch
When command is executed, only cameras from previous list are considered

Command identifier: EXPORT_FRAME_FROM_ACTIVE_CAM

Name used in Map/ Macros: none

www.isscctv.com
SecurOS 74 Programming Guide
Appendixes

Description: Export a frame from active camera to a file

Note. Exported is the frame that is displayed in a camera cell at the moment of command execution.

Parameters: none

Command identifier: JOYSTICK

Name used in Map/ Macros: none

Description: Active camera PTZ control

Parameters:

pan Panning

tilt Tilting

zoom Zooming

Command identifier: MAXIMIZE_OR_RESTORE

Name used in Map/ Macros: none

Description: Active camera cell size control: expand to full screen/collaps to previous size

Parameters: none

Command identifier: SWITCH_PAGE_TO_ARCHIVE

Name used in Map/ Macros: none

Description: Switch all cameras of an active video page to archive mode

Parameters: none

Command identifier: SWITCH_ALL_CAMERAS_TO_LIVE

Name used in Map/ Macros: none

Description: Switch all cameras to live mode

Parameters: none

Command identifier: KEY_PRESSED

Name used in Map/ Macros: none

Description: Commands to control Media Client and objects

Note. Camera control commands are used only for active camera.

Parameters:

www.isscctv.com
SecurOS 75 Programming Guide
Appendixes

Possible values:

ARM — arm camera;

DISARM — disarm camera;

REC — turn recording on;

REC — turn recording off;

LEFT — move left;

RIGHT — move right;

UP — move up;

key DOWN — move down;

NEXT_PAGE — switch to next video page;

NEXT_PAGE — switch to previous video page;

FF — move to next archive frame;

REW — move to previous archive frame;

PLAY — start playback archive record;

STOP — start playback archive record;

MODE_ARCH — switch camera to archive mode;

MODE_VIDEO — switch camera to live mode.

ADD_SEQUENCE command usage example is represented below.

Listing 19. ADD_SEQUENCE command example.

"ADD_SEQUENCE","mode","2x2","seq","1|2|3|4","arch","2,4"
/* Set 2x2 layout and place cameras with ID 1, 2,
/* 3, 4 into cells with according positions, cameras with IDs
/* 2 and 4 are displayed in archive mode

"ADD_SEQUENCE","mode","2x2","seq","1|||2"
/* Set 2x2 layout and place cameras with ID 1, 2
/* into the first and the last cells. Cells 2 and 3 are empty

5.2.3.11 Image Processor

Object type identifier: IMAGE_EXPORT.

Table 33. IMAGE_EXPORT Events

Event identifier: TASK_QUEUE_OVERLOADED

Event name in macro: none

www.isscctv.com
SecurOS 76 Programming Guide
Appendixes

Description: Task queue of the Image Processor is overloaded. A new tasks are not queued until
queue is underloaded (see TASK_QUEUE_UNDERLOADED notification below)

Parameters: none

Event identifier: TASK_QUEUE_UNDERLOADED

Event name in macro: none

Description: Task queue of the Image Processor is underloaded

Parameters: none

Event identifier: EXPORT_FAILED

Event name in macro: none

Description: Export failed

Parameters:
request_
id Query ID

Event identifier: EXPORT_DONE

Event name in macro: none

Description: Export successful

Parameters:
request_
id Request ID specified in the image export query

Table 34. IMAGE_EXPORT Commands

Command identifier: EXPORT

Name used in Map/ Macros: none

Description: Process and export an image (frame) into file or database

Parameters:

Query ID. Specified value will be returned in the answer event


request_id
(see Table 34).

www.isscctv.com
SecurOS 77 Programming Guide
Appendixes

Parameters of the queried image:

cam — id of the camera, for which it is necessary to export a frame;

time — date and time of the frame. May be specified in one of the
following formats:

DD-MM-YY HH:MM:SS.XXX;

YYYY-MM-DD HH:MM:SS.XXX.
import
Note. Milliseconds are optional (any number of characters).

Frame search is performed within one second interval to the left and right
from specified time. A frame that is closest to the specified time is exported.
For example, if specified time is 10:56:02 (or 10:56:02.xxx), then
system will search frame within 10:56:02.000 (10:56:02.xxx) -
10:56:02.999 interval.

If there is no frame within search interval for the specified camera archive on
the given video server, then command fails.

Frame saving type. Possible values:

export_engine sql — into the database;

file — into the file.

Export parameters.

When exporting into a f ile:

filename — name of the saved file. File name extension is optional. If not
specified or set incorrect, system automatically changes extension
depending of the type of original file (see export_image parameter);

dir — full path to the file. You can define both existing and created
directory.
export
Note. Result file must be stored on the logical disks (or available network disks)
of that Video Server, where given Image Processor object is created.

When exporting into a database:

external database id — id of the external database, specified within


SecurOS;

query — SQL-query to save image into the database.

www.isscctv.com
SecurOS 78 Programming Guide
Appendixes

Parameters of the result file:

format — format of the saved file. Possible values: jpeg, jpg, png.
Default value — jpg;
export_image
(optional) quality — image quality. Possible values: [-1; 0 — 100]. Default
value is -1, that correspond to the quality, specified inside used image
export library.

Note. The higher a parameter value, the better image quality and greater file size.

Image processing parameters (cropping initial image, drawing a figures,


inserting text etc.):

color — color of the figure to be drawn. A name or code of the color (in
RGB format, see http://www.w3.org/TR/SVG/
types.html#ColorKeywords) must be specified. Default value is green;

penwidth:N — line width. Possible N values (in pixels): [0;100]. Default


value is 2;

rect:x,y,w,h — draw a rectangle with x, y coordinates of the upper


left corner, width w and height h (in percent of image size). Possible values
for each parameter: [0; 100];

Note. If linear dimensions of the specified rectangle exceed image size, then
exceeding part of the rectangle is cropped.

crop:x,y,w,h — crop an image to the w, h (width, height) linear


dimensions, beginning from the upper left corner x, y (in percent of the
image size). Possible values for each parameter: [0; 100];

process default — set default values for the color and penwidth parameters;
(optional)
font:N — font size (in pixels);

Note. Depending on used library, can be specified in relative units.

www.isscctv.com
SecurOS 79 Programming Guide
Appendixes

polygon:x1,y1,x2,y2, . . . ,xn,yn — draw a closed polygon


with x1,y1,x2,y2, . . . ,xn,yn vertex coordinates (in percent of
the image size). The vertexes are connected in series, with straight lines,
the last vertex is connected with the first one;

polyline:x1,y1,x2,y2, . . . ,xn,yn — draw a polyline with


x1,y1,x2,y2, . . . ,xn,yn vertex coordinates (in percent of the
image size). The vertexes are connected in series, with the straight lines;

text:x,y,text — draw text on image. Text insertion start point is x,y


(the lower left border of the first character, in pixels);

Notes:
1. If the input string contains a ";" character (semicolon), all text must be
screened with "$. . .$" characters, for example, "$one;two$".
2. If string length or font size exceeds frame size, only part of the inscription
that fits frame size is drawn.
3. The collection of fonts and languages depends on installed operation
system.

Warning! You can specify random number of the image processing parameters
inside the same export command. Specified parameters are processed sequentially,
i.e. each following specified parameter is applied to the image, that is a result of
execution of the command with previous specified parameter.

text_size:text — add a black area under result image, obtained after


execution of the process operation, and output within it a text string in
white with text_size font size (optional parameter, if not specified then
default value is used).

Width of area to be added is set equal to the width of the resulting image.
Height of area to be added is set automatically and depends on length of
initial string.
caption
Notes:
1. If length of a source string is greater than the width of the image, the
system automatically flows text to the next line "by words". If a single
word does not fit on one line, the system truncates the word characters for
the width of the image.
2. In the original text string it is allowed to use tab and carriage return
characters (for example, for VB/JScript these are "\t" and "\n",
accordingly). This can be applied to the Modules and third-party
integrations.

EXPORT command usage example is represented below.

Listing 20. EXPORT usage example

function Init(){
Core.RegisterEventHandler("MACRO","1.3","RUN",OnMacroEx);
}
function OnMacroEx(){
Core.DoReact("IMAGE_EXPORT","1","EXPORT","import","cam$1;
time$2015-02-06 09:36:36.000","export_engine","file","export",

www.isscctv.com
SecurOS 80 Programming Guide
Appendixes

"filename$ex_frame;dir$C:\\EXPORTED_FRAMES_EXAMPLE","export_image",
"format$png;quality$70","process","rect:10,10,30,40;color:255,0,0;
rect:5,5,20,20;color:blue;rect15,15,20,20;default;penwidth:5;
rect25,25,20.5,20;crop:0,0,50,55.5");
}

/* C:\EXPORTED_FRAMES_EXAMPLE\ex_frame.png
file is created as a result of command execution */
/* Rectangles are drawn above the image (coordinates are in %
/* of initial image size):
/* green 10,10,30,40, red 5,5,20,20, blue 15,15,20,20
/* drawn with line width 3,
/* green 25,25,20.5,20 drawn with line width 5.
/* Then the image is cropped

5.2.3.12 Edge Storage Sync

Object type identifier: EDGE_STORAGE.

Events: none

Table 35. EDGE_STORAGE Commands

Command identifier: SYNC_NOW

Name used in Map/ Macros: none

Description: Launch archive synchronization

Parameters: none

5.2.4 Audio Subsystem

This section describes the events and actions of audio subsystem's objects.

5.2.4.1 Microphone

Object type identifier: AUDIO_LINE.

Table 36. AUDIO_LINE Events

Event identifier: ARM

Event name in macro: Arm

Description: Audio sensor is turned on

Parameters: none

Event identifier: DISARM

Event name in macro: Disarm

Description: Audio sensor is turned off

www.isscctv.com
SecurOS 81 Programming Guide
Appendixes

Parameters: none

Event identifier: REC

Event name in macro: Record start

Description: Recording of signal has occurred

Parameters: none

Event identifier: REC_STOP

Event name in macro: Record stop

Description: Record stop

Parameters: none

Event identifier: RESET

Event name in macro: Reset line

Description: Microphone attached

Parameters: none

Event identifier: VOX_OFF

Event name in macro: Accu stop

Description: Voice operated control is off

Parameters: none

Event identifier: VOX_ON

Event name in macro: Accu start

Description: Voice operated control is on

Parameters: none

Table 37. AUDIO_LINE Commands

Command identifier: ARM

Name used in Map/ Macros: Record start

Description: Start record

Parameters: none

Command identifier: DISARM

Name used in Map/ Macros: Record stop

Description: Stop record

www.isscctv.com
SecurOS 82 Programming Guide
Appendixes

Parameters: none

5.2.4.2 Audio Player

Object type identifier: PLAYER.

Table 38. PLAYER Events

Event identifier: START_LISTEN

Event name in macro: none

Description: Start listening

Parameters: none

Event identifier: STOP_LISTEN

Event name in macro: none

Description: Stop listening

Parameters: none

Table 39. PLAYER Commands

Command identifier: START_LISTEN

Name used in Map/ Macros: none

Description: Start listening

Parameters: none

Command identifier: STOP_LISTEN

Name used in Map/ Macros: none

Description: Stop listening

Parameters: none

5.2.5 I/O Subsystem

This section describes the events and actions of i/o subsystem's objects.

5.2.5.1 Sensor

Object type identifier: GRAY.

Table 40. GRAY Events

Event identifier: ALARM

www.isscctv.com
SecurOS 83 Programming Guide
Appendixes

Event name in macro: Alarm

Description: Alarm detected

Parameters: none

Event identifier: ARM

Event name in macro: Arm

Description: Armed

Parameters: none

Event identifier: CONFIRM

Event name in macro: Confirm

Description: Alarm confirmed

Parameters: none

Event identifier: DISARM

Event name in macro: Disarm

Description: Disarmed

Parameters: none

Event identifier: NOT_VALID_STATE

Event name in macro: Not valid state

Description: Zone is not valid

Parameters: none

Event identifier: OPEN

Event name in macro: Open

Description: Open

Parameters: none

Event identifier: NORM

Event name in macro: Normal

Description: Zone is normal

Parameters: none

Event identifier: SHORT_CIRCUIT

Event name in macro: Short circuit

Description: Short circuit

Parameters: none

www.isscctv.com
SecurOS 84 Programming Guide
Appendixes

Event identifier: SABOTAGE

Name used in Map/ Macros: Sabotage

Description: Sabotage

Parameters: none

www.isscctv.com
SecurOS 85 Programming Guide
Appendixes

Table 41. GRAY Commands

Command identifier: INIT

Name used in Map/ Macro: none

Description: Setup (change) sensor parameters. Settings are applied temporarily (until server
which is responsible for that object restarts)

Parameters:

chan Channel number [0; 7]

parent_id Parent video capture device ID

Sensors type (0 — ray with on locking abrasion type; 1 — ray with on


type
breaking abrasion type)

Command identifier: DISABLE_RAY

Name used in Map/ Macros: Disable sensor

Description: Disable sensor object

Parameters:

parent_id Parent video capture device ID

Command identifier: ARM

Name used in Map/ Macros: Arm

Description: Arm

Parameters: none

Command identifier: CONFIRM

Name used in Map/ Macros: Confirm

Description: Confirm alarm

Parameters: none

Command identifier: DISARM

Name used in Map/ Macros: Disarm

Description: Disarm

Parameters: none

5.2.5.2 Relay

Object type identifier: GRELE.

Table 42. GRELE Events

Event identifier: OFF

www.isscctv.com
SecurOS 86 Programming Guide
Appendixes

Event name in macro: Relay off

Description: Relay off

Parameters: none

Event identifier: ON

Event name in macro: Relay on

Description: Relay on

Parameters: none

Table 43. GRELE Commands

Command identifier: INIT

Name used in Map/ Macro: none

Description: Change settings of relay. Settings are applied temporarily (until server which is
responsible for that object restarts)

Parameters:

chan Channel number [0; 7]

parent_id Parent video capture device ID

Command identifier: OFF

Name used in Map/ Macros: Switch off

Description: Switch relay off

Parameters: none

Command identifier: ON

Name used in Map/ Macros: Switch on

Description: Switch relay on

Parameters: none

Command identifier: DISABLE_RELE

Name used in Map/ Macros: Disable relay

Description: Disable relay object

Parameters:

parent_id Parent video capture device ID

www.isscctv.com
SecurOS 87 Programming Guide
Appendixes

5.2.6 Notification Subsystem

This section describes the events and actions of notification subsystem's objects.

5.2.6.1 E-mail Message

Object type identifier: MAIL_MESSAGE.

Table 44. MAIL_MESSAGE Events

Event identifier: SEND_ERROR (alarm)

Event name in macro: Message sending error

Description: Message sending error

Parameters: none

Event identifier: SENT

Event name in macro: Message sent

Description: Message sent

Parameters: none

Table 45. MAIL_MESSAGE Commands

Command identifier: SEND

Name used in Map/ Macro: Send message

Description: Sending a message with specified template

Parameters:
param_name_1, Arbitrary variables of the message, specified in the Subject and/or Message
param_name_2, ... f ield. Optional parameters
, param_name_N

Redefinable parameter of the command, specified in the Attachment text


attachments
box of the mail message template. Optional parameter

5.2.6.2 Short Message

Object type identifier: SHORT_MESSAGE.

Table 46. SHORT_MESSAGE Events

Event identifier: SEND_ERROR (alarm)

Event name in macro: Message sending error

Description: Message sending error

Parameters: none

www.isscctv.com
SecurOS 88 Programming Guide
Appendixes

Event identifier: SENT

Event name in macro: Message sent

Description: Message sent

Parameters: none

Table 47. SHORT_MESSAGE Commands

Command identifier: SEND

Name used in Map/ Macro: Send message

Description: Send message

Parameters: none

5.2.6.3 Audible Notification Service

Object type identifier: VNS.

Events: none.

Table 48. VNS Commands

Command identifier: PLAY_WAV

Name used in Map/ Macro: Play wave file

Description: Play WAV-file

Parameters:

Path to WAV file (with extension) relative to SecurOS folder (e. g. file<
file
\wav\cam_alarm_1.wav>)

5.2.7 Automation Subsystem

This section describes the events and actions of automation subsystem's objects.

5.2.7.1 Time Zone

Object type identifier: TIME_ZONE.

Table 49. TIME_ZONE Events

Event identifier: ACTIVATE

Event name in macro: Begin

Description: Beginning zone

www.isscctv.com
SecurOS 89 Programming Guide
Appendixes

Parameters: none

Event identifier: DEACTIVATE

Event name in macro: End

Description: End of zone

Parameters: none

Commands: none.
5.2.7.2 Macro

Object type identifier: MACRO.

Table 50. MACRO Events

Event identifier: RUN

Event name in macro: Execute

Description: Macro has been executed

Parameters: none

Table 51. MACRO Commands

Command identifier: RUN

Name used in Map/ Macro: Execute

Description: Execute macro

Parameters: none

5.2.7.3 CellBox
CellBox is a special object type used to “catch” multiple events within given time frame. If all cells of an
object are set within a defined time frame, CellBox fires a positive event and clears its cells. If a time-out
occurs, a negative event is fired and cells are also cleared. For example, you can set up security system
to authorize person if his car’s license plate is recognized and if he types in a PIN code within 15
seconds.

Object type identifier: CELLBOX.

Table 52. CELLBOX Events

Event identifier: TIMEOUT

Event name in macro: none

Description: Timeout occurred: the CellBox object is not filled within given time frame

www.isscctv.com
SecurOS 90 Programming Guide
Appendixes

Parameters: none

Event identifier: FILLEDUP

Event name in macro: none

Description: CellBox object is filled

Parameters:

count Number of cells in the CellBox object


cell0, cell1, . .
, cellN Value of the corresponding cell

Commands: none.

5.3 Technical Support Information

Current section contains service information that is necessary on addressing to Intelligent Security
Systems Technical Support.

Note. Collected data have to be send by e-mail on Intelligent Security Systems Technical Support e-mail
address (see Getting Technical Support).

To ensure quick technical support, prepare the following technical information:

Warning! Data in items marked by "*'' are necessary to report.

1. (*) User (customer) name to address to.


2. (*) Organization name.
3. (*) User (or organization) contacts: phone, e-mail.
4. Name of a personal Intelligent Security Systems manager (on Intelligent Security Systems authorized
partner case). Otherwise, give the following data:
Company where the hardware and software components were purchased.
Actions proposed to solve the problems announced by a partner from whom the product was
purchased.
5. (*) Problem description.
6. (*) Actions results in the problem.
7. List of changes which result to the problem in case of applying after some changes in system
settings/configuration.
8. System and diagnostic information on computer and SecurOS system configuration obtained from
the ISS System Report Utility (see SecurOS Administration Guide for detailed information about
utility).
If it is impossible to run the utility provide the following information:
(*) video capture cards serial number and Dallas code, Guardant keys identifier and Dallas code;

www.isscctv.com
SecurOS 91 Programming Guide
Appendixes

Note. Equipment Dallas code can be found by the ISS Hardware Report utility (see SecurOS Administration
Guide for detailed information about utility).

(*) name and version of the installed Intelligent Security Systems company software.
video capture cards driver version.
total number of video servers, remote administrator and monitoring (operator) workstations in the
system;
operating system (name and service pack version).
9. Another useful information, if possible. For example:
computer equipment configuration.
central processors load.
main and virtual memory used volumes.
network load.
network and network neighborhood configuration.

www.isscctv.com
SecurOS 92 Programming Guide
Index

AUTOPAN_END_P command, 60
AUTOPAN_START command, 60
AUTOPAN_START_P command, 61
AUTOPAN_STOP command, 61

Index B
BLINDING event, 51
_
_system.js file, 38 C
CAM_ADDED event, 68
A CAM_MODE command, 71
ABSENT event, 59 CAM_REMOVED event, 68
ACTIVATE command, Camera object, 50
Desktop, 47 CARD_DUPLICATED event, 44
ACTIVATE event, CellBox object, 89
Time Zone, 88 CLEAR_PRESET command, 61
ACTIVATE_CAM command, 72 ClearInterval function, 31
ACTIVATE_CAM event, 68 ClearTimeout function, 30
ACTIVATE_OBJECT event, 48 Computer object, 44
ADD_SEQUENCE command, CONFIRM command, 85
Media Client, 73 CONFIRM event, 83
Monitor, 70 CONN_OVERLOAD event, 45
ALARM event, 82 CONNECT_ONE command, 46
ARCH_CONVERT_CMD_FAILED event, 64 CONNECT_OTHER command, 46
ARCH_EXPORT command, 66 CONNECTED event, 44
ARCH_EXPORT_CMD_FAILED event, 64
ARCH_FRAME_FIRST command, 69 D
ARCH_FRAME_LAST command, 70
D2OFF command, 61
ARCH_FRAME_NEXT command, 69
D2ON command, 61
ARCH_FRAME_POSITION command, 70
DB_OVERLOAD event, 45
ARCH_FRAME_PREV command, 69
DEACTIVATE command,
ARCH_FRAME_TIME command, 68
Desktop, 48
ARCH_FRAME_TIME_ANY command, 69
DEACTIVATE event,
ARCH_FRAME_TIME_EXACT command, 70
Time Zone, 89
Archive Converter object, 64
Debugging Your Scripts, 34
Archiver object, 67
DEFOCUSED event, 52
ARM command,
DELETE command, 54
Camera, 52 Desktop object, 47
Microphone, 81 DETACH event, 51
Sensor, 85 DISABLE_RAY command, 85
Zone, 58 DISABLE_RELE command, 86
ARM event,
DISARM command,
Microphone, 80
Camera, 52
Region, 47
Microphone, 81
Sensor, 83
Sensor, 85
Zone, 58
Zone, 58
ARMED event, 50
DISARM event,
ATTACH event, 51
Microphone, 80
Audible Notification Service object, 88
Region, 47
Audio Player object, 82
Sensor, 83
AUTOFOCUS_ON command, 60
Zone, 58

www.isscctv.com
SecurOS 93 Programming Guide
Index

DISARMED event, 51
DISCONNECT_ONE command, 46 I
DISCONNECTED event, 45
ICoreMsg object, 41
DoReact, function, 27
Image Processor object, 75
DOWN command, 61
IMsgFilter object, 40
INIT command,
E Relay, 86
Edge Storage Sync object, 80 Sensor, 85
E-mail Message object, 87 IRIS_AUTO_MODE command, 58
ERROR event, IRIS_CLOSE command, 57, 62
VB/JScript program, 43 IRIS_OPEN command, 57, 62
Event handlers functions, 15 IRIS_STOP command, 58, 62
Event Viewer object, 48 IsObjectDisabled, function, 29
EXPORT command, 76 IsObjectExists, function, 29
EXPORT_DONE event, 76 IsObjectState, function, 30
EXPORT_FAILED event, 76
EXPORT_FRAME command, 70 J
EXPORT_FRAME_FROM_ACTIVE_CAM command,
JOYSTICK command, 74
73
EXPORTED_FRAME event, 68
K
F KEY_PRESSED command, 71, 74

FILLEDUP event, 90
FIND_OBJECT command,
L
Map Window, 48 LEFT command, 62
FOCUS_AUTO_MODE command, 57 LEFT_DOWN command, 62
FOCUS_IN command, 57, 61 LEFT_UP command, 63
FOCUS_OUT command, 57, 62 Light Detector object, 59
FOCUS_STOP command, 57, 62 LIGHT_OFF event, 59
FOCUSED event, 52 LIGHT_ON event, 59

G M
GetObjectChildIds, function, 29 Macro object, 89
GetObjectIds, function, 29 Map Window object, 48
GetObjectName, function, 27 MAXIMIZE_OR_RESTORE command, 74
GetObjectParam, function, 28 MD_START event,
GetObjectParentId, function, 28 Camera, 51
GetObjectParentType, function, 29 Zone, 58
GetObjectState, function, 28 MD_STOP event,
GetSelfId, function, 26 Camera, 51
GO_PRESET command, 62 Zone, 58
Media Client object, 71
H Microphone object, 80

HIDE command,
HTML Dialog, 49
N
HTML Form, 49 NEXT_FRAME command, 72
HOME command, 56 NEXT_RECORD command, 73
HTML Dialog object, 49 NORM event, 83
HTML Form object, 49 NOT_VALID_STATE event, 83

www.isscctv.com
SecurOS 94 Programming Guide
Index

RIGHT_DOWN command, 63
O RIGHT_UP command, 63
RUN command,
OFF command, 86
OFF event, 85 Macro, 89
RUN event,
ON command, 86
ON event, 86 Macro, 89
OPEN event, 83
S
P SABOTAGE event, 84
SAVE_CONFIG command, 43
PATROL_LEARN command, 63
SEEK command, 71
PATROL_PLAY command, 56, 63
SEND command,
PATROL_STOP command, 57, 63
PLAY command, 72 E-mail Message, 87
SEND event,
PLAY_WAV command, 88
PRESENT event, 59 Short Message, 88
SEND_ERROR event,
PRESET_RECALL command, 56
PREV_FRAME command, 72 E-mail Message, 87
PREV_RECORD command, 73 Short Message, 87
SendEvent, function, 27
PROGRAM event, 45
Sensor object, 82
PROTOCOL_RCVD event, 45
SENT event,
PTZ Device object, 60
E-mail Message, 87

Q Short Message, 88
SET_DRIVERS command, 50
QUEUE_CRITICAL event, 45 SET_MUX command, 55
QUEUE_NORMAL event, 45 SET_PRESET command, 63
QUEUE_WARNING event, 46 SetInterval function, 31
SetTimeout function, 30
R SETUP command,
REC command, 52 Video Capture Device, 50
REC event, Zone Object Detector, 59
Camera, 51 Short Message object, 87
Microphone, 81 SHORT_CIRCUIT event, 83
REC_ERROR event, SHOW command,
Camera, 52 HTML Dialog, 49
REC_ROLLBACK command, 53 HTML Form, 49
REC_STOP command, 54 SHOW_INFO_MESSAGE command, 46
REC_STOP event, SHOW_INFO_MESSAGE event, 46
Camera, 52 START command, 67
Microphone, 81 START_LISTEN command, 82
Region object, 47 START_LISTEN event, 82
REGISTER_ERROR event, 46 START_VIDEO command,
REGISTERED event, 44 Camera, 54
RegisterEventHandler, function, 24 STOP command,
RegisterReact, function, 26 Archiver, 67
RegisterTimerHandler, function, 25 Media Client, 72
Relay object, 85 PTZ Device, 64
REQUEST_MASK command, 55 STOP_LISTEN command, 82
RESET event, STOP_LISTEN event, 82
Microphone, 81 STOP_VIDEO command, 55
Zone Object Detector, 59 SWITCH_ALL_CAMERAS_TO_LIVE command, 74
RIGHT command, 63 SWITCH_PAGE_TO_ARCHIVE command, 74

www.isscctv.com
SecurOS 95 Programming Guide
Index

SYNC_NOW command,
Edge Storage Sync, 80
SYNC_PROTOCOL command, 47
System object, 43

T
TASK_ENQUEUED event, 65
TASK_FAILED event, 65
TASK_FINISHED event, 65
TASK_NOT_EXISTS event, 65
TASK_QUEUE_OVERLOADED event, 75
TASK_QUEUE_UNDERLOADED event, 76
TASK_STARTED event, 65
technical support,
how to get, 6
how to prepare service information, 90
Time Zone object, 88
TIMEOUT event,
CellBox, 89
PTZ Device, 60
Timer functions, 20

U
UNBLINDING event, 52
UNKNOWN event, 59
UNREGISTERED event, 44
UnregisterEventHandler, function, 25
UnregisterReact, function, 26
UnregisterTimerHandler, function, 26
UP command, 64
User account object, 44

V
VB/JScript program object description, 11
Video Capture Device object, 50
VOX_OFF event, 81
VOX_ON event, 81

W
window.external.dispSOCoreProvider object, 39

Z
Zone object, 58
Zone Object Detector object, 59
ZOOM_IN command, 64
ZOOM_OUT command, 64

www.isscctv.com

You might also like