SecurOS IIDK Programming Guide 11.7
SecurOS IIDK Programming Guide 11.7
IIDK Manual
IIDK Manual (Manual - EN, build 120 on 28.09.2023).
SecurOS® ("SecurOS") and all respective logos are trademarks of ISS Corp, in the U.S. and/or other countries.
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.
IIDK 3 Manual
Contents
Contents
1 Preface 4
1.1 Scope
........................................................................... 4
1.2 Target
. . . Audience
........................................................................ 4
1.3 Using
. . .This
. . . .Manual
.................................................................... 4
1.4 Getting
. . . .Technical
. . . . . . . . .Support
.............................................................. 4
1.5 SecurOS
. . . . . Editions
. . . . . . . .Naming
. . . . . . .Convention
....................................................... 5
1.6 Design
. . . .Convention
....................................................................... 6
1.7 Design
. . . .Elements
....................................................................... 6
2 General Features 7
2.1 IIDK. Package
. . . . . . . .Structure
.................................................................. 8
Index 27
www.issivs.com
IIDK 4 Manual
Preface
1 Preface
This section contains general information about the document, the means of its design and use, as well
as how to get additional technical support for the product.
1.1 Scope
Current manual provides general information about programming SecurOS security system, describes
the process of Modules and hardware integrations, gives some integrations examples.
To get online help (Microsoft HTML Help) just press the F1 key when running SecurOS. In
administration mode You can get context help for a given object/utility by pressing the F1 key when its
settings window/utility window is open. In operator mode, use the F1 key to open a description of the
active window of the current operator interface or utility.
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:
Note. For all technical support requests, please open a ticket from the ISS Partner Portal:
https://support.issivs.com. You will need to create an account if you don’t already have one.
www.issivs.com
IIDK 5 Manual
Preface
· in USA:
Phone: +1 732 855 1111
· in Canada:
Phone: +1 778 929 8565
· in Mexico:
Phone: +52 55 9001 5252
· in Colombia:
Phone: +57 320 303 2849
· in Brazil:
Phone: +55 85 9668 2530
· in Central America and Caribbean:
Phone: +502 5517 8395
· in Argentina/ Paraguay/ Uruguay:
Phone: +54 911 5039 6440
· in Peru/ Bolivia/ Chile:
Phone: +56 9 3261 9893
· in Ecuador:
Phone: +57 312 255 2932
· in Venezuela:
Phone: +57 321 722 0425
· in Europe:
Phone: +380 44 299 0810
· in Dubai:
Phone: +971 4 874 7100
· in Qatar:
Phone: +974 6 677 8309
· in Saudi Arabia:
Phone: +966 54 109 9699
To solve problems faster, we recommend preparing the service information described in the Technical
Support Information Section before addressing the Technical Support Team.
www.issivs.com
IIDK 6 Manual
Preface
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:
The functionality is available in the following editions: SecurOS Monitoring & Control Center,
SecurOS Datacenter, SecurOS Enterprise, SecurOS Premium, SecurOS Prof essional.
Font Description
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).
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.issivs.com
IIDK 7 Manual
General Features
2 General Features
The functionality is available in the following editions: SecurOS Enterprise, SecurOS Premium.
IIDK — ISS Integration Development Kit — is a library, that allows to develop an applications,
interacting with SecurOS by means of messaging.
Commands sent to the SecurOS objects and events received from the SecurOS objects, are described in
SecurOS Programming Guide. Events generated by the objects of the Video Analytics Modules
(SecurOS LPR, SecurOS Cargo etc.) are described in appropriate Module Manuals.
IIDK API represents a dll containing a set of __stdcall functions. This means that integration
software can be developed in any programming language, which allows to call Windows API functions
directly. A header file and import library are supplied to provide developing in C++. A special
wrapping is supplied to provide developing in .Net platform languages.
To allow connection with SecurOS from specified computer, it is necessary to register this computer in
the SecurOS system configuration, then create a IIDK Interf ace child object. Right away an IIDK Interf ace
object is created, it is marked in the SecurOS Object Tree with the red cross, that means no current
connection with this interface (see SecurOS Administration Guide).
Once the application starts and loads iidk.dll, it must call the ConnectEx function, where id of the
IIDK Interf ace object that has to be connected to is specified. After connection is established, one can
control SecurOS objects sending them commands using the SendDoReact function. To notify SecurOS
about events use the SendMsg function. To configure objects and receive information about objects use
the CORE||UPDATE_OBJECT, CORE||GET_CONFIG, CORE||GET_STATE functions. To receive events
from SecurOS can be either asynchronously, via callback function, specified when establishing a
connection, or synchronously, using the GetMsg function. Upon completion of works it should be close
connection with the IIDK Interf ace object using the Disconnect function.
Warning! The same IIDK Interf ace object can not be connected several times simultaneously.
www.issivs.com
IIDK 8 Manual
General Features
· iidk.h — the header file with the declarations of the functions to be imported;
· iidk.lib — import library for the Microsoft Visual С++ 2012;
· iidk_vc80.lib — import library for the Microsoft Visual С++ 2005;.
To get a list of all exported functions (import library) of the iidk.dll for other compilers use the
compiler built-in utilities. For example, for Visual Studio these are the dumpbin.exe and lib.exe
utilities.
· ISS.SecurOS.idk.dll — a build with wrapping over the iidk.dll (see Developing .Net
Applications).
www.issivs.com
IIDK 9 Manual
IIDK API Functions
Connection between an application and the SecurOS security system via TCP/IP is established with the
help of IIDK Interf ace object.
Warning! Connecting to the SecurOS is performed only on that computer, where IIDK Interf ace object is
created in the SecurOS Object Tree.
Syntax
int __stdcall ConnectEx(const char* address, const char* port,
const char* id, iidk_callback_ex* lpfunc, unsigned long user_param,
int connect_type, unsigned long connect_attempts)
Parameters
· address
Server address to connect to — any computer where SecurOS core is running. It is allowed to use
both server IP address and server DNS/WINS name within local TCP/IP network. On the local
server connection it is allowed to specify 127.0.0.1.
· port
TCP/IP port number that is used to establish conection with SecurOS core. Use the 1030 value to
establish connection via IIDK Interf ace.
Note. Physical port number value is 21030, 1030 value is used only when connecting via IIDK Interf ace
object.
· id
Identifier of the IIDK Interf ace object, you are connecting to.
· lpfunc
Callback function to receive messages from the SecurOS core (see Callback Function). If set to 0, the
GetMsg function has to be used to receive a messages (see Receiving Messages).
· user_param
www.issivs.com
IIDK 10 Manual
IIDK API Functions
· connect_type
· connect_attempts
Number of connection attempts. If set to 0, number of attempts is not limited. Has no sense for the
synchronous connection. For asynchronous connection it is recommended to use value of 0.
Returned value
Synchronous connection:
· 1 — connection established;
· 0 — connection failed.
Asynchronous connection:
· 1 — connection is being established;
· 0 — connection failed.
Syntax
void __stdcall Disconnect(const char* id)
Parameters
· id
www.issivs.com
IIDK 11 Manual
IIDK API Functions
Note. When connection is lost from network (with no call of the Disconnect function), then IIDK Interf ace
object sends application the DISCONNECTED event.
Any messages from the SecurOS core an application receives as a commands. Depending on the
SecurOS's message type, each received command can be interpreted as:
Commands
Commands are received by application in the following form:
ACTIVEX|id|action|param1<val1>,param2<val2>,. . ., where:
· ACTIVEX — type of the IIDK Interf ace object, specified within SecurOS. Type is the constant value.
· id — identifier of the IIDK Interf ace object, to which the command was sent. Your application will
receive commands that were sent only to those IIDK Interf ace objects, to which it is connected.
· action — a command itself.
· param1<val1>,param2<val2>,. . . — command parameters and their values. List of
parameters can include core service parameters, which were missing in the command at the
command sending time (for example, slave_id, time, date etc.).
Except parameter list, commands are passed to the application in theirs initial form, generated by
SecurOS.
Command example:
ACTIVEX|1|SETUP|int_obj_id<1>,flags<>,ignore_rights<1>,parent_id<V-GLAVNOV>,
objname<IIDK Interface 1>,name<IIDK Interface 1>
Events
Events are passed to the application in a form of a command to process events. Command to process an
event is as follows:
ACTIVEX|id|EVENT|objtype<objtype>,objid<objid>,objaction<action>,
param1<val1>,param2<val2>,. . .
· ACTIVEX — type of the IIDK Interf ace object, specified within SecurOS. Type is the constant value.
· id — identifier of the IIDK Interf ace object, to which the command was sent. Your application will
receive commands that were sent only to those IIDK Interf ace objects, to which it is connected.
· EVENT — is a sign, that received message represents a command to process an <objaction> event.
· objtype — type of the object, which sent an event.
www.issivs.com
IIDK 12 Manual
IIDK API Functions
As opposed to commands, an events pass in application in a modified form. For example, the SecurOS
event notifying about camera with identifier id=1 defocus:
CAM|1|DEFOCUSED
ACTIVEX|1|EVENT|int_obj_id<1>,slave_id<V-GLAVNOV>,objaction<DEFOCUSED>,
action<DEFOCUSED>,core_global<1>,objtype<CAM>,objid<1>,owner<V-GLAVNOV>,
time<09:09:03.419>,date<14-10-14>
An application can process commands, as well as ignore them. An application have no mandatory
commands to process.
Function is used to receive a messages generated by SecurOS core. Is declared inside application and
specified by the ConnectEx call (see Establishing Connection with SecurOS).
Syntax
void __stdcall Callback(const char* msg, char* slave_id,
unsigned long user_param)
Parameters
· msg
· slave_id
· user_param
www.issivs.com
IIDK 13 Manual
IIDK API Functions
If callback function was not specified when establishing connection with ConnectEx, then the GetMsg
function must be used to receive an Events.
Syntax
int __stdcall GetMsg(char* msg, unsigned long& cb)
Parameters
· msg
Message body.
· cb
Returned value
A SETUP type event is sent to the application each time when connection with the SecurOS core is
established:
ACTIVEX|1|SETUP|int_obj_id<1>,flags<>,ignore_rights<1>,parent_id<V-GLAVNOV>,
objname<IIDK Interface 1>,name<IIDK Interface 1>
An OBJECT_CREATED type event is sent to the application when SecurOS object is created:
ACTIVEX|1|OBJECT_CREATED|int_obj_id<1>,objtype<INTERCOM>,objid<1>
· objtype
· objid
If a set of the SecurOS object parameters is changed, then application will receive a CONFIG_CHANGED
event generated by changed object:
ACTIVEX|1|EVENT|int_obj_id<1>,objaction<CONFIG_CHANGED>,action<CONFIG_CHANGED>,
disabled<0>,objtype<CAM>,objid<100>,time<11:14:10.902>,date<03-10-14>
www.issivs.com
IIDK 14 Manual
IIDK API Functions
· objtype
· objid
An OBJECT_DELETED type event is sent to the application when SecurOS object is deleted:
ACTIVEX|1|OBJECT_DELETED|int_obj_id<1>,parent<S-PROKHOROV>,objtype<INTERCOM>,
objid<1>
· parent
· objtype
· objid
Syntax
int __stdcall SendDoReact(const char* id, const char* msg)
Parameters
· id
· msg
"CAM|1|REC_ROLLBACK|rollback_time_abs<15:00:00.000>,start_rec<1>"
Returned value
www.issivs.com
IIDK 15 Manual
IIDK API Functions
Note. SecurOS object control commands are described in SecurOS Programming Guide.
To send SecurOS an events, notifying that state of the external system object is changed, the SendMsg
function is used.
Syntax
int __stdcall SendMsg(const char* id, const char* msg)
Parameters
· id
· msg
"CARDREADER|25|READ|card<123456789>"
Returned value
www.issivs.com
IIDK 16 Manual
IIDK API Functions
After message is sent, it can be added into the SecurOS Event Viewer and processed with the help of
SecurOS scripts or VB/ JScript Module.
Warning! In order that an event should be added into the Event Viewer, it must be created (described) in the
ddi-file with the help of ISS Object Types Database Editor system utility (ddi.exe).
www.issivs.com
IIDK 17 Manual
SecurOS Object Management
The main functions include creating, editing object parameters and deleting SecurOS object:
Event Function
Syntax
CORE||UPDATE_OBJECT|objtype<OBJ_TYPE>,objid<OBJ_ID>,parent_id<PARENT_ID>,
name<OBJ_NAME>,param0<value0>, . . .,paramN<valueN>
Parameters
· objtype
· objid
· parent_id
· name
· param0<value0>, . . .,paramN<valueN>
www.issivs.com
IIDK 18 Manual
SecurOS Object Management
Parameters of the object of the given type. For object that has a OBJ_TYPE type are described in
dbi-file (for example, securos.dbi). If some of the object parameters are not specified, then
default values are used when object is created and, when object is updated, its current values are not
changed.
if (!res) {
AfxMessageBox(<<Error>>);
}
Disconnect(id);
Syntax
CORE||GET_CONFIG|objtype<OBJ_TYPE>,objid<id>,receiver_id<id>
Parameters
· objtype
www.issivs.com
IIDK 19 Manual
SecurOS Object Management
· objid
· receiver_id
Returned value
A string in a following form:
ACTIVEX|receiver_id|OBJECT_CONFIG|parameter1<value>,parameter2<value>,..., where:
· ACTIVEX
· receiver_id
· parameter1<value>,parameter2<value>,. . .
Object parameters.
Note. If objid parameter is not specified, then function return configuration of all objects of the specified
type.
For example, if you send the following state request for the camera (id=1) via IIDK Interf ace
(receiver_id=7):
CORE||GET_CONFIG|objtype<CAM>,objid<1>,receiver_id<7>
ACTIVEX|7|OBJECT_CONFIG|mask0<>,arch_days<>,blind_level<0>,mask1<>,
codec<default.xml>,flags<>,rec_fps<>,mask2<>,password_crc<0>,compression<2>,
deinterlace<0>,mask3<>,hue<127>,sat_u<5>,mask4<>,hot_rec_fps<>,telemetry_id<>,
region_id<>,md_size<5>,contrast<64>,resolution<0>,audio_type<>,
pre_rec_time<>,agc<1>,config_id<>,alarm_rec<1>,bright<128>,audio_id<>,
hot_rec_time<>,mux<0>,parent_id<1>,objtype<CAM>,blinding<0>,arch_max_days<>,
bc_auto<1>,__slave_id<VideoServer>,objid<1>,recorded<1>,blind_size<0>,
post_rec_time<>,name<Cam1>,objname<Cam1>,priority<0>,color<0>,
_justCreated<0>,hot_alarms_config<0>,md_contrast<8>
CORE||GET_CONFIG|objtype<CAM>,receiver_id<7>
www.issivs.com
IIDK 20 Manual
SecurOS Object Management
Syntax
CORE||GET_STATE|objtype<OBJ_TYPE>,objid<id>,receiver_id<id>
Parameters
· objtype
· objid
· receiver_id
Returned value
A string in a following form:
ACTIVEX|receiver_id|OBJECT_STATE|parameter1<value>,parameter2<value>
,...,state<object_state>, where
· ACTIVEX
· receiver_id
· parameter1<value>,parameter2<value>
Object parameters.
· state
Object state.
Note. Possible values of the state parameter are specified in the [STATE] section of the DDI-file
(securos_*.ddi).
www.issivs.com
IIDK 21 Manual
SecurOS Object Management
For example, if you send the following state request for the camera (id=1) via IIDK Interf ace
(receiver_id=7):
CORE||GET_STATE|objtype<CAM>,objid<1>,receiver_id<7>
ACTIVEX|7|OBJECT_STATE|objtype<CAM>,__slave_id<computer_name.7>,
objid<1>,state<DISARMED_DETACH>
www.issivs.com
IIDK 22 Manual
Developing .Net Applications
SecurosIIDK.Messages class is intended to parse message text and execute inverse operations. Class
properties and methods are represented on Figure 1.
SecurosIIDK.Wrapper class represents library of the static IIDK functions, described earlier. Class
methods are represented on Figure 2.
SecurosIIDK.IidkManager represents a single connection with IIDK Interf ace object in SecurOS and
can be used instead of SecurosIIDK.Wrapper class. Class properties and methods are represented on
Figure 3.
www.issivs.com
IIDK 23 Manual
Developing .Net Applications
Listing 7.
www.issivs.com
IIDK 24 Manual
Developing .Net Applications
www.issivs.com
IIDK 25 Manual
Technical Support Information
Note. Collected data have to be send to the Intelligent Security Systems Technical Support Team (see Getting
Technical Support).
Note. Equipment Dallas code can be found by the Hardware Report Utility (see SecurOS Administration
Guide for detailed information about utility).
· (*) name and version of the installed Intelligent Security Systems company software.
· total number of video servers 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.
www.issivs.com
IIDK 26 Manual
Technical Support Information
www.issivs.com
IIDK 27 Manual
Index
Index
C
Callback function, 12
ConnectEx, function, 9
CORE||DELETE_OBJECT, function, 17
CORE||GET_CONFIG, function, 18
CORE||GET_STATE, function, 20
CORE||UPDATE_OBJECT, function, 17
D
Disconnect, function, 10
E
EVENT, service event, 13
G
GetMsg, function, 13
I
IIDK components, 8
O
OBJECT_CREATED, service event, 13
OBJECT_DELETED, service event, 14
S
SecurosIIDK.IidkManager, class, 22
SecurosIIDK.Messages, class, 22
SecurosIIDK.Wrapper, class, 22
SendDoReact, function, 14
SendMsg, function, 15
Service Events, 13
SETUP, service event, 13
T
technical support,
how to get, 4
how to prepare service information, 25
www.issivs.com