Connect

Connect(BSTR ip, BSTR login, BSTR password, BSTR arch_password, long param, long port) sets a connection to the server/video gate/backup archive.

The connection to the server is set up asynchronously.

If login and password are not specified at the Connect() method call, all cameras are viewable in the control. If differentiation of permissions is important, this must be taken into account at the development stage.

ShowCam

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

DoReactMonitor

DoReactMonitor(BSTR react_string)—control monitor/camera behavior.

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 this parameter: camera 3 is switched to the archive mode, and the archive is positioned to date "dd-mm-yy" and time "hh:mm:ss" (date and time must be set in this format only).

The mode parameter can take the following values:

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

1video server.

2—backup archive.

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

Optionally, you can also specify positioning accuracy down to milliseconds, for example:

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

Example. Show the second 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>"

Example. Get the coordinates of the fisheye camera 1 in the monitor (Monitor 1):

"MONITOR|1|GET_CAM_PARAMS|cam<1>"

RemoveAllCams

RemoveAllCams() : longremove all cameras from the monitor.

IsConnected

IsConnected() : booleanmethod shows if the video server is connected or disconnected.

GetCurIp

GetCurIp() : BSTRreturns the IP address of the server specified when calling Connect.

SendRawMessage

SendRawMessage(BSTR msg)send the command to be executed to video server.

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 to get video from camera.

The options parameter is formed in the same way as the 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.

How to call a function:

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