Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The CAM object corresponds to the Camera system object.

The CAM object sends the events given in the table. Procedure The procedure is started when the corresponding event appearsoccurs.

Format of the event procedure for the Camera object:

Code Block
OnEvent("CAM","_id_","_event_")

Description of the events of from the CAM object.

Events

Description

Comment

"

ARM

"

Camera is armed

If arming was performed by the Operator from the Map or Video surveillance monitor, the user_id<> parameter contains the identifier of the user who performed this action

"

ATTACH

"

Connecting

"


BLINDING

"

Camera is sealed

"


DETACH

"

Break

Event is generated

while loss

when the input signal from the camera on the video capture device is lost

"

DISARM

"

Camera is disarmed

If disarming was performed by the Operator from the Map or Video surveillance monitor, the user_id<> parameter contains the identifier of the user who performed this action

"

FILE_REC_ERROR

"

Error of recording on disk

Event is generated

while error of

when an error occurs when writing the video archive

recording on

to disk

happens

"

MD_START

"

Alarm

"


MD_STOP

"

End of alarm

"


PRINT

"

Print frame

"


REC

"

Recording on disk

If recording was initiated by the Operator from the Map or Video surveillance monitor, the user_id<> parameter contains the identifier of the user who performed this action

"

REC_STOP

"

Stop recording on disk

If recording was stopped by the Operator from the Map or Video surveillance monitor, the user_id<> parameter contains the identifier of the user who performed this action

"

UNBLINDING

"

Camera is opened

"


RECORDER_ON

"

Record is enabled

"


RECORDER_OFF

"

Record is disabled

"


DISC_MOUNT

"

Disk is mounted

"


DISC_UNMOUNT

"

Disk is unmounted

"


FINISHED_AVI_EXPORT

"

Video export is completed

If the video export fails, the event has the nonnull error_result parameter.

In the param<0> parameter there is additional information displayed in the corresponding column of the Event Viewer, in the following format: "ComputerName;ExportPeriod;UserName;UserID", for example, param0<LOCALHOST;04-06-18 16:50:55_04-06-18 16:55:55;Smith;1>

"
MD_LIMIT
"
Object count in a frame exceeded

The event is generated when the number of objects detected by the tracker in the frame is exceeded (see Creating and configuring the Tracker object

section

 section of

the

the Administrator's Guide

 for

for details on how to set this parameter). An event is generated whenever the number of objects is changed (up or down), until it is less than the threshold.

The object_count <> parameter is the number of objects in the frame that the tracker detected, exceeds the specified limit, and differs from the previous value.

See also the description of the NEW_OBJECT event below

"
NEW_OBJECT
"
New object on a frame detected by tracker

Among others, it contains the following parameters:

  • total <> is the total number of objects in the frame at the time the event occurred
.
  • new_id <> is the identifier of the detected object
"
ARCH_DELETE
"
Record deletionDeletion of the record from the camera archive
via
from the Video
Surveillance Monitor
surveillance monitor
"
OPEN_FILE
"
Opening file
File opeining

Opening a file for playback by a virtual video capture device. Indicates that playback of the next file from the selected folder starts.

Among others, the event contains the following parameters:

  • name
<> –
  • <> is the name of the file being played
.
  • back
  • tss <>
  • is the time in UTC format in milliseconds from 1/1/1970
"
CLOSE_FILE
"
Closing file
File closing 

Finishing a file playback in a virtual video capture device. Indicates that playback of a file is ended.

Among others, the event contains the following parameters:

  • name
<> –
  • <> is the name of the file that finished being played
.
  • back
  • tss <>
  • is the time in UTC format in milliseconds from 1/1/1970
"
ARCH_PROTECTED
"
File protected from rewriting

The event is displayed when a user protects the file from being overwritten.

The param <0> parameter contains additional information about the computer name, fragment

protected

, user name and user id, which is displayed in

the 

the Add. Info column in the Event Viewer in the following format:

"ComputerName;ProtectionPeriod;UserName;UserID", for example, param0<LOCALHOST;04-06-18 16:50:55.612_04-06-18 16:55:55.612;Smith;1>

"
ARCH_UNPROTECTED
"
Rewrite protection removed from file

The event is displayed when a user removes protection of the file from being overwritten.

The param <0> parameter contains additional information about the computer name, fragment

protected

, user name and user id, which is displayed in

the 

the Add. Info column in the Event Viewer in the following format:

"ComputerName;ProtectionPeriod;UserName;UserID", for example, param0<LOCALHOST;04-06-18 16:50:55.612_04-06-18 16:55:55.612;Smith;1>

FRAME_SKIPPEDFrame skipped

The event

arrives at

occurs in Axxon PSIM if there is a problem with frame skipping. A separate event for each skipped frame.

This event can be disabled using the FileSystem.NotifyCoreFrameSkipped registry key (see Registry keys reference guide)

ARCH_BOOKMARKEDBookmark created

The event is displayed when a user adds a bookmark.

The param <0> (i.e. the Add. Info column in the Event Viewer) parameter contains the comment to the bookmark

ARCH_UNBOOKMARKEDBookmark deleted

The event is displayed when a user deletes a bookmark

TEMPERATURE_ALARMTemperature threshold

The param0<> parameter contains the temperature value received from the thermal camera

IGNORE_KEEP_NO_LESSIgnoring "
Kep
Keep no less than"The event is generated when a video fragment is deleted from the archive before expiration of the time period set by the Keep no less than parameter. See also Configuring video camera archive depth
AVAILABILITYAvailability of the key position in the license file and the number of objects

The event occurs in response to the GET_AVAILABILITY command and contains information about the number of objects added to the license key for the given position. Parameters:

  • qty_localpriority<> is the number of allowed objects of the specified type on this computer (local key)
  • qty<> is the total number of allowed objects of the specified type in the license (generic key)
  • pos<> is the position number in the license key

If there is no position in the key, the event will have a zero value

WRITING_FAILEDWriting error
FILESYSTEM_FAILEDFile system error

Contains mandatory parameter error_msg<>error text; can also contain parameters cam<>camera ID and error_code<>error code. Example:

CAM|-1|FILESYSTEM_FAILED|error_msg<Failed to delete index file: D:\\VIDEO\\INDEX\\14061608.idx, error code: 5.>,error_code<5>

Operator Operator format to describe actions with the camera is:

...

The list of commands and parameters for the CAM object is given in the following table:

Command

command description

Parameters

Description of parameters

"

SETUP

" –

sets (changes) the parameters of a camera

rec_priority<>

Record priority (from 0 to 3, 0

standard, 3

all recources)

compression<>

Compression ration (0

no compression, 1

- maximal

maximum quility, …, 5

– minimal quality

minimum quality)

sat_u<>

Value of colour (0

min, 10

max)

proc_time<>

Append period (

0 – 30

0–30 sec)

manual<>

Control brightness and contrast settings (0

manual; 1

auto; 2

auto, but close to values specified manually)

contrast<>

Contrast (0

min, 10

max)

md_size<>

Size of motion detection objects (

1 -16

1–16)

md_mode<>

Mode of pause record (1

enabled, 0disabled)

audio_type<>

Type of sound accompaniment

pre_rec_time<>

Time of pre-record  (

0 – 20

0–20 sec)

bright<>

Brightness (0

min, 10

max)

audio_id<>

Number of a microphone (empty parameter if there is no microphone)

rec_time<>

Record speed (

1 – 30 fps

1–30 FPS, 0

not used)

alarm_rec<>

Record of alarms (1

enabled, 0

disabled)

hot_rec_time<>

Time of hot record (

0 – 30

0–30 sec)

hot_rec_period<>

Period of hot record (

0 – 20

0–20 sec)

mux<>

Number of channel (0 – 1 channel, 15 – 16 channel)

color<>

Colour

Color (0

black and white, 1

multicolor)

activity<>

-

arch_days<>

Number of archive days

blinding<>

Camera is sealed

config_id<>

-

decoder<>

-

flags<>

Flags

fps<>

Speed of record (0

not used,

1 – 30 fps

1–30 FPS)

ifreq<>

Frequency of

anchor

key frames in sequence (1

each frame is

anchor

key, 2

– 100

100th frame)

mask 0, mask1, mask2, mask3, mask4

Detection tool mask

md_contrast<>

Sensibility

Sensitivity of motion detection tool (

0 – 15

0–15)

motion<>

Estimation of compressor motion

compressor

(

5 - 255

5–255)

name<>

Name of object

Object name

password_crc<>

Password for video

Video archive password

priority<>

Priority of record resource (0

auto, 1

manual)

resolution<>

Resolution (0

standard CIF, 1

-

high 2CIF, 2

–maximal

maximum 4CIF)

type<>

Type of object

yuv<>

Colour

Color schema of video signal coding (0

YUV4:2:0, 1

YUV4:2:2)

"

DELETE

" –

disables camera

-

-

"

START_VIDEO

" –

enables video stream for the current camera

SLAVE

slave_id<>

Name of the computer to which the camera is connected

comress<>

Value

Level of compression

register_only<>

-

"

STOP_VIDEO

" –

disables video stream for the current camera

SLAVE

slave_id<>

Name of computer to which camera is connected

"

REQUEST_MASK

"

mask<>

Mask

"

MUX1

"

,

"

MUX2

"

,

"

MUX3

" –

display the image of a camera on 1, 2, 3 analog outputs

-

-

"

ACTIVATE

" –

display camera on monitor

monitor<>

Number of a monitor

"

ARM

" –

arm camera

-

-

"

DISARM

" –

disarm camera

-

-

"

REC

" –

start

record

recording from a camera

time<>

Time of record in seconds, if null than only one frame is recorded

rollback<>

If

one

1,

than

the record is performed with a rollback

priority<>

Set

Sets priority of command to start

record

recording.

See

See Appendix 1. Priorities of start and stop recording commands

stream_id<>
Set

Sets an identification number of a stream for

record

recording.

Stream

The stream ID is set as "n.m" where n is the

Camera object

camera ID, m is the number of the stream.

Note. If the specified stream

is not in use

isn't used for any purpose other than record by command (and custom on clients), make sure that the Lock disabling streams not in use checkbox is set

checked

for it

see the The Settings panel of the Camera object section of

the

the Administrator's Guide

"

REC_STOP

" –

stop

record

recording from a camera

priority<>

Set

Sets priority of a command to stop

record

recording.

See

See Appendix 1. Priorities of start and stop recording commands

user_id<>If
record
recording was stopped by a user from the Video
Surveillance Monitor
surveillance monitor, the parameter contains the user ID. Otherwise the parameter is absent
from_macro<>If
record
recording was stopped by a macro, the parameter contains the macro ID. Otherwise the parameter is absent
"

SET_MASK

" –

set mask

mask<>

Mask

"

ADD_SUBTITLES

" –

add titles

command<>

Test of imposed titles

title_id<>

The ID of the Captioner object which is used to impose

page<>

Required parameter to allow recording titles to the titles database to provide search by titles. Available values: BEGIN (start of

record

recording in the database), END (end of

record

recording in the database)

"

SIP_CONNECT

" –

Sip connected

-

-

"

SIP_DISCONNECT

" –

Sip disconnected

-

-

"

SET_IPINT_PARAM

" –

Set (change) the parameters of an IP

-

device. Reaction allows changing

of

the IP

-

device settings

not entering

without going into its web-interface.

Note. For reaction operation it is required to enable the mode of multi-flow video signal

-

see

.

Administrator's Guide, section Configuration of multistream video, and Appendix 2. Defining param_id and param_value values for SET_IPINT_PARAM reaction

param_id<>

Name of a parameter. Set of parameters for each camera is individual

– see

see Appendix 2. Defining param_id and param_value values for SET_IPINT_PARAM reaction

param_value<>

Value of a parameter. Set of parameters for each camera is individual

– see

see Appendix 2. Defining param_id and param_value values for SET_IPINT_PARAM reaction

vstream_id<>

Number of a video

flow

stream (optional parameter).

Is

It is given by “Number of camera”.”Number of

flow”

a stream”, for example 1.1, 1.2

GET_FRAME

get frame from a camera even if it is not displayed in the Video surveillance monitor

path<>

Path to save a frame. If there is no parameter

than

, the FRAME_SENT event with the data parameter will be formed in the system. Processing of this event is described in

the section

The SaveToFile method of

the

the Programming Guide (JScript)

stream<>

Optional parameter. Sets Axxon PSIM stream to get a frame from. The stream can be specified by a number or purpose. Possible purposes:

  • stream_archive
  • stream for archive recording
  • stream_alarm
– stream
  • stream for archive recording
at alarm
  • by alarms
  • stream_client
  • stream for displaying
  • stream_analytic
  • stream for video analytics

Stream number consists of a camera ID and a stream ID divided by dot, for example, 4.3 is for stream 3 from camera 4

time<>Optional parameter.
Is
It is set to request video frame from the archive. Format: DD-MM-YYYY hh:mm:ss. Example: time<19-09-2017 11:35:34>
gate<>Optional parameter.
Network
Specifies the network name of
the Video Gate
the Videogate from the archive of which to get the frame
from
arch<>Optional parameter.
Network
Specifies the network name of the Backup
Archive
archive to get the frame from
SLAVE
slave_id<>Optional parameter.
Network
Specifies the network name of the Server to get the frame from
password_crc<>Optional parameter. Specifies the CRC sequence to be recorded to the file together with the frame
ARCH_DEL_RECORD
delete archive recordings over the specified period.fromTime<>Mandatory parameter. Time in the YYYY-MM-DDTHH: MM: SS.NNN format, where NNN
milliseconds. The recordings will be deleted (starting with the first one containing the specified time and ending with the last one containing the toTime time). If no time is specified in the toTime parameter, then only one recording will be deleted
toTime<>Optional parameter. Time in the YYYY-MM-DDTHH: MM: SS.NNN format, where NNN
milliseconds. See description above
REC_RESTART
restart recording--
ARCH_BOOKMARK_RECORD
create a bookmarktime1<>The date of the archive period beginning included in the bookmark in the DD-MM-YY HH: MM: SS.NNN format, where NNN
- milliseconds
time2<>The date of the archive period ending included in the bookmark in the DD-MM-YY HH: MM: SS.NNN format, where NNN
milliseconds
comment<>Comment to a bookmark
SLAVE
slave_id<>

Computer and Video surveillance monitor IDs

using which the bookmark

is

will be created

using them

. Parameter format: <computer id >.<monitor id>.

For example,

SLAVE

slave_id<WS2.1>

WS2 is a computer ID and 1 is Video surveillance monitor ID

CRUISE_START
Auto cruisecruise_id<>Route name on a camera

action<>

Executed action:

  • CRUISE_START
  • start cruising along the specified route
  • PATROL_PLAY
  • start patrolling along the specified route

cam_id<>Camera ID
"
GET_DEPTH
" –
get the archive depth. The ARCHIVE_DEPTH event from the SLAVE object (see SLAVE) is created in the system as the response to this reaction. If one or both parameters are absent it means that there is the archive depth request for all possible parametersdrive<>

Disk or network path to request the archive depth.

The disk name is set in the "<disk letter>:\\" format, for example drive<D:\\>

Note. The "\" character is an escape character.

The network path is set in the UNC format


arch

Get the backup archive depth.

Example.

DoReactStr("CAM","2","GET_DEPTH","drive<D:\\>,cam<2>,arch");

gate

Get the

video gate

videogate archive depth.

Example.

DoReactStr("CAM","1","GET_DEPTH","drive<V:\\>,gate"
GET_DEPTH","drive<V:\\>,gate");
);
CLEAR_SUBTITLES—remove all titles from the video imagetitle_id<>The ID of the Captioner object
GET_AVAILABILITY—check the availability of the key positionpos<>The position number in the license key

Properties of the CAM object are shown in the table.

Properties of the CAMobjectCAM object

Description of the object properties

ID<>

Object ID

PARENT_ID<>

Parent object ID

TELEMETRY_ID<>

Telemetry module ID (PTZ ID of ptz)

REGION_ID<>

Region ID


Examples of using events and reactions of the Camera object:

  1. Switch camera to the colored mode and start recording from it while when arming the first camera.

    Code Block
    OnEvent("CAM","1","ARM") //first video camera is armed
    {
     DoReact("CAM","1","SETUP","color<1>"); // set colored mode of video camera
     DoReact("CAM","1","REC"); //record from the first camera
    }


  2. Arm the first video camera while when disabling the fifth video camera.

    Code Block
    OnEvent("CAM","5","DETACH") // fifth video camera is disabled
    {
     DoReact("CAM","1","ARM"); //first video camera is armed
    }


  3. Use half of resources while when recording from the first camera (i.e. if 4 video cameras are connected through the first video capture device than the first camera will record with speed 6 fpsFPS, and other three cameras with speed 2-2,5 fpsFPS) if it is in alarm state.

    Code Block
    OnEvent("CAM","1","MD_START") //first video camera is in alarm state
    {
     DoReact("CAM","1","SETUP","rec_priority<2>"); // use half of resources while recording
    }


  4. Set maximal compression synchronously with the fourth microphone of audio card on the first video camera while when recording from the first video camera on disk.

    Code Block
    OnEvent("CAM","1","REC") //first video camera recording on disk
    {
     DoReact("CAM","1", "SETUP", "compression<5>, audio_type<OLXA_LINE>, audio_id<4>"); //first video camera, maximal compression, synchronously with forth microphone of audio card.


  5. Start recording from the first camera with minimal minimum quality in black and white mode when it stopped to be in alarm.

    Code Block
    OnEvent("CAM","1","MD_STOP") // first camera stopped to be in alarm state
    {
     value = 5;
     DoReact("CAM", "1", "SETUP", "compression<" + value + ">,color<0>");
     //start record from the first video camera with minimal quality in black and white mode.
    }


  6. Start recording from the first camera in the “rollback” mode when it is disarmed.

    Code Block
    OnEvent("CAM","1","DISARM") //first video camera is disarmed
    {
     DoReact("CAM","1","REC","rollback<1>"); // Start record from the first video camera in the "rollback" mode
    }


  7. Set new parameters of video signal while when connecting the first video camera.

    Code Block
    OnEvent("CAM","1","ATTACH") //first video camera is connected
    {
     VIDEO_CANAL_ID = GETOBJECTPARAM("CAM","1","PARENT_ID"); // define ID of video channel to which the first camera belongs
     DoReact("GRABBER",VIDEO_CANAL_ID,"SETUP","chan<0>,mode<0>,resolution<1>,format<pal>"); //set new parameters of video channel.
    }


  8. Start auto cruising on Camera 1 when Macro 2 is run.

    Code Block
    OnEvent ("MACRO","2","RUN")
    {
     DoReact("CAM","1","CRUISE_START","cruise_id<1>,action<CRUISE_START>,cam_id<1>");
    }


Check function of the CAM object state:

Code Block
CheckState("CAM","number","state")

...

State of «CAM» object

Description

"ALARMED"

Camera is in alarm mode.

"DISARM_DETACHED"

No signal from camera

"DETACHED"

No signal from camera

"ARMED"

Camera is armed

"DISARMED"

Camera is disarmed