C# Class CgwMonitorManage.Service.MonitorManageService

Inheritance: System.ServiceProcess.ServiceBase, IMonitorManageService, IServiceBehavior
ファイルを表示 Open project: eSDK/esdk_Cgw Class Usage Examples

Public Methods

Method Description
AddBindingParameters ( System.ServiceModel.Description.ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, System endpoints, System bindingParameters ) : void
ApplyDispatchBehavior ( System.ServiceModel.Description.ServiceDescription serviceDescription, ServiceHostBase serviceHostBase ) : void
Connect ( string &sessionID ) : SmcErr

连接融合网关

DataCallBackFunc ( string cameraNo, MediaData mediaData, string sender ) : void

码流回调委托

Disconnect ( ) : SmcErr

断开监控管理连接

GetAllCameras ( PlatformType platformType, PagesParam pageParam, List &cameraList, List &groupList, List &nodeRelationList, System.PageInfo &pagesInfo, PlatformLicenseInfo licenseInfo = null ) : SmcErr

获取摄像头列表及分组信息

GetRefreshStatus ( SmcErr &refreshStatus ) : SmcErr

获取监控摄像头列表刷新状态,返回结果为0是表示刷新完毕,为1是刷新操作中。当查询刷新状态为0时,可调用获取监控摄像头列表接口,获取刷新后监控摄像头列表

Instance ( ) : MonitorManageService

单实例

KeepAliver ( string sessionID ) : SmcErr

保持连接

Load ( ) : SmcErr

线程加载cgw

MakeIFrame ( string cameraNo ) : SmcErr

重发关键帧

RefreshMonitorCamera ( ) : SmcErr

刷新监控摄像头列表

SetHost ( System.ServiceModel.ServiceHost host ) : void

设置服务运行宿主

SetMic ( string cameraNo, bool isOn ) : SmcErr

设置摄像头麦克风状态

SetSpeaker ( string cameraNo, bool isOn ) : SmcErr

设置摄像头扬声器状态

StartControlPtz ( string cameraNo, PtzCommandType ptzCommandType, int param ) : SmcErr

PTZ(Pan/Tilt/Zoom)控制,该接口需要在预览模式下使用

StartReceiveVideoByPipe ( string cameraNo, string &pipeName ) : SmcErr

预览摄像头视频,使用命名管道方式接收数据

StopControlPtz ( string cameraNo, PtzCommandType ptzCommandType ) : SmcErr

停止云台控制,摄像头控制

StopReceiveVideoByPipe ( string cameraNo ) : SmcErr

停止预览摄像头视频,并清理命名管道

Validate ( ServiceDescription serviceDescription, ServiceHostBase serviceHostBase ) : void

Protected Methods

Method Description
OnStop ( ) : void

停止服务

Private Methods

Method Description
CheckSession ( string sessionID ) : SmcErr

检查Session

MonitorManageService ( ) : System

私有构造函数

Method Details

AddBindingParameters() public method

public AddBindingParameters ( System.ServiceModel.Description.ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, System endpoints, System bindingParameters ) : void
serviceDescription System.ServiceModel.Description.ServiceDescription
serviceHostBase ServiceHostBase
endpoints System
bindingParameters System
return void

ApplyDispatchBehavior() public method

public ApplyDispatchBehavior ( System.ServiceModel.Description.ServiceDescription serviceDescription, ServiceHostBase serviceHostBase ) : void
serviceDescription System.ServiceModel.Description.ServiceDescription
serviceHostBase ServiceHostBase
return void

Connect() public method

连接融合网关
public Connect ( string &sessionID ) : SmcErr
sessionID string
return CgwMonitorManage.SmcError.SmcErr

DataCallBackFunc() public method

码流回调委托
public DataCallBackFunc ( string cameraNo, MediaData mediaData, string sender ) : void
cameraNo string 摄像头编号
mediaData CgwMonitorManage.Common.MediaData 码流
sender string 调用者,区别哪个平台的回调
return void

Disconnect() public method

断开监控管理连接
public Disconnect ( ) : SmcErr
return CgwMonitorManage.SmcError.SmcErr

GetAllCameras() public method

获取摄像头列表及分组信息
public GetAllCameras ( PlatformType platformType, PagesParam pageParam, List &cameraList, List &groupList, List &nodeRelationList, System.PageInfo &pagesInfo, PlatformLicenseInfo licenseInfo = null ) : SmcErr
platformType PlatformType
pageParam CgwMonitorManage.Common.PagesParam
cameraList List 摄像头列表
groupList List 组信息
nodeRelationList List 分组关系
pagesInfo System.PageInfo
licenseInfo CgwMonitorManage.Common.PlatformLicenseInfo
return CgwMonitorManage.SmcError.SmcErr

GetRefreshStatus() public method

获取监控摄像头列表刷新状态,返回结果为0是表示刷新完毕,为1是刷新操作中。当查询刷新状态为0时,可调用获取监控摄像头列表接口,获取刷新后监控摄像头列表
public GetRefreshStatus ( SmcErr &refreshStatus ) : SmcErr
refreshStatus CgwMonitorManage.SmcError.SmcErr
return CgwMonitorManage.SmcError.SmcErr

Instance() static public method

单实例
static public Instance ( ) : MonitorManageService
return MonitorManageService

KeepAliver() public method

保持连接
public KeepAliver ( string sessionID ) : SmcErr
sessionID string
return CgwMonitorManage.SmcError.SmcErr

Load() public method

线程加载cgw
public Load ( ) : SmcErr
return CgwMonitorManage.SmcError.SmcErr

MakeIFrame() public method

重发关键帧
public MakeIFrame ( string cameraNo ) : SmcErr
cameraNo string 摄像头编号
return CgwMonitorManage.SmcError.SmcErr

OnStop() protected method

停止服务
protected OnStop ( ) : void
return void

RefreshMonitorCamera() public method

刷新监控摄像头列表
public RefreshMonitorCamera ( ) : SmcErr
return CgwMonitorManage.SmcError.SmcErr

SetHost() public method

设置服务运行宿主
public SetHost ( System.ServiceModel.ServiceHost host ) : void
host System.ServiceModel.ServiceHost
return void

SetMic() public method

设置摄像头麦克风状态
public SetMic ( string cameraNo, bool isOn ) : SmcErr
cameraNo string 摄像头编号
isOn bool 麦克风是否开启
return CgwMonitorManage.SmcError.SmcErr

SetSpeaker() public method

设置摄像头扬声器状态
public SetSpeaker ( string cameraNo, bool isOn ) : SmcErr
cameraNo string 摄像头编号
isOn bool 扬声器是否开启
return SmcErr

StartControlPtz() public method

PTZ(Pan/Tilt/Zoom)控制,该接口需要在预览模式下使用
public StartControlPtz ( string cameraNo, PtzCommandType ptzCommandType, int param ) : SmcErr
cameraNo string 摄像头编号
ptzCommandType PtzCommandType 命令类型
param int 命令参数
return SmcErr

StartReceiveVideoByPipe() public method

预览摄像头视频,使用命名管道方式接收数据
public StartReceiveVideoByPipe ( string cameraNo, string &pipeName ) : SmcErr
cameraNo string
pipeName string
return SmcErr

StopControlPtz() public method

停止云台控制,摄像头控制
public StopControlPtz ( string cameraNo, PtzCommandType ptzCommandType ) : SmcErr
cameraNo string 摄像头编号
ptzCommandType PtzCommandType 命令类型
return SmcErr

StopReceiveVideoByPipe() public method

停止预览摄像头视频,并清理命名管道
public StopReceiveVideoByPipe ( string cameraNo ) : SmcErr
cameraNo string
return SmcErr

Validate() public method

public Validate ( ServiceDescription serviceDescription, ServiceHostBase serviceHostBase ) : void
serviceDescription ServiceDescription
serviceHostBase ServiceHostBase
return void