Detailed Description
The EncoderStatusInfo holds information about Encoder status events.
These events include
- Alarm triggers
- Device environmental events
- Analytics events
This class is immutable and can only be initialised from either a SystemEvent or an EncoderEventData.
Encoder Status Messages
Encoder state information can be accessed by the following methods:
They type of events an Encoder can generate depend on the model and configuration of the encoder.
Querying the Encoder's status
To query an Encoder's status call the QueryStatus() function on an Encoder interface. This will send a query to the Encoder to obtain current status information. The status information returned is a set of key-value pairs representing a status message type and its current value. The following information is contained in a status information request:
| Type | Example Value | Description |
|---|---|---|
| cpu_temp | 43 | The temperature of the Encoder's CPU on Celsius. |
| volt | 12.0 | The current voltage being supplied to the Encoder from its power source. |
| profile_switch | LAN | time is the most important part of this as it indicates the last time that the Encoder's connection profile was switched (e.g. when auto-switching between GPRS and 3G). |
| signal_strength | 80 | The signal strength of the mobile network (only available when using a mobile network connection). |
| mobile_network | T-Mobile UK | The name of the mobile network that the Encoder is connected through (only available when using a mobile network connection). |
Encoder Status Events
If the User is an Encoder Administrator then they will be able to receive Encoder Status Update notifications via the StatusEvent function of the EncoderEvents interface. The status information contained in a Status Update event represents a single status message type (unlike querying status information which contains many status types). The notification tells the User about changes in state. The following information may be received in the form of a status update event:
| Type | Example Value | Description |
|---|---|---|
| external_trigger | - | The alarm input has been triggered, see table below. |
| high_voltage | 50.0 | The Encoder has detected an excessively high input voltage. |
| low_voltage | 1.0 | The Encoder has detected an excessively low input voltage. |
| high_temp | 90 | The Encoder has detected an excessively high CPU temperature. |
| low_temp | -30 | The Encoder has detected an excessively low CPU temperature. |
| camera_disconnected | n/a | A camera has been disconnected. |
| camera_connected | n/a | A camera has been connected. |
| power_up | n/a | The Encoder has powered up. |
| power_up_post_ht | n/a | The Encoder has powered up after a high temperature shutdown. |
| power_up_post_lv | n/a | The Encoder has powered up after a low voltage shutdown. |
| power_up_post_hv | n/a | The Encoder has powered up after a high voltage shutdown. |
| power_up_post_sleep | n/a | The Encoder has powered up after waking up from Deep Sleep mode. |
| power_up_trigger | n/a | The Encoder has powered up due to an alarm trigger. |
| power_up_post_comms_reset | n/a | The Encoder has powered up after a communications reset. |
| power_up_post_remote_reset | n/a | The Encoder has powered up after a remote reset. |
| power_up_post_keypen | n/a | The Encoder has powered up after a key pen configuration reset. |
| power_up_post_fw_update | n/a | The Encoder has powered up after a firmware upgrade. |
| alarm_event | alarm_event_id=1 | An Alarm Rule has been matched and an alarm event raised. |
| scheduled_event | event_schedule_id=1 | A scheduled event occurred. This is an event that has been scheduled to trigger (in the same way as an alarm) at a specified time. |
| power_save_notify | left=2 | A Power Save notification occurs when the Encoder has been woken from Deep Sleep by an alarm trigger and has been configured to notify the server/clients. The Encoder will then send out a notification 2 minutes before it will go back to sleep. This sleep can be postponed using the PostponeDeepSleep method in Encoder. |
| analytics_start | - | The encoder has triggered the start of an analytics event, see table below. |
| analytics_end | - | The encoder has triggered the end of an analytics event, see table below. |
| disk_space | 92 | The encoder is running out of recording disk space. |
| disk_full | n/a | The encoder recording disk is full. |
| disk_record_error | n/a | The encoder recording disk has an error. |
| low_battery | 14 | The encoder is reporting a low battery event. The event may contain a 'source' identifier to indicate that the event relates to a peripheral connected to the encoder. |
| panic_start | n/a | The encoder has triggered a panic event event, indicating that the operator requires assistance. |
| privacy_mode_enabled | n/a | The encoder operator has enabled privacy mode. A placeholder video frame will be supplied when viewing the video stream in this state. |
| privacy_mode_disabled | n/a | The encoder operator has disabled privacy mode. |
External Triggers
There are several different types of external triggers. Additonal paramaters are listed below
| Type | Param name | Value | Description |
|---|---|---|---|
| external_trigger | alarm_id | Integer of the input triggers | The alarm trigger input on the encoder has been triggered |
| -------------— | :-----------—: | :---------------------------—: | --------------------------------------------------------— |
| RDC event | source | 'rdc' or 'zimiti' | An RDC event has triggered |
| node_id | The node that has triggered | ||
| event_type | The clasification of the event | 2 = person; 3 = large disturbance, 4 = vehicle, 6 = digging, 7 = Loss of node, A = Low battery, C = Input 1, E = Input 2 | |
| -------------— | :-----------—: | :---------------------------—: | --------------------------------------------------------— |
| Yardarm event | source | 'yardarm' | A Yardarm holster sensor event has triggered |
| sensor_id | The sensor that has triggered | The serial number of the Yardarm holster sensor | |
| friendly_name | Friendly name of the sensor | The friendly name of the Yardarm holster sensor | |
| holster_state | Sensor holstered state | 'holstered' or 'unholstered' |
Analytics Events
There are different types of analytics that may generate 'analytics_start' and 'analytics_end' events. SafeZone and Object Detector analytics are integrated in the Encoder functionality. Face Detector and Face Reconition events may be generated by an external analytic. Additonal paramaters are listed below
| Type | Param name | Value | Description |
|---|---|---|---|
| analytics_start | input | The video input index | The index of the input that the analytic which generated the event is operating on |
| analytics_end | |||
| -------------— | :-----------—: | :----------------------------—: | --------------------------------------------------------— |
| SafeZone | source | 'safezone2d' | The SafeZone analytic has triggered an event |
| -------------— | :-----------—: | :----------------------------—: | --------------------------------------------------------— |
| Object Detector | source | 'object_detector' | The Object Detector analytic has triggered an event |
| object_type | The clasification of the object | 'Person', 'Car' or 'Truck' | |
| -------------— | :-----------—: | :----------------------------—: | --------------------------------------------------------— |
| Face Detect | source | 'face_detect' | A face has been detected |
| image | Base64 encoded JPEG of the face | An image of the face that has been detected | |
| metadata | Additional metadata | Any metadata relevant to the detection from the external analytic | |
| -------------— | :-----------—: | :----------------------------—: | --------------------------------------------------------— |
| Face Recognition | source | 'face_recognition' | A face has been recognised |
| image | Base64 encoded JPEG of the face | An image of the face that has been recognised | |
| metadata | Additional metadata | Any metadata relevant to the detection from the external analytic |
Availability
Available in version 6.0 of Decoder SDK. Requires a server version greater than 6.0
#include <EncoderStatusInfo.h>
Public Member Functions | |
| DB_EDGEVIS_SDK std::wstring | Type () const |
| Gets the type of event. More... | |
| DB_EDGEVIS_SDK int64_t | TimeStamp () const |
| Gets the timestamp of the status message. More... | |
| DB_EDGEVIS_SDK std::map< std::wstring, std::wstring > | Params () const |
| Gets the status message's parameters. More... | |
| DB_EDGEVIS_SDK std::vector< std::wstring > | ParamKeys () const |
| Gets the status message's parameter keys. More... | |
| DB_EDGEVIS_SDK std::wstring | GetParam (const std::wstring &key) const |
| Gets a parameter value from the set of parameter key-value pairs for the status message. More... | |
| DB_EDGEVIS_SDK std::wstring | DisplayString () const |
| Returns a display string for the event. More... | |
| DB_EDGEVIS_SDK bool | GetOnvifEvent (OnvifEvent &onvif_event) const |
| Convert this encoder event to an ONVIF event. More... | |
Member Function Documentation
| DB_EDGEVIS_SDK std::wstring EdgeVisDecoderSDK::EncoderStatusInfo::Type | ( | ) | const |
Gets the type of event.
- Returns
- Returns the event type, see notes above for the range of event types to expect. Along with the event type, there may be 1 or more paramaters depending on the type of event.
| DB_EDGEVIS_SDK int64_t EdgeVisDecoderSDK::EncoderStatusInfo::TimeStamp | ( | ) | const |
Gets the timestamp of the status message.
- Returns
- Timestamp in milliseconds since the epoch.
| DB_EDGEVIS_SDK std::map< std::wstring, std::wstring > EdgeVisDecoderSDK::EncoderStatusInfo::Params | ( | ) | const |
Gets the status message's parameters.
- Returns
- Map of key-value pairs.
| DB_EDGEVIS_SDK std::vector< std::wstring > EdgeVisDecoderSDK::EncoderStatusInfo::ParamKeys | ( | ) | const |
Gets the status message's parameter keys.
This makes it easy to enumerate the values in the status message's parameters list.
- Returns
- List of parameter keys.
| DB_EDGEVIS_SDK std::wstring EdgeVisDecoderSDK::EncoderStatusInfo::GetParam | ( | const std::wstring & | key | ) | const |
Gets a parameter value from the set of parameter key-value pairs for the status message.
- Parameters
-
key A parameter key
- Returns
- The value matching the parameter key. A blank string will be returned if the key is not found.
| DB_EDGEVIS_SDK std::wstring EdgeVisDecoderSDK::EncoderStatusInfo::DisplayString | ( | ) | const |
Returns a display string for the event.
This can be used to display the details of the event to the user.
- Returns
- A display string of the event
| DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::EncoderStatusInfo::GetOnvifEvent | ( | OnvifEvent & | onvif_event | ) | const |
Convert this encoder event to an ONVIF event.
- Note
- onvif_event must have a valid implementation
- Returns
- true if the event was successfully converted to a supported ONVIF event
The documentation for this class was generated from the following file:
- SDKs/EdgeVisDecoderSDK/EncoderStatusInfo.h
