Difference between revisions of "Onvif"

From IPLOG
Jump to: navigation, search
(Created page with "== Back to Libraries == == ONVIF library == === Client === ==== ONVIF_GOTO_PRESET ==== Move camera to given preset on given profile. {| class="w...")
 
Line 3: Line 3:
  
 
=== Client ===
 
=== Client ===
==== ONVIF_GOTO_PRESET ====
+
'''ONVIF_GET_ID'''
Move camera to given preset on given profile.
+
 
 +
Gets ID for identify device in other ONVIF blocks.
 
{| class="wikitable"
 
{| class="wikitable"
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
 
|-
 
|-
 
|in
 
|in
|IP_ADDR
+
|IP
|STRING
+
|STRING[255]
 
|
 
|
 
|camera ip address
 
|camera ip address
Line 37: Line 37:
 
|
 
|
 
|use https
 
|use https
 +
|-
 +
|out
 +
|ERR
 +
|BOOL
 +
|
 +
|indicates some error occurs
 +
|-
 +
|out
 +
|ERR_ID
 +
|WORD
 +
|
 +
|identifies occured error by unique code (see [[Error codes for IEC 61131-3 libraries|Error codes]])
 +
|-
 +
|out
 +
|VALID
 +
|BOOL
 +
|
 +
|indicates success operation and valid output
 +
|-
 +
|out
 +
|ONVIF_ID
 +
|UINT
 +
|
 +
|assigned ONVIF ID
 +
|}
 +
==== ONVIF_GOTO_PRESET ====
 +
Move camera to given preset on given profile.
 +
{| class="wikitable"
 +
| colspan="5" |[[#Asynchronous operations|Asynchronous interface]] - external implementation through metel-async-relay
 +
|-
 +
|in
 +
|ONVIF_ID
 +
|UINT
 +
|
 +
|device ONVIF ID
 
|-
 
|-
 
|in
 
|in
Line 42: Line 77:
 
|STRING[255]
 
|STRING[255]
 
|
 
|
|profile, if empty, use first
+
|profile, if empty, find in all profiles
 
|-
 
|-
 
|in
 
|in
Line 52: Line 87:
  
 
==== ONVIF_SET_RELAY ====
 
==== ONVIF_SET_RELAY ====
Set relay with given name to given value.
+
Set relay with given token to given value.
 +
{| class="wikitable"
 +
| colspan="5" |[[#Asynchronous operations|Asynchronous interface]] - external implementation through metel-async-relay
 +
|-
 +
|in
 +
|ONVIF_ID
 +
|UINT
 +
|
 +
|device ONVIF ID
 +
|-
 +
|in
 +
|RELAY
 +
|STRING[255]
 +
|
 +
|relay token
 +
|-
 +
|in
 +
|VALUE
 +
|BOOL
 +
|
 +
|relay value
 +
|}
 +
 
 +
==== ONVIF_RX_EVENTS ====
 +
Read events from given device. Optionaly filter by upto 4 topics.
 
{| class="wikitable"
 
{| class="wikitable"
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
+
| colspan="5" |[[#Asynchronous operations|Asynchronous interface]] - external implementation through metel-async-relay
 
|-
 
|-
 
|in
 
|in
|IP_ADDR
+
|ONVIF_ID
|STRING
+
|UINT
 
|
 
|
|camera ip address
+
|device ONVIF ID
 +
|-
 +
|in
 +
|TOPIC_1
 +
|STRING[255]
 +
|
 +
|topic to filter, optional
 +
|-
 +
|in
 +
|TOPIC_2
 +
|STRING[255]
 +
|
 +
|topic to filter, optional
 +
|-
 +
|in
 +
|TOPIC_3
 +
|STRING[255]
 +
|
 +
|topic to filter, optional
 +
|-
 +
|in
 +
|TOPIC_4
 +
|STRING[255]
 +
|
 +
|topic to filter, optional
 +
|}
 +
==== ONVIF_PRINT_EVENTS ====
 +
Print content of previously received events to console.
 +
{| class="wikitable"
 +
|-
 +
|in
 +
|ONVIF_ID
 +
|UINT
 +
|
 +
|device ONVIF ID
 +
|-
 +
|out
 +
|ERR
 +
|BOOL
 +
|
 +
|indicates some error occurs
 
|-
 
|-
 +
|out
 +
|ERR_ID
 +
|WORD
 +
|
 +
|identifies occured error by unique code (see [[Error codes for IEC 61131-3 libraries|Error codes]])
 +
|}
 +
==== ONVIF_STRING_EVENT ====
 +
Filter previously received events by given parameters and get its count and last value.
 +
 +
Most filtering inputs are optional, if there is empty, will be not used to filtering.
 +
 +
Some filtering inputs are name-value pairs allowing multiple pairs filtering. Multiple values must be comma separated with same count in name and value input.
 +
{| class="wikitable"
 
|in
 
|in
|PORT
+
|ONVIF_ID
 
|UINT
 
|UINT
 
|
 
|
|port, if empty, use 80 for http or 443 https
+
|device ONVIF ID
 +
|-
 +
|in
 +
|TOPIC
 +
|STRING[255]
 +
|
 +
|event topic to filter, optional
 +
|-
 +
|in
 +
|OPERATION
 +
|STRING[255]
 +
|
 +
|event operation to filter, optional
 +
|-
 +
|in
 +
|SOURCE_NAMES
 +
|STRING[255]
 +
|
 +
|event source names, comma separated, optional
 +
|-
 +
|in
 +
|SOURCE_VALUES
 +
|STRING[255]
 +
|
 +
|event source values, comma separated, optional
 +
|-
 +
|in
 +
|KEY_NAMES
 +
|STRING[255]
 +
|
 +
|event key names, comma separated, optional
 +
|-
 +
|in
 +
|KEY_VALUES
 +
|STRING[255]
 +
|
 +
|event key values, comma separated, optional
 
|-
 
|-
 
|in
 
|in
|USERNAME
+
|DATA_NAMES
 
|STRING[255]
 
|STRING[255]
 
|
 
|
|username
+
|event data names, comma separated, optional
 
|-
 
|-
 
|in
 
|in
|PASSWORD
+
|DATA_VALUES
 
|STRING[255]
 
|STRING[255]
 
|
 
|
|password
+
|event data values, comma separated, optional
 
|-
 
|-
 
|in
 
|in
|USE_HTTPS
+
|DATA_NAMES_GET
 +
|STRING[255]
 +
|
 +
|event data names to get, comma separated, required
 +
|-
 +
|out
 +
|ERR
 +
|BOOL
 +
|
 +
|indicates some error occurs
 +
|-
 +
|out
 +
|ERR_ID
 +
|WORD
 +
|
 +
|identifies occured error by unique code (see [[Error codes for IEC 61131-3 libraries|Error codes]])
 +
|-
 +
|out
 +
|VALID
 
|BOOL
 
|BOOL
 
|
 
|
|use https
+
|indicates success operation and valid output
 +
|-
 +
|out
 +
|LAST_VAL
 +
|STRING[255]
 +
|
 +
|value of last passed event
 +
|-
 +
|out
 +
|COUNT
 +
|UINT
 +
|
 +
|count of passed events
 +
|}
 +
==== ONVIF_BOOL_EVENT ====
 +
Filter previously received events by given parameters for logic 0 and 1 and get count of rising and falling edges and last value.
 +
{| class="wikitable"
 +
|in
 +
|ONVIF_ID
 +
|UINT
 +
|
 +
|device ONVIF ID
 +
|-
 +
|in
 +
|TOPIC
 +
|STRING[255]
 +
|
 +
|event topic to filter, optional
 +
|-
 +
|in
 +
|OPERATION
 +
|STRING[255]
 +
|
 +
|event operation to filter, optional
 +
|-
 +
|in
 +
|SOURCE_NAMES
 +
|STRING[255]
 +
|
 +
|event source names, comma separated, optional
 +
|-
 +
|in
 +
|SOURCE_VALUES
 +
|STRING[255]
 +
|
 +
|event source values, comma separated, optional
 +
|-
 +
|in
 +
|KEY_NAMES
 +
|STRING[255]
 +
|
 +
|event key names, comma separated, optional
 +
|-
 +
|in
 +
|KEY_VALUES
 +
|STRING[255]
 +
|
 +
|event key values, comma separated, optional
 +
|-
 +
|in
 +
|DATA_NAMES
 +
|STRING[255]
 +
|
 +
|event data names, comma separated, required
 
|-
 
|-
 
|in
 
|in
|RELAY
+
|DATA_VALUES_0
 
|STRING[255]
 
|STRING[255]
 
|
 
|
|relay token
+
|event data values for logic 0, comma separated, required
 
|-
 
|-
 
|in
 
|in
|VALUE
+
|DATA_VALUES_1
 +
|STRING[255]
 +
|
 +
|event data values for logic 1, comma separated, required
 +
|-
 +
|out
 +
|ERR
 +
|BOOL
 +
|
 +
|indicates some error occurs
 +
|-
 +
|out
 +
|ERR_ID
 +
|WORD
 +
|
 +
|identifies occured error by unique code (see [[Error codes for IEC 61131-3 libraries|Error codes]])
 +
|-
 +
|out
 +
|VALID
 +
|BOOL
 +
|
 +
|indicates success operation and valid output
 +
|-
 +
|out
 +
|LAST_VAL
 
|BOOL
 
|BOOL
 
|
 
|
|relay value
+
|value of last passed event
 +
|-
 +
|out
 +
|RISE_CNT
 +
|UINT
 +
|
 +
|count of rising edges in passed events
 +
|-
 +
|out
 +
|FALL_CNT
 +
|UINT
 +
|
 +
|count of falling edges in passed events
 
|}
 
|}

Revision as of 09:44, 11 June 2021

Back to Libraries

ONVIF library

Client

ONVIF_GET_ID

Gets ID for identify device in other ONVIF blocks.

in IP STRING[255] camera ip address
in PORT UINT port, if empty, use 80 for http or 443 https
in USERNAME STRING[255] username
in PASSWORD STRING[255] password
in USE_HTTPS BOOL use https
out ERR BOOL indicates some error occurs
out ERR_ID WORD identifies occured error by unique code (see Error codes)
out VALID BOOL indicates success operation and valid output
out ONVIF_ID UINT assigned ONVIF ID

ONVIF_GOTO_PRESET

Move camera to given preset on given profile.

Asynchronous interface - external implementation through metel-async-relay
in ONVIF_ID UINT device ONVIF ID
in PROFILE STRING[255] profile, if empty, find in all profiles
in PRESET STRING[255] preset, if empty, go home

ONVIF_SET_RELAY

Set relay with given token to given value.

Asynchronous interface - external implementation through metel-async-relay
in ONVIF_ID UINT device ONVIF ID
in RELAY STRING[255] relay token
in VALUE BOOL relay value

ONVIF_RX_EVENTS

Read events from given device. Optionaly filter by upto 4 topics.

Asynchronous interface - external implementation through metel-async-relay
in ONVIF_ID UINT device ONVIF ID
in TOPIC_1 STRING[255] topic to filter, optional
in TOPIC_2 STRING[255] topic to filter, optional
in TOPIC_3 STRING[255] topic to filter, optional
in TOPIC_4 STRING[255] topic to filter, optional

ONVIF_PRINT_EVENTS

Print content of previously received events to console.

in ONVIF_ID UINT device ONVIF ID
out ERR BOOL indicates some error occurs
out ERR_ID WORD identifies occured error by unique code (see Error codes)

ONVIF_STRING_EVENT

Filter previously received events by given parameters and get its count and last value.

Most filtering inputs are optional, if there is empty, will be not used to filtering.

Some filtering inputs are name-value pairs allowing multiple pairs filtering. Multiple values must be comma separated with same count in name and value input.

in ONVIF_ID UINT device ONVIF ID
in TOPIC STRING[255] event topic to filter, optional
in OPERATION STRING[255] event operation to filter, optional
in SOURCE_NAMES STRING[255] event source names, comma separated, optional
in SOURCE_VALUES STRING[255] event source values, comma separated, optional
in KEY_NAMES STRING[255] event key names, comma separated, optional
in KEY_VALUES STRING[255] event key values, comma separated, optional
in DATA_NAMES STRING[255] event data names, comma separated, optional
in DATA_VALUES STRING[255] event data values, comma separated, optional
in DATA_NAMES_GET STRING[255] event data names to get, comma separated, required
out ERR BOOL indicates some error occurs
out ERR_ID WORD identifies occured error by unique code (see Error codes)
out VALID BOOL indicates success operation and valid output
out LAST_VAL STRING[255] value of last passed event
out COUNT UINT count of passed events

ONVIF_BOOL_EVENT

Filter previously received events by given parameters for logic 0 and 1 and get count of rising and falling edges and last value.

in ONVIF_ID UINT device ONVIF ID
in TOPIC STRING[255] event topic to filter, optional
in OPERATION STRING[255] event operation to filter, optional
in SOURCE_NAMES STRING[255] event source names, comma separated, optional
in SOURCE_VALUES STRING[255] event source values, comma separated, optional
in KEY_NAMES STRING[255] event key names, comma separated, optional
in KEY_VALUES STRING[255] event key values, comma separated, optional
in DATA_NAMES STRING[255] event data names, comma separated, required
in DATA_VALUES_0 STRING[255] event data values for logic 0, comma separated, required
in DATA_VALUES_1 STRING[255] event data values for logic 1, comma separated, required
out ERR BOOL indicates some error occurs
out ERR_ID WORD identifies occured error by unique code (see Error codes)
out VALID BOOL indicates success operation and valid output
out LAST_VAL BOOL value of last passed event
out RISE_CNT UINT count of rising edges in passed events
out FALL_CNT UINT count of falling edges in passed events