Difference between revisions of "Onvif"
(Created page with "== Back to Libraries == == ONVIF library == === Client === ==== ONVIF_GOTO_PRESET ==== Move camera to given preset on given profile. {| class="w...") |
(→ONVIF library) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
=== Client === | === Client === | ||
− | + | '''ONVIF_GET_ID''' | |
− | + | ||
+ | Gets ID for identify device in other ONVIF blocks. | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |||
|- | |- | ||
|in | |in | ||
− | | | + | |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|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" |[[Libraries for IEC 61131-3#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, | + | |profile, if empty, find in all profiles |
|- | |- | ||
|in | |in | ||
Line 52: | Line 87: | ||
==== ONVIF_SET_RELAY ==== | ==== ONVIF_SET_RELAY ==== | ||
− | Set relay with given | + | Set relay with given token to given value. |
+ | {| class="wikitable" | ||
+ | | colspan="5" |[[Libraries for IEC 61131-3#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" |[[Libraries for IEC 61131-3#Asynchronous operations|Asynchronous interface]] - external implementation through metel-async-relay |
|- | |- | ||
|in | |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. | ||
+ | {| 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|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 | ||
− | | | + | |ONVIF_ID |
|UINT | |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 | |in | ||
− | | | + | |DATA_NAMES |
|STRING[255] | |STRING[255] | ||
| | | | ||
− | | | + | |event data names, comma separated, optional |
|- | |- | ||
|in | |in | ||
− | | | + | |DATA_VALUES |
|STRING[255] | |STRING[255] | ||
| | | | ||
− | | | + | |event data values, comma separated, optional |
|- | |- | ||
|in | |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|Error codes]]) | ||
+ | |- | ||
+ | |out | ||
+ | |VALID | ||
|BOOL | |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. | ||
+ | {| 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 | ||
− | | | + | |DATA_VALUES_0 |
|STRING[255] | |STRING[255] | ||
| | | | ||
− | | | + | |event data values for logic 0, comma separated, required |
|- | |- | ||
|in | |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|Error codes]]) | ||
+ | |- | ||
+ | |out | ||
+ | |VALID | ||
+ | |BOOL | ||
+ | | | ||
+ | |indicates success operation and valid output | ||
+ | |- | ||
+ | |out | ||
+ | |LAST_VAL | ||
|BOOL | |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 | ||
|} | |} |
Latest revision as of 12:20, 11 June 2021
Contents
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 |