C# Class Cgw.Service.CgwService

Inheritance: ICgwService, IServiceBehavior
Datei anzeigen Open project: eSDK/esdk_Cgw Class Usage Examples

Public Properties

Property Type Description
log NLog.Logger

Public Methods

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

连接融合网关

Disconnect ( ) : SmcErr

断开融合网关

DisconnectMonitor ( ) : SmcErr

Disconnect monitorPlat

GetRefreshStatus ( SmcErr &refreshStatus ) : SmcErr

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

GetSipPort ( uint &sipPort ) : SmcErr

获取软终端被叫sip端口号

ImportCGWLicense ( string license ) : SmcErr

导入网关license文件

InitService ( ) : SmcErr

初始化融合网管服务

Instance ( ) : CgwService

构造函数 单例模式实例

KeepAliver ( ) : SmcErr

保持连接

LicenseInit ( ) : void

LicenseInit

Load ( ) : SmcErr

线程加载cgw

QueryMonitorCamera ( PlatformType platformType, PageParam pageParam, List &cameraInfoList, List &cameraGroupList, List &nodeRelationList, PagesInfo &pagesInfo ) : SmcErr

获取监控设备列表

RefreshMonitorCamera ( ) : SmcErr

刷新监控摄像头列表

SetMic ( string channelLabel, string cameraNo, bool isOn ) : SmcErr

设置麦克风

SetSpeaker ( string channelLabel, string cameraNo, bool isOn ) : SmcErr

设置扬声器

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

开始PTZ操作

StopAllStream ( ) : SmcErr

线程Unload cgw

StopControlPtz ( string cameraNo, PtzCommandType ptzCommandType ) : SmcErr

关闭PTZ操作

SwitchChannelVideoSource ( string channelLabel, string cameraNo ) : SmcErr

设置监控通道视频源

SyncMonitorChannel ( List &channelInfoList ) : SmcErr

同步通道信息

UpdateMonitorChannel ( List channelInfoList ) : SmcErr

分配监控通道

Validate ( System.ServiceModel.Description.ServiceDescription serviceDescription, ServiceHostBase serviceHostBase ) : void

Private Methods

Method Description
CgwService ( ) : System

単例的构造函数

CheckSession ( ) : SmcErr

检查Session

Method Details

AddBindingParameters() public method

public AddBindingParameters ( System.ServiceModel.Description.ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, System endpoints, System.ServiceModel.Channels.BindingParameterCollection bindingParameters ) : void
serviceDescription System.ServiceModel.Description.ServiceDescription
serviceHostBase ServiceHostBase
endpoints System
bindingParameters System.ServiceModel.Channels.BindingParameterCollection
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 cgwPwd ) : SmcErr
cgwPwd string 连接字符串
return Cgw.SmcError.SmcErr

Disconnect() public method

断开融合网关
public Disconnect ( ) : SmcErr
return Cgw.SmcError.SmcErr

DisconnectMonitor() public method

Disconnect monitorPlat
public DisconnectMonitor ( ) : SmcErr
return Cgw.SmcError.SmcErr

GetRefreshStatus() public method

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

GetSipPort() public method

获取软终端被叫sip端口号
public GetSipPort ( uint &sipPort ) : SmcErr
sipPort uint
return Cgw.SmcError.SmcErr

ImportCGWLicense() public method

导入网关license文件
public ImportCGWLicense ( string license ) : SmcErr
license string
return Cgw.SmcError.SmcErr

InitService() public method

初始化融合网管服务
public InitService ( ) : SmcErr
return Cgw.SmcError.SmcErr

Instance() public static method

构造函数 单例模式实例
public static Instance ( ) : CgwService
return CgwService

KeepAliver() public method

保持连接
public KeepAliver ( ) : SmcErr
return Cgw.SmcError.SmcErr

LicenseInit() public method

LicenseInit
public LicenseInit ( ) : void
return void

Load() public method

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

QueryMonitorCamera() public method

获取监控设备列表
public QueryMonitorCamera ( PlatformType platformType, PageParam pageParam, List &cameraInfoList, List &cameraGroupList, List &nodeRelationList, PagesInfo &pagesInfo ) : SmcErr
platformType PlatformType
pageParam Cgw.Common.PageParam
cameraInfoList List
cameraGroupList List
nodeRelationList List 所属分组关系信息
pagesInfo Cgw.Common.PagesInfo
return Cgw.SmcError.SmcErr

RefreshMonitorCamera() public method

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

SetMic() public method

设置麦克风
public SetMic ( string channelLabel, string cameraNo, bool isOn ) : SmcErr
channelLabel string
cameraNo string
isOn bool
return Cgw.SmcError.SmcErr

SetSpeaker() public method

设置扬声器
public SetSpeaker ( string channelLabel, string cameraNo, bool isOn ) : SmcErr
channelLabel string
cameraNo string
isOn bool
return Cgw.SmcError.SmcErr

StartControlPtz() public method

开始PTZ操作
public StartControlPtz ( string cameraNo, PtzCommandType ptzCommand, int param ) : SmcErr
cameraNo string 摄像头NO
ptzCommand PtzCommandType 操作类型
param int 命令参数
return Cgw.SmcError.SmcErr

StopAllStream() public method

线程Unload cgw
public StopAllStream ( ) : SmcErr
return Cgw.SmcError.SmcErr

StopControlPtz() public method

关闭PTZ操作
public StopControlPtz ( string cameraNo, PtzCommandType ptzCommandType ) : SmcErr
cameraNo string
ptzCommandType PtzCommandType
return Cgw.SmcError.SmcErr

SwitchChannelVideoSource() public method

设置监控通道视频源
public SwitchChannelVideoSource ( string channelLabel, string cameraNo ) : SmcErr
channelLabel string 通道label
cameraNo string 摄像头NO
return Cgw.SmcError.SmcErr

SyncMonitorChannel() public method

同步通道信息
public SyncMonitorChannel ( List &channelInfoList ) : SmcErr
channelInfoList List
return Cgw.SmcError.SmcErr

UpdateMonitorChannel() public method

分配监控通道
public UpdateMonitorChannel ( List channelInfoList ) : SmcErr
channelInfoList List
return Cgw.SmcError.SmcErr

Validate() public method

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

Property Details

log public_oe static_oe property

记录日志操作类.
public static NLog.Logger log
return NLog.Logger