Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page CamMonitor.ocx parameters  CamMonitor.ocx events Next page


On the page:

Connect

Connect(BSTR ip, BSTR login, BSTR password, BSTR arch_password, long param, long port) set up a connection to the Server/Video Gate/Backup Archive.

  • BSTR ip – IP address of the Video server;
  • BSTR login – login to connect to the Server (can be blank);
  • BSTR password – password to set up a connection to the Video server (can be blank);
  • BSTR arch_password – password to access the archive (i.e. admin password, can be blank);

  • long param – Server role. The parameter is mandatory.
    • 0 – video server;
    • 1 – backup archive;
    • 2 – videogate;

  • long port – port to connect Video server. 
    • if 0, 1 or 2 are passed, the connection is established with port 900, 901 or 902 correspondingly;

    • if 100 is passed, the connection is with port 10504;

    • if any other value passed, the connection is with port number "port + 20000". For example, if port=900, the connection is established with server port 20900.

The connection to Server is set up asynchronously.

Important!

If login and password are not specified at Connect() method call, all cameras are viewable in the control. It is to be considered when developing third-party application if access privileges are relevant.

ShowCam

ShowCam(long cam_id, long compress, long show) shows/hides camera on the monitor.

  • long cam_id – camera ID
  • long compress – level of video compression 0-5 (for local camera =0). If set to -1, video stream is displayed directly from the camera without compression
  • long show – checkbox: show/hide camera (1/0)

DoReactMonitor

DoReactMonitor(BSTR react_string) – control over the monitor/cameras

  • BSTR react_string – reaction string view

How to create react_string:

react_string = "MONITOR||ARCH_FRAME_TIME|cam<3>,date<dd-mm-yy>,time<hh:mm:ss>";
CamMonitor1->DoReactMonitor(react_string);

The result of calling the function with the parameter: camera 3 will be in the archive mode and the archive will be positioned to date «dd-mm-yy» and time «hh:mm:ss» (date and time are to be set in this format only).

The mode parameter takes the following values:

0 – video gate if it's specified (otherwise, video server).

1 – video server.

2 – long-time archive.

“MONITOR|<id ignored>|ARCH_FRAME_TIME|...”

Note:

 Positioning accuracy can be specified in milliseconds, for instance:

DoReactMonitor(“MONITOR||ARCH_FRAME_TIME|cam<3>,date<02-10 05>,time<12:12:22.345>


Example. Show 2nd stream from camera 14 on Monitor 1:

"MONITOR|1|ADD_CAM|cam<14>,cam_id<14>,compress<1>,stream_id<14.2>"

Exapmle. Set fps = 1 when viewing archive from Camera 11

"MONITOR||CAM_PARAMS|cam<11>;arch_fps<1>"

RemoveAllCams

RemoveAllCams() : long – remove all cameras from the monitor

IsConnected

IsConnected() : boolean – method shows if the Video server is connected or disconnected

GetCurIp

GetCurIp() : BSTR – returns the IP address of Server specified when calling Connect

SendRawMessage

SendRawMessage(BSTR msg) – sends the command to be executed to Video server

  • BSTR msg – command string view

How to call a function:

m_Cam.SendRawMessage("CAM|1|REC");
m_Cam.SendRawMessage("CAM|1|REC_STOP");
m_Cam.SendRawMessage("CAM|1|ARM");
m_Cam.SendRawMessage("CAM|1|DISARM");

Disconnect

Disconnect() – disconnect from the Video server. 

SetCallBackOptions

SetCallBackOptions(int cam_id, int options) – sets parameters of getting video from camera.

  • int cam_id – camera ID (number).
  • int options – options. The possible values of the options parameter are:
    • WithoutVideoFrame = 0x00 – do not send frames from the video module.
    • WithVideoFrame = 0x01 – send frames from the video module.
    • WithExtendedParams = 0x02 – get frames with extended parameters (time, fps, subtitles).
    • WithInformationLayout = 0x04 – display video in the window with control elements (context menu).
    • WithCompressedData = 0x08 – display video in the native format without decompression (if any).
  • WithoutDecode = 0x10 – disable video decoding on the server.
  • WithoutSubtitles=0x20 – disable subtitles.

Note

The options parameter is created the same as parameters of the CamMonitor.ocx component – see CamMonitor.ocx parameters.

SetParam

SetParam(BSTR param_name, BSTR param_value) – sets the number of camera windows in CamMonitor.

  • BSTR param_name – a string representation of the length or width.
  • BSTR param_value – the number of camera windows.

How to call a function:

m_cam.SetParam("monitor_ch", m_NH);
m_cam.SetParam("monitor_cw", m_NW);
  • No labels