Download Webgate Control Center User Manual

Transcript
< visual basic 6.0>
‘ If start button is clicked, Event, Monitor, and PTZ ActiveX component connect to
the equipment.
Private Sub Command_start_Click()
Call Event1.Connect(“192.168.63.1”, 80, “guest”, “guest_password”, 0)
Call Monitor1.Connect(“192.168.63.1”, 80, “guest”, “guest_password”)
Call PTZ1.Connect(“192.168.63.1”, 80, “guest”, “guest_password”)
End Sub
‘ If stop button is clicked, close the connection.
Private Sub Command_stop_Click()
Monitor1.Disconnect
PTZ1.Disconnect
Event1.Disconnect
End Sub
‘ When a event is occurred at server, below function will be executed.
‘ If Event category is 1 and Event ID is 16 then,
‘ Sever executes preset command 16 which is correspond to sensor input
Private Sub Event1_EventReceived(ByVal pIEvent As WESPEVENTLibCtl.IEvent)
If pIEvent.EventCategory = 1 And pIEvent.EventID = 16 Then
Call PTZ1.GotoPreset(pIEvent.NumberField)
End If
If pIEvent.EventCategory = 1 And pIEvent.EventID = 17 Then
‘ If Sensor input is Off, it will not work.
End If
End Sub
‘ After Monitor component succeeded to the connection, it displays video.
Private Sub Monitor1_AckReceived(ByVal AckCode As Long, ByVal Param As Long)
If AckCode = ACK_CONNECT Then
Monitor1.PlayVideo 1, 3, 15
End If
73