ONVIF 获取主题事件
HTTP/1.1 200 OK
Date: Tue, 22 Oct 2024 08:39:21 GMT
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache
Content-Length: 14474
Connection: close
Content-Type: application/soap+xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tst="http://www.onvif.org/ver10/storage/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12" xmlns:http="http://schemas.xmlsoap.org/wsdl/http" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:wsadis="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2" xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsrf-r="http://docs.oasis-open.org/wsrf/r-2" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tnshik="http://www.hikvision.com/2011/event/topics" xmlns:hikwsd="http://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:hikxsd="http://www.onvifext.com/onvif/ext/ver10/schema" xmlns:tas="http://www.onvif.org/ver10/advancedsecurity/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:axt="http://www.onvif.org/ver20/analytics">
<env:Header>
<wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/GetEventPropertiesResponse</wsa:Action>
</env:Header>
<env:Body>
<tev:GetEventPropertiesResponse>
<tev:TopicNamespaceLocation>http://www.onvif.org/onvif/ver10/topics/topicns.xml</tev:TopicNamespaceLocation>
<wsnt:FixedTopicSet>true</wsnt:FixedTopicSet>
<wstop:TopicSet>
<tns1:VideoSource wstop:topic="true">
<MotionAlarm wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="Source" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="State" Type="xs:boolean" />
</tt:Data>
</tt:MessageDescription>
</MotionAlarm>
<ImageTooDark wstop:topic="false">
<ImagingService wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="Source" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="State" Type="xs:boolean" />
</tt:Data>
</tt:MessageDescription>
</ImagingService>
</ImageTooDark>
</tns1:VideoSource>
<tns1:Device wstop:topic="true">
<Trigger wstop:topic="true">
<tnshik:AlarmIn wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="AlarmInToken" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="State" Type="xs:boolean" />
</tt:Data>
</tt:MessageDescription>
</tnshik:AlarmIn>
<DigitalInput wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="InputToken" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="LogicalState" Type="xs:boolean" />
</tt:Data>
</tt:MessageDescription>
</DigitalInput>
<Relay wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="RelayToken" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="LogicalState" Type="tt:RelayLogicalState" />
</tt:Data>
</tt:MessageDescription>
</Relay>
</Trigger>
<HardwareFailure wstop:topic="true">
<tnshik:HardDiskFull wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="HardDiskNo" Type="xs:int" />
</tt:Source>
</tt:MessageDescription>
</tnshik:HardDiskFull>
<tnshik:HardDiskError wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="HardDiskNo" Type="xs:int" />
</tt:Source>
</tt:MessageDescription>
</tnshik:HardDiskError>
</HardwareFailure>
<tnshik:Network wstop:topic="true">
<tnshik:EthernetBroken wstop:topic="true" />
<tnshik:IPAddrConflict wstop:topic="true" />
</tnshik:Network>
</tns1:Device>
<tns1:UserAlarm wstop:topic="true">
<tnshik:IllegalAccess wstop:topic="true" />
</tns1:UserAlarm>
<tns1:RuleEngine wstop:topic="true">
<CellMotionDetector wstop:topic="true">
<Motion wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="VideoSourceConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="VideoAnalyticsConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="Rule" Type="xs:string" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="IsMotion" Type="xs:boolean" />
</tt:Data>
</tt:MessageDescription>
</Motion>
</CellMotionDetector>
<LineDetector wstop:topic="true">
<Crossed wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="VideoSourceConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="VideoAnalyticsConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="Rule" Type="xs:string" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="ObjectId" Type="xs:integer" />
</tt:Data>
</tt:MessageDescription>
</Crossed>
</LineDetector>
<FieldDetector wstop:topic="true">
<ObjectsInside wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="VideoSourceConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="VideoAnalyticsConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="Rule" Type="xs:string" />
</tt:Source>
<tt:Key>
<tt:SimpleItemDescription Name="ObjectId" Type="xs:integer" />
</tt:Key>
<tt:Data>
<tt:SimpleItemDescription Name="IsInside" Type="xs:boolean" />
</tt:Data>
</tt:MessageDescription>
</ObjectsInside>
</FieldDetector>
<TamperDetector wstop:topic="true">
<Tamper wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="VideoSourceConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="VideoAnalyticsConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="Rule" Type="xs:string" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="IsTamper" Type="xs:boolean" />
</tt:Data>
</tt:MessageDescription>
</Tamper>
</TamperDetector>
</tns1:RuleEngine>
<tns1:AudioAnalytics wstop:topic="true">
<Audio wstop:topic="true">
<DetectedSound wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="AudioSourceConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="AudioAnalyticsConfigurationToken" Type="tt:ReferenceToken" />
<tt:SimpleItemDescription Name="Rule" Type="xs:string" />
</tt:Source>
<tt:Key>
<tt:SimpleItemDescription Name="isSoundDetected" Type="xs:boolean" />
</tt:Key>
<tt:Data>
<tt:SimpleItemDescription Name="UTCTime" Type="xs:dateTime" />
</tt:Data>
</tt:MessageDescription>
</DetectedSound>
</Audio>
</tns1:AudioAnalytics>
<tns1:Configuration wstop:topic="true">
<Profile wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:Profile" />
</tt:Data>
</tt:MessageDescription>
</Profile>
<VideoEncoderConfiguration wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:VideoEncoderConfiguration" />
</tt:Data>
</tt:MessageDescription>
</VideoEncoderConfiguration>
<VideoSourceConfiguration wstop:topic="true">
<MediaService wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:VideoSourceConfiguration" />
</tt:Data>
</tt:MessageDescription>
</MediaService>
</VideoSourceConfiguration>
<AudioEncoderConfiguration wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:AudioEncoderConfiguration" />
</tt:Data>
</tt:MessageDescription>
</AudioEncoderConfiguration>
<AudioSourceConfiguration wstop:topic="true">
<MediaService wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:AudioSourceConfiguration" />
</tt:Data>
</tt:MessageDescription>
</MediaService>
</AudioSourceConfiguration>
<AudioOutputConfiguration wstop:topic="true">
<MediaService wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:AudioOutputConfiguration" />
</tt:Data>
</tt:MessageDescription>
</MediaService>
</AudioOutputConfiguration>
<MetadataConfiguration wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:MetadataConfiguration" />
</tt:Data>
</tt:MessageDescription>
</MetadataConfiguration>
<PTZConfiguration wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:PTZConfiguration" />
</tt:Data>
</tt:MessageDescription>
</PTZConfiguration>
<VideoAnalyticsConfiguration wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:VideoAnalyticsConfiguration" />
</tt:Data>
</tt:MessageDescription>
</VideoAnalyticsConfiguration>
</tns1:Configuration>
<tns1:RecordingConfig wstop:topic="true" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<JobState wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="RecordingJobToken" Type="tt:RecordingJobReference" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="State" Type="xs:string" />
<tt:ElementItemDescription Name="Information" Type="tt:RecordingJobStateInformation" />
</tt:Data>
</tt:MessageDescription>
</JobState>
<RecordingJobConfiguration wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="RecordingJobToken" Type="tt:RecordingJobReference" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:RecordingJobConfiguration" />
</tt:Data>
</tt:MessageDescription>
</RecordingJobConfiguration>
<RecordingConfiguration wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="RecordingToken" Type="tt:RecordingReference" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:RecordingConfiguration" />
</tt:Data>
</tt:MessageDescription>
</RecordingConfiguration>
<TrackConfiguration wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="RecordingToken" Type="tt:RecordingReference" />
<tt:SimpleItemDescription Name="TrackToken" Type="tt:TrackReference" />
</tt:Source>
<tt:Data>
<tt:ElementItemDescription Name="Configuration" Type="tt:TrackConfiguration" />
</tt:Data>
</tt:MessageDescription>
</TrackConfiguration>
</tns1:RecordingConfig>
<tns1:Monitoring wstop:topic="false">
<ProcessorUsage wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="Value" Type="xs:float" />
</tt:Data>
</tt:MessageDescription>
</ProcessorUsage>
<OperatingTime wstop:topic="false">
<LastReset wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Data>
<tt:SimpleItemDescription Name="Status" Type="xs:dateTime" />
</tt:Data>
</tt:MessageDescription>
</LastReset>
</OperatingTime>
<OperatingTime wstop:topic="false">
<LastReboot wstop:topic="true">
<tt:MessageDescription IsProperty="true">
<tt:Data>
<tt:SimpleItemDescription Name="Status" Type="xs:dateTime" />
</tt:Data>
</tt:MessageDescription>
</LastReboot>
</OperatingTime>
</tns1:Monitoring>
<tns1:Media wstop:topic="false">
<ProfileChanged wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Data>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Data>
</tt:MessageDescription>
</ProfileChanged>
<ConfigurationChanged wstop:topic="true">
<tt:MessageDescription IsProperty="false">
<tt:Source>
<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItemDescription Name="Type" Type="xs:string" />
</tt:Data>
</tt:MessageDescription>
</ConfigurationChanged>
</tns1:Media>
</wstop:TopicSet>
<wsnt:TopicExpressionDialect>http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet</wsnt:TopicExpressionDialect>
<wsnt:TopicExpressionDialect>http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete</wsnt:TopicExpressionDialect>
<tev:MessageContentFilterDialect>http://www.onvif.org/ver10/tev/messageContentFilter/ItemFilter</tev:MessageContentFilterDialect>
<tev:MessageContentSchemaLocation>http://www.onvif.org/onvif/ver10/schema/onvif.xsd</tev:MessageContentSchemaLocation>
</tev:GetEventPropertiesResponse>
</env:Body>
</env:Envelope>
这个 XML 片段定义了多个监控设备的事件通知主题(topics)和其相关的消息描述。这些事件的消息内容被分为 `Source` 和 `Data` 两个部分,分别用于描述事件的来源和数据。以下是其中的一些重要结构和内容:
1. **VideoSource 和 Device 事件**:
- `MotionAlarm` 和 `ImageTooDark` 是视频相关的事件,其中 `MotionAlarm` 的数据字段定义了布尔类型的 `State`,表示是否有运动报警。
- `AlarmIn` 和 `DigitalInput` 属于设备触发的事件,这些事件也使用布尔值来描述状态,例如报警输入和数字输入的逻辑状态。
2. **硬件故障检测**:
- `HardDiskFull` 和 `HardDiskError` 是硬盘相关的事件,记录了哪个硬盘出现了问题,字段 `HardDiskNo` 表示硬盘编号。
- 网络故障事件包括 `EthernetBroken` 和 `IPAddrConflict`,它们分别表示以太网断开和 IP 地址冲突。
3. **规则引擎事件**:
- 事件如 `Motion`、`Crossed` 和 `ObjectsInside` 表示视频分析中检测到的运动、越线或物体进入特定区域。这些事件使用 `VideoSourceConfigurationToken` 和 `VideoAnalyticsConfigurationToken` 来标记它们所对应的配置。
4. **音频分析事件**:
- `DetectedSound` 表示检测到声音时的通知,包含了音频源配置的标识符和事件发生的时间。
5. **配置相关事件**:
- `VideoEncoderConfiguration`、`AudioEncoderConfiguration` 和 `PTZConfiguration` 等定义了配置变化时的通知,记录了对应的配置项和新的配置信息。
6. **录制相关事件**:
- `RecordingJobToken` 表示录制任务的标识符,`State` 描述了录制任务的状态,如开始、暂停或停止,`Information` 提供了录制任务的详细状态信息。
这个 XML 定义了多个复杂的 ONVIF 事件,用于设备的监控、告警、视频和音频分析,以及相关的配置和录制管理。

浙公网安备 33010602011771号