# ADLINK Vision Software (AVS)

Manual Rev.: 1.0

Revision Date: Oct. 12, 2021

Leading EDGE COMPUTING

Revision History

<table><tr><td>Revision</td><td>Release Date</td><td>Description of Change(s)</td></tr><tr><td>1.00</td><td>Oct. 12, 2021</td><td>Initial release</td></tr></table>

# Preface

# Copyright © 2019 ADLINK Technology Inc.

This document contains proprietary information protected by copyright. All rights are reserved. No part of this manual may be reproduced by any mechanical, electronic, or other means in any form without prior written permission of the manufacturer.

# Disclaimer

The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer.

In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.

ADLINK is committed to fulfill its social responsibility to global environmental preservation through compliance with the European Union's Restriction of Hazardous Substances (RoHS) directive and Waste Electrical and Electronic Equipment (WEEE) directive. Environmental protection is a top priority for ADLINK. We have enforced measures to ensure that our products, manufacturing processes, components, and raw

![Symbol of a trash bin crossed with two crossed lines, no text or labels present](.adlink-avs-flr-v1-0-20211012/f564729adbc4dfd2aac8d2c63f2af8ea10545f4aa9a9ad448ddfefeb37ae4654.jpg)

materials have as little impact on the environment as possible. When products are at their end of life, our customers are encour- aged to dispose of them in accordance with the product disposal and/or recovery programs prescribed by their nation or company.

# Battery Labels (for products with battery)

![Simple line drawing of a trash bin crossed out by two diagonal lines (no text or symbols)](.adlink-avs-flr-v1-0-20211012/197dc3b33ab75f21ddfd15df34121316b242eed0b7142afd06f44203548e2c89.jpg)

![Li-ion](.adlink-avs-flr-v1-0-20211012/5f3d73bb9b449da9f27ec0662b5e94ba87a44e51d7192d5bc11d9ea9d4fb3e71.jpg)

![RECYCLE\nRBRC\nLi-ion\n1.800.822.8837](.adlink-avs-flr-v1-0-20211012/8f1066afc27d1b31e407e096abe16415cc79cb2785a4b67f4a04b2e95b896c3b.jpg)

![つづくむ 71.00](.adlink-avs-flr-v1-0-20211012/2d75ea97d4c557e4b66ff356c6c5211162488b0f09128cfa332b224ec105b4bd.jpg)

# California Proposition 65 Warning

![The image displays a standard warning sign consisting of a yellow triangle with a thick black border. Centered inside the triangle is a black exclamation point.](.adlink-avs-flr-v1-0-20211012/ab39f8f029a1418e5dc992214661521d16ff9d6e2a102ec389681a60a93fbf93.jpg)

WARNING: This product can expose you to chemicals including acrylamide, arsenic, benzene, cadmium, Tris (1,3- dichloro-2-propyl)phosphate (TDCPP), 1,4-Dioxane,

formaldehyde, lead, DEHP, styrene, DINP, BBP, PVC, and vinyl materials, which are known to the State of California to cause can- cer, and acrylamide, benzene, cadmium, lead, mercury, phthal- ates, toluene, DEHP, DIDP, DnHP, DBP, BBP, PVC, and vinyl materials, which are known to the State of California to cause birth defects or other reproductive harm. For more information go to www.P65Warnings.ca.gov.

# Trademarks

Product names mentioned herein are used for identification pur- poses only and may be trademarks and/or registered trademarks of their respective companies.

# Conventions

Take note of the following conventions used throughout this manual to make sure that users perform certain tasks and instructions properly.

![The image displays an icon of a white document or notepad page with a folded upper-right corner. Horizontal grey lines run across the lower portion of the page, simulating lined paper. A large, bold red checkmark is superimposed diagonally over the center of the document. There is no text visible in the image.](.adlink-avs-flr-v1-0-20211012/d1b389f84ca88bb71ba059a1bbf7e349099b80ce4c21271a3330099f6bbd269c.jpg)
NOTE:

Additional information, aids, and tips that help users perform tasks.

![A yellow triangular warning sign with a black border containing a large black exclamation mark.](.adlink-avs-flr-v1-0-20211012/35d7d67e786e186f3e40bc4fa60497f1fdccd91eb1a5f321e4e1186ddf7acc18.jpg)
CAUTION:

Information to prevent minor physical injury, component dam- age, data loss, and/or program corruption when trying to com- plete a task.

![A red triangle containing a white exclamation point.](.adlink-avs-flr-v1-0-20211012/5315b3715a644fe310392595db9cd48442b9600f1bef9b0e5372a721016ca236.jpg)
WARNING:

Information to prevent serious physical injury, component damage, data loss, and/or program corruption when trying to complete a specific task.

# Table of Contents

# Revision History ........... 6

# Preface ..........

# 1. Introduction ......... ... 13

1.1 Environment .. . 13
1.2 AVS Installation .... .. 13
1.3 AVS Function & Parameter .. .. 13
1.4 AVS Sample program ... .. 13
1.5 AVS Installation Folder ... .. 14
1.6 Reference Code Snippet . . 15
1.6.1 Include head file .. . 15
1.6.2 Get product handle ... .. 15

# 2. AVS Parameters Reference ....... .. 16

2.1. Product Name .... ... 16
2.2. Product Feature ... . 16
2.3. Edge Trigger ..... .. 17
2.4. PoE .. . 17
2.5. PoE Power Management .. . 17
2.6. AVS Error Code .. ... 18

# 3. Function Library ......... .. 19

3.1 List of Functions .. . 19
3.2 Function Library .. ... 20
3.2.1 Common .. ... 20
3.2.1.1 AVS\_GetProductNums .. ... 20
3.2.1.2 AVS\_GetSDKInfo .... ... 21
3.2.1.3 AVS\_GetProductHandle .. .. 21
3.2.1.4 AVS\_GetProductInfo ... . 22
3.2.1.5 AVS\_GetProductType ..... .. 22
3.2.1.6 AVS\_GetProductSN .. . 23

3.2.1.7 AVS\_GetFeatureList .. .. 23

3.2.1.8 AVS\_GetCardID ... . 24

3.2.2 USB Port Control .. ... 25

3.2.2.1 AVS\_PowCtrlGetPortNums ... ... 25

3.2.2.2 AVS\_PowCtrlSetPortEnable .. ... 25

3.2.2.3 AVS\_PowCtrlGetPortEnable .. .. 26

3.2.3 External Power Supply .. .. 27

3.2.3.1 AVS\_ExPowSupGetNums ... . 27

3.2.3.2 AVS\_ExPowSupGetState .. .. 27

3.2.4 Power over Ethernet .. . 28

3.2.4.1 AVS\_PoEGetPortNums .... ... 28

3.2.4.2 AVS\_PoESetPortEnable .. .. 28

3.2.4.3 AVS\_PoEGetPortEnable .. .. 29

3.2.4.4 AVS\_PoESetPowConsumCalcModel . . 29

3.2.4.5 AVS\_PoEGetPowConsumCalcModel .. .. 30

3.2.4.6 AVS\_PoESetProtectTempRange ... . 30

3.2.4.7 AVS\_PoEGetProtectTempRange ...... .. 31

3.2.4.8 AVS\_PoEGetProperty ....... ... 31

3.2.4.9 AVS\_PoEGetPortProperty ... . 32

3.2.5 Trigger over Ethernet .. . 33

3.2.5.1 AVS\_ToEGetPortNums ... .. 33

3.2.5.2 AVS\_ToESendActionCommand . .. 34

3.2.5.3 AVS\_ToESetActionCommand . .. 34

3.2.5.4 AVS\_ToEGetActionCommand .. .. 35

3.2.5.5 AVS\_ToESetTriggerSource .. ... 36

3.2.5.6 AVS\_ToEGetTriggerSource .... ... 36

3.2.5.7 AVS\_ToESetTriggerEnable ... .. 37

3.2.5.8 AVS\_ToEGetTriggerEnable . . 37

3.2.5.9 AVS\_ToESetTriggerActivation .. . 37

3.2.5.10 AVS\_ToEGetTriggerActivation ... .. 38

3.2.5.11 AVS\_ToESetOneTriggerAllMode .. .. 39

3.2.5.12 AVS\_ToEGetOneTriggerAllMode .. .. 39

3.2.5.13 AVS\_ToESetExTriggerDebounce .. . 40

3.2.5.14 AVS\_ToEGetExTriggerDebounce... . 40

3.2.5.15 AVS\_ToEGetExTriggerDebounceUnit . . 41
3.2.5.16 AVS\_ToEGetTriggerCount .. .. 41
3.2.5.17 AVS\_ToEResetTriggerCount .. .. 42

This page intentionally left blank.

# 1. Introduction

The ADLINK Vision Software (AVS) is the application programming interface (API) for ADLINK vision products. AVS provides necessary details, where developers can develop applications in Linux and Windows OS, and support C/C++, C#/VB.NET languages. Along with the APIs, the AVS also includes product drivers and a set of sample programs and documentation.

# 1.1 Environment

<table><tr><td>Platform</td><td>x86, x86-x64</td></tr><tr><td rowspan="2">OS</td><td>Linux: Ubuntu 12.04 LTS (kernel 3.13) and above</td></tr><tr><td>Windows: Windows 7/10</td></tr><tr><td rowspan="2">Programming language</td><td>Linux: C/C++</td></tr><tr><td>Windows: C/C++, C#, VB.NET</td></tr></table>

# 1.2 AVS Installation

<table><tr><td>Linux</td><td>Debian, DKMS are must for AVS.$sudo apt-get install dkms$tar xvf AVS-SDK_xxx.tar$cd AVS-SDK_xxx$./install.sh</td></tr><tr><td>Windows</td><td>Perform “AVS-SDK_x.x.x.xxxx.exe” the installation</td></tr></table>

# 1.3 AVS Function & Parameter

<table><tr><td>AVS Function</td><td>Description</td><td>Installation Folder</td></tr><tr><td>General SDK functions</td><td>To get product handle and retrieve the device information</td><td>\AVS_SDK.h</td></tr><tr><td>Features function</td><td>Basic functions</td><td>\Feature\*.h</td></tr><tr><td>AVS Parameters Reference</td><td>AVS parameters are grouped by C/C++ enumerations</td><td>\Common\I_common.h</td></tr></table>

# 1.4 AVS Sample program

<table><tr><td>Type</td><td>Description</td></tr><tr><td>GUI samples</td><td>An entry point for quickly performing samples with a GUI interface. This is for Windows only.</td></tr><tr><td>Console samples</td><td>The application that can be run in the command prompt in Windows and Linux.</td></tr></table>

# 1.5 AVS Installation Folder

1.5.1 Linux

<table><tr><td>Type</td><td>Installation Folder</td><td>File</td><td>Description</td></tr><tr><td rowspan="3">Include</td><td>/usr/local/include/ADLINK/AVS</td><td>AVS_SDK.h</td><td>Header file required for General SDK functions</td></tr><tr><td>/usr/local/include/ADLINK/AVS/Common/</td><td>I_common.h</td><td>Header file required for AVS parameters</td></tr><tr><td>/usr/local/include/ADLINK/AVS/Feature/</td><td>ExPowerSupply.hPowerController.hPoE.hToE.hFan.h</td><td>Header file required for basic functions</td></tr><tr><td>Library</td><td>/usr/local/lib/</td><td>libAVS_SDK.solibAVS_Product.solibAVS_CoreSDK.so</td><td>Exports API function definitions, required for Visual C/C++ applications</td></tr><tr><td>Sample Program</td><td>/usr/local/src/ADLINK/AVS/Sample</td><td colspan="2">Build Sample$cd /usr/local/src/ADLINK/AVS/Sample$makeExecute Sample$cd /usr/local/src/ ADLINK/AVS/Sample/bin$sudo ./AVS_GetSDKInfo</td></tr></table>

1.5.2 Windows

<table><tr><td>Type</td><td>Installation Folder</td><td>File</td><td>Description</td></tr><tr><td rowspan="3">Include</td><td>\ADLINK\AVS\Include\C++</td><td>AVS_SDK.hI_common.hExPowerSupply.hPowerController.h</td><td>Header file required for all C/C++ applications</td></tr><tr><td>\ADLINK\AVS\Include\VB.NET</td><td>AVS_SDK.vbI_common.vbExPowerSupply.vbPowerController.vb</td><td>Function definitions required for all VB.Net applications</td></tr><tr><td>\ADLINK\AVS\Include\C#</td><td>AVS_SDK.csI_common.csExPowerSupply.csPowerController.cs</td><td>Function definitions required for all C# applications</td></tr><tr><td>DLL</td><td>\ADLINK\AVS\DII</td><td>AVS_SDK.dllAVS_Product.dllAVS_CoreSDK.dll</td><td>Dynamic link library files required for all applications</td></tr><tr><td>Library</td><td>\ADLINK\AVS\DII</td><td>AVS_SDK.lib</td><td>Exports API function definitions, required for all Visual C/C++ applications</td></tr><tr><td>Sample Program</td><td>\ADLINK\AVS\Sample</td><td colspan="2">Console: SampleGUI.exeGUI: VC++, C#/VB.ET</td></tr></table>

# 1.6 Reference Code Snippet

# 1.6.1 Include head file

This code snippet shows how to include the head file.

```c
#ifdef __linux__
#include "/usr/local/include/ADLINK/AVS/AVS_SDK.h"
#include "/usr/local/include/ADLINK/AVS/Common/I_common.h"
#elif_WIN32
#include "Include/C++/AVS_SDK.h"
#include "Include/C++/Common/I_common.h"
#endif
```

# 1.6.2 Get product handle

This code snippet shows how to get product handle and product Information.

```txt
using namespace std;
/*Show SDK Information*/
char buffer[256];
if (AVS_GetSDKInfo(buffer, sizeof(buffer)) == AVS_FUN_SUCCESS)
cout &lt;&lt; buffer &lt;&lt; endl;
...
/*Show Product Information*/
unsigned int nums = AVS_GetProductNums();
if (nums &lt;= 0)
{
    cout &lt;&lt; "Find no device!" &lt;&lt; endl;
    return 0;
}

void* handle;
unsigned int devIndex = 0;
handle = AVS_GetProductHandle(devIndex);
if (!handle)
{
    cout &lt;&lt; "AVS_GetProductHandle Error\n" &lt;&lt; endl;
    return 0;
}

if (AVS_GetProductInfo(handle, buffer, sizeof(buffer)) == AVS_FUN_SUCCESS)
    cout &lt;&lt; buffer &lt;&lt; endl;
...
```

# 2. AVS Parameters Reference

The AVS parameters are grouped by enumerations and the enumerations can also be found in the header file “I\_common”.

# 2.1. Product Name

ADLINK vision products supported by AVS SDK are grouped by AVS\_PRODUCT\_TYPE and listed.

&lt;table&gt;<tr><td>String Identifier</td><td>Product Name</td></tr><tr><td>AVS_PRODUCT_UNKNOWN</td><td>Unknown product</td></tr><tr><td>AVS_PRODUCT_PCIEGIE72</td><td>PCIe-GIE72</td></tr><tr><td>AVS_PRODUCT_PCIEGIE74</td><td>PCIe-GIE74</td></tr><tr><td>AVS_PRODUCT_PCIEGIE72PRO</td><td>PCIe-GIE72 PRO</td></tr><tr><td>AVS_PRODUCT_PCIEGIE74PRO</td><td>PCIe-GIE74 PRO</td></tr><tr><td>AVS_PRODUCT_PCIEU304</td><td>PCIe-U304</td></tr><tr><td>AVS_PRODUCT_PCIEU308</td><td>PCIe-U308</td></tr><tr><td>AVS_PRODUCT_PCIEU312</td><td>PCIe-U312</td></tr><tr><td>AVS_PRODUCT_PCIE10GPOE</td><td>PCIe-10GPoE</td></tr></table>

# 2.2. Product Feature

The AVS parameters are grouped by AVS\_FEATURE\_TYPE.

<table><tr><td>String Identifier</td><td>Product Feature</td></tr><tr><td>AVS_FEATURE_POWERCONTROLLER</td><td>USB3 Power Management</td></tr><tr><td>AVS_FEATURE_POE</td><td>Power over Ethernet (PoE)</td></tr><tr><td>AVS_FEATURE_TOE</td><td>Trigger over Ethernet (ToE)</td></tr><tr><td>AVS_FEATURE_DIO</td><td>Digital Input / Output</td></tr><tr><td>AVS_FEATURE_EXTERNALPOWERSUPPLY</td><td>External power supply detection</td></tr><tr><td>AVS_FEATURE_NUMS</td><td>The number of the product feature</td></tr></table>

# 2.3. Edge Trigger

Parameters of the Edge Trigger, defined by AVS\_ EDGETRIGGER\_TYPE.

<table><tr><td>String Identifier</td><td>Parameter</td></tr><tr><td>AVS_EDGETRIGGER_RISINGEDGE</td><td>Signal rising edge trigger</td></tr><tr><td>AVS_EDGETRIGGER_FALLINGEDGE</td><td>Signal falling edge trigger</td></tr><tr><td>AVS_EDGETRIGGER_CHANGINGEDGE</td><td>Signal changing edge trigger</td></tr><tr><td>AVS_EDGETRIGGER_NUMS</td><td>The number of the edge trigger type</td></tr></table>

# 2.4. PoE

Parameters of PoE defined by AVS\_POEPROPERTY\_TYPE.

<table><tr><td>String Identifier</td><td>Parameter</td></tr><tr><td>AVS_POEPROPERTY_POEHWSETTING</td><td>PSE Hardware setting</td></tr><tr><td>AVS_POEPROPERTY_POINITIALSTATE</td><td>PSE initial power</td></tr><tr><td>AVS_POEPROPERTY_OVERTEMPERATURE</td><td>Check if the device temperature is over high temperature ( degree C )</td></tr><tr><td>AVS_POEPROPERTY_CURRENTTEMPERATURE</td><td>Get the current temperature</td></tr><tr><td>AVS_POEPROPERTY_CONSUMEPOWER</td><td>The consumer power(Watt)</td></tr><tr><td>AVS_POEPROPERTY_REMAINPOWER</td><td>The left power(Watt)</td></tr><tr><td>AVS_POEPROPERTY_POWERBUDGET</td><td>The total power budget(Watt)</td></tr><tr><td>AVS_POEPROPERTY_NUMS</td><td>The number of the PoE property</td></tr></table>

# 2.5. PoE Power Management

Parameters of PoE Power Management defined by AVS\_POEPORTPROPERTY\_TYPE.

<table><tr><td>String Identifier</td><td>Parameter</td></tr><tr><td>AVS_POEPORTPROPERTY_CURRENT</td><td>The current of a port (A)</td></tr><tr><td>AVS_POEPORTPROPERTY_VOLT</td><td>The volt of a port</td></tr><tr><td>AVS_POEPORTPROPERTY_POECLASS</td><td>The power class of a port</td></tr><tr><td>AVS_POEPORTPROPERTY_POWERGOOD</td><td>Check if the power is good of a port</td></tr><tr><td>AVS_POEPORTPROPERTY_LASTPOWERSTATE</td><td>Retrieve the last power state of a port</td></tr><tr><td>AVS_POEPORTPROPERTY_NUMS</td><td>The number of the PoE port properties</td></tr></table>

# 2.6. AVS Error Code

AVS error cod is defined by AVS\_FUN\_RETURNVAL. No error occurs if API return value >= 0, and if a negative value, please refer to below table.

<table><tr><td>Error Code</td><td>Definition</td><td>Description</td></tr><tr><td>0</td><td>AVS_FUN_SUCCESS</td><td>Execution successful</td></tr><tr><td>-1</td><td>AVS_FUN_FAILED</td><td>Execution failed</td></tr><tr><td>-5</td><td>AVS_FUN_NOTDEFINED</td><td>Unsupported function</td></tr><tr><td>-11</td><td>AVS_FUN_INVALIDPARA</td><td>The parameters are invalid</td></tr><tr><td>-13</td><td>AVS_FUN_NOTINIT</td><td>The object is not initialized</td></tr><tr><td>-100</td><td>AVS_FUN_BUSY</td><td>System is busy</td></tr></table>

# 3. Function Library

3.1 List of Functions

<table><tr><td>Category (Header File)</td><td>Function</td><td>Product</td></tr><tr><td rowspan="8">Common (AVS_SDK.h)</td><td>AVS_GetProductNums()</td><td rowspan="8">All Product</td></tr><tr><td>AVS_GetSDKInfo()</td></tr><tr><td>AVS_GetProductHandle()</td></tr><tr><td>AVS_GetProductInfo()</td></tr><tr><td>AVS_GetProductType()</td></tr><tr><td>AVS_GetProductSN()</td></tr><tr><td>AVS_GetFeatureList()</td></tr><tr><td>AVS_GetCardID()</td></tr><tr><td rowspan="3">USB Port Control (PowerController.h)</td><td>AVS_PowCtrlGetPortNums()</td><td rowspan="3">PCIe-U300 Series</td></tr><tr><td>AVS_PowCtrlSetPortEnable()</td></tr><tr><td>AVS_PowCtrlGetPortEnable()</td></tr><tr><td rowspan="2">External Power Supply (ExPowerSupply.h)</td><td>AVS_ExPowSupGetNums()</td><td rowspan="2">All Product</td></tr><tr><td>AVS_ExPowSupGetState()</td></tr><tr><td rowspan="9">Power over Ethernet (PoE.h)</td><td>AVS_PoEGetPortNums()</td><td rowspan="9">PCIe-GIE Series PCIe-10G Series</td></tr><tr><td>AVS_PoESetPortEnable()</td></tr><tr><td>AVS_PoEGetPortEnable()</td></tr><tr><td>AVS_PoESetPowConsumCalcModel()</td></tr><tr><td>AVS_PoEGetPowConsumCalcModel()</td></tr><tr><td>AVS_PoESetProtectTempRange()</td></tr><tr><td>AVS_PoEGetProtectTempRange()</td></tr><tr><td>AVS_PoEProperty()</td></tr><tr><td>AVS_PoEGetPortProperty()</td></tr><tr><td rowspan="9">Trigger over Ethernet (ToE.h)</td><td>AVS_ToEGetPortNums()</td><td rowspan="9">PCIe-GIE7x PRO, PCIe-10G Series</td></tr><tr><td>AVS_ToESendActionCommand()</td></tr><tr><td>AVS_ToESetActionCommand()</td></tr><tr><td>AVS_ToEGetActionCommand()</td></tr><tr><td>AVS_ToESetTriggerSource()</td></tr><tr><td>AVS_ToEGetTriggerSource()</td></tr><tr><td>AVS_ToESetTriggerEnable()</td></tr><tr><td>AVS_ToEGetTriggerEnable()</td></tr><tr><td>AVS_ToESetTriggerActivation()</td></tr><tr><td rowspan="8"></td><td>AVS_ToEGetTriggerActivation()</td><td rowspan="8"></td></tr><tr><td>AVS_ToESetOneTriggerAllMode()</td></tr><tr><td>AVS_ToEGetOneTriggerAllMode()</td></tr><tr><td>AVS_ToESetExTriggerDebounce()</td></tr><tr><td>AVS_ToEGetExTriggerDebounce()</td></tr><tr><td>AVS_ToEGetExTriggerDebounceUnit()</td></tr><tr><td>AVS_ToEGetTriggerCount()</td></tr><tr><td>AVS_ToEResetTriggerCount()</td></tr></table>

# 3.2 Function Library

AVS supports C/C++/C#/VB.NET programming language. The following is the example of C/C++ library.

# 3.2.1 Common

These functions are used to get product handle and retrieval device information.

# 3.2.1.1 AVS\_GetProductNums

<table><tr><td>Function Name</td><td>AVS_GetProductNums</td></tr><tr><td>Purpose</td><td>This function returns the total number of products is installed in the system.</td></tr><tr><td>Category</td><td>Common</td></tr><tr><td>Header File</td><td>AVS_SDK.h</td></tr><tr><td>Syntax (C/C++)</td><td>unsigned int AVS_GetProductNums()</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2"></td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">Returns the total number of devices if return value &gt;= 0; else please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.1.2 AVS\_GetSDKInfo

<table><tr><td>Function Name</td><td>AVS_GetSDKInfo</td></tr><tr><td>Purpose</td><td>This function returns SDK version information, e.g., driver version, SDK version...etc.</td></tr><tr><td>Category</td><td>Common</td></tr><tr><td>Header File</td><td>AVS_SDK.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_GetSDKInfo(char* data, unsigned int bufsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">data:It is a string buffer indicates the parameters and information provided. Each parameter and information is split by a break line character &#x27;\n&#x27;. The format isParameter Name:Parameter Information &#x27;\n&#x27;For example:Driver version:0.2.0.0929SDK version:1.3.6.0121bufsize:Indicates the size of &quot;data&quot; buffer. The suggested value is 256.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">Returns the total number of devices if return value &gt;= 0; else please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.1.3 AVS\_GetProductHandle

<table><tr><td>Function Name</td><td>AVS_GetProductHandle</td></tr><tr><td>Purpose</td><td>Initializes the specified device and get handle, should be called before other functions except those with no handle parameter.</td></tr><tr><td>Category</td><td>Common</td></tr><tr><td>Header File</td><td>AVS_SDK.h</td></tr><tr><td>Syntax (C/C++)</td><td>void* AVS_GetProductHandle(unsigned int index)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">index:Indicates the number of devices, beginning at 0 for the number of the first card, with the second card 1, and so on. This value should be less than (total numbers of the cards -1), the total number of the cards is acquired from AVS_GetProductNums.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.1.4 AVS\_GetProductInfo

<table><tr><td>Function Name</td><td>AVS_GetProductInfo</td></tr><tr><td>Purpose</td><td>This function returns all of the product information, e.g., firmware version, product number...etc.</td></tr><tr><td>Category</td><td>Common</td></tr><tr><td>Header File</td><td>AVS_SDK.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_GetProductInfo(void* handle, char* data, unsigned int bufsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handle:Acquired from the return value of AVS_GetProductHandle.data:It is a string buffer indicates the parameters and information provided. Each parameter and information is split by a break line character &#x27;\n&#x27;. The format isParameter Name:Parameter Information &#x27;\n&#x27;For example:Product:PCIe-10GPoECPLDVersion:20210119_1610MCUVersion:2.3PN:91-64216-000ESN:0123456789PCBVersion:1MAC0:00:30:64:35:c4:26MAC1:00:30:64:35:c4:26Bufsize:Indicates the size of &quot;data&quot; buffer. The suggested value is 256.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.1.5 AVS\_GetProductType

<table><tr><td>Function Name</td><td>AVS_GetProductType</td></tr><tr><td>Purpose</td><td>Get the product type.</td></tr><tr><td>Category</td><td>Common</td></tr><tr><td>Header File</td><td>AVS_SDK.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_GetProductType(void* handle)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handle:Acquired from the return value of AVS_GetProductHandle.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">Return the AVS_PRODUCT_TYPE, no error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.1.6 AVS\_GetProductSN

<table><tr><td>Function Name</td><td>AVS_GetProductSN</td></tr><tr><td>Purpose</td><td>This function gets product serial number (SN).</td></tr><tr><td>Category</td><td>Common</td></tr><tr><td>Header File</td><td>AVS_SDK.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_GetProductSN(void* handle, char* data, unsigned int bufsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handle:Acquired from the return value of AVS_GetProductHandle.data:Pointer of an allocated character buffer into the function copies the string. Bufsize:Indicates the size of “data” buffer. The suggested value is 32.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.1.7 AVS\_GetFeatureList

<table><tr><td>Function Name</td><td>AVS_GetFeatureList</td></tr><tr><td>Purpose</td><td>This function gets product feature list.</td></tr><tr><td>Category</td><td>Common</td></tr><tr><td>Header File</td><td>AVS_SDK.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_GetFeatureList(void* handle, AVS_FEATURE_TYPE* list, unsigned int listsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handle:Acquired from the return value of AVS_GetProductHandle.list:Pointer of an allocated buffer into the function copies the string.listsize:Indicates the size of “list” buffer. The suggested value is AVS_FEATURE_NUMS (AVS_FEATURE_NUMS is defined in I_common.h head file).</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.1.8 AVS\_GetCardID

<table><tr><td>Function Name</td><td>AVS_GetCardID</td></tr><tr><td>Purpose</td><td>This function gets a numeric card ID that corresponds to the handle.</td></tr><tr><td>Category</td><td>Common</td></tr><tr><td>Header File</td><td>AVS_SDK.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_GetCardID(void* handle, int* id)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handle:Acquired from the return value of AVS_GetProductHandle.id:Indicates the card ID set by SW1 switch, a value from 0 to 15. Card ID and SW1 switch settings correlate as shown. Please refer to the table below.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

<table><tr><td rowspan="2">Card ID (id)</td><td colspan="4">Hardware Switch</td></tr><tr><td>4</td><td>3</td><td>2</td><td>1</td></tr><tr><td>0</td><td>off</td><td>off</td><td>off</td><td>off</td></tr><tr><td>1</td><td>off</td><td>off</td><td>off</td><td>on</td></tr><tr><td>2</td><td>off</td><td>off</td><td>on</td><td>off</td></tr><tr><td>3</td><td>off</td><td>off</td><td>on</td><td>on</td></tr><tr><td>4</td><td>off</td><td>on</td><td>off</td><td>off</td></tr><tr><td>5</td><td>off</td><td>on</td><td>off</td><td>on</td></tr><tr><td>6</td><td>off</td><td>on</td><td>on</td><td>off</td></tr><tr><td>7</td><td>off</td><td>on</td><td>on</td><td>on</td></tr><tr><td>8</td><td>on</td><td>off</td><td>off</td><td>off</td></tr><tr><td>9</td><td>on</td><td>off</td><td>off</td><td>on</td></tr><tr><td>10</td><td>on</td><td>off</td><td>on</td><td>off</td></tr><tr><td>11</td><td>on</td><td>off</td><td>on</td><td>on</td></tr><tr><td>12</td><td>on</td><td>on</td><td>off</td><td>off</td></tr><tr><td>13</td><td>on</td><td>on</td><td>off</td><td>on</td></tr><tr><td>14</td><td>on</td><td>on</td><td>on</td><td>off</td></tr><tr><td>15</td><td>on</td><td>on</td><td>on</td><td>on</td></tr></table>

# 3.2.2 USB Port Control

This feature is use to control the power device.

3.2.2.1 AVS\_PowCtrlGetPortNums

<table><tr><td>Function Name</td><td>AVS_PowCtrlGetPortNums</td></tr><tr><td>Purpose</td><td>This function gets a number of ports that corresponds to the handle.</td></tr><tr><td>Category</td><td>USB Port Control</td></tr><tr><td>Header File</td><td>PowerController.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PowCtrlGetPortNums(void* handle, unsigned int* nums)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handle: Acquired from the return value of AVS_GetProductHandle. nums: Number of ports.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.2.2 AVS\_PowCtrlSetPortEnable

<table><tr><td>Function Name</td><td>AVS_PowCtrlSetPortEnable</td></tr><tr><td>Purpose</td><td>Controls power auto/off.</td></tr><tr><td>Category</td><td>USB Port Control</td></tr><tr><td>Header File</td><td>PowerController.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PowCtrlSetPortEnable(void* handle, int* list, unsigned int listsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.listAn array to control power auto/off of each port. The index of the array corresponds to the index of port, the element of the array indicates to enable or disable the power.listsizeThe array must contain nums elements (nums is acquired from the return value of AVS_PowCtrlGetPortNums).</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.2.3 AVS\_PowCtrlGetPortEnable

<table><tr><td>Function Name</td><td>AVS_PowCtrlGetPortEnable</td></tr><tr><td>Purpose</td><td>Retrieves power auto/off.</td></tr><tr><td>Category</td><td>USB Port Control</td></tr><tr><td>Header File</td><td>PowerController.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PowCtrlGetPortEnable(void* handle, int* list, unsigned int listsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.listAn array for receiving the power status from the ports.listsizeThe array must contain nums elements (nums is acquired from the return value of AVS_PowCtrlGetPortNums).</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

# 3.2.3 External Power Supply

These functions are used for status of external power supply cables.

3.2.3.1 AVS\_ExPowSupGetNums

<table><tr><td>Function Name</td><td>AVS_ExPowSupGetNums</td></tr><tr><td>Purpose</td><td>Get the number of the external power cable is connected.</td></tr><tr><td>Category</td><td>External Power Supply</td></tr><tr><td>Header File</td><td>ExPowerSupply.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ExPowSupGetNums(void* handle, unsigned int* nums)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.numsNumber of the external power cable is connected.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.3.2 AVS\_ExPowSupGetState

<table><tr><td>Function Name</td><td>AVS_ExPowSupGetState</td></tr><tr><td>Purpose</td><td>Get the detection results of external power supply cables.</td></tr><tr><td>Category</td><td>External Power Supply</td></tr><tr><td>Header File</td><td>ExPowerSupply.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ExPowSupGetState(void* handle, int* statelist, unsigned int listsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.statelistAn array for detection results of external power cables. “0” indicates power is not supplied, the other values indicate power is supplied.listsizeThe array must contain nums elements (nums is acquired from the return value of AVS_ExPowSupGetNums).</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

# 3.2.4 Power over Ethernet

This feature is for SmartPoE, the PoE power management functions.

3.2.4.1 AVS\_PoEGetPortNums

<table><tr><td>Function Name</td><td>AVS_PoEGetPortNums</td></tr><tr><td>Purpose</td><td>Retrieve the number of the power over Ethernet.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoEGetPortNums(void* handle, unsigned int* nums)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.numsReturn the number of the power over Ethernet.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.4.2 AVS\_PoESetPortEnable

<table><tr><td>Function Name</td><td>AVS_PoESetPortEnable</td></tr><tr><td>Purpose</td><td>Controls power auto/off.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoESetPortEnable(void* handle, int* list, unsigned int listsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.listAn array for setting the power status of the ports.Assign a list to enable or disable each port.* 0 to disable power or other to enable power.listsizeThe array must contain nums elements (nums is acquired from the return value of AVS_PowCtrlGetPortNums).</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.4.3 AVS\_PoEGetPortEnable

<table><tr><td>Function Name</td><td>AVS_PoEGetPortEnable</td></tr><tr><td>Purpose</td><td>Retrieves PoE state.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoEGetPortEnable(void* handle, int* list, unsigned int listsize)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.listAn array for receiving the power status of the ports.listsizeThe array must contain nums elements (nums is acquired from the return value of AVS_PowCtrlGetPortNums).</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.4.4 AVS\_PoESetPowConsumCalcModel

<table><tr><td>Function Name</td><td>AVS_PoESetPowConsumCalcModel</td></tr><tr><td>Purpose</td><td>Controls power budget mode.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoESetPowConsumCalcModel(void* handle, int usePowClassBudget)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.usePowClassBudget0: calculate the Consumed Power Budget by PoE power consumption.1: calculate the Consumed Power Budget by PoE Class.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.4.5 AVS\_PoEGetPowConsumCalcModel

<table><tr><td>Function Name</td><td>AVS_PoEGetPowConsumCalcModel</td></tr><tr><td>Purpose</td><td>Retrieves power budget mode.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoEGetPowConsumCalcModel(void* handle, int* usePowClassBudget)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.usePowClassBudget0: calculate the Consumed Power Budget by PoE power consumption.1: calculate the Consumed Power Budget by PoE Class.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.4.6 AVS\_PoESetProtectTempRange

<table><tr><td>Function Name</td><td>AVS_PoESetProtectTempRange</td></tr><tr><td>Purpose</td><td>Controls of High Temperature (HT) and Recovery Temperature (RT).When HT is reached, automatically shuts down PoE power until the temperature sensor falls below RT.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoESetProtectTempRange(void* handle, int high_temperature, int recovery_temperature)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.high_temperatureHigh temperature setting, more than or equal to 80°C, not exceeding 130°C, and at least 10°C higher than the Recovery Temperature setting. 1 byte data in 1°C unit.recovery_temperatureRecovery temperature setting, equal to or exceeding 70°C and at least 10°C lower than the high_temperature setting.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.4.7 AVS\_PoEGetProtectTempRange

<table><tr><td>Function Name</td><td>AVS_PoEGetProtectTempRange</td></tr><tr><td>Purpose</td><td>Retrieves of High Temperature and Recovery Temperature.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoEGetProtectTempRange(void* handle, int high_temperature, int recovery_temperature)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.high_temperatureHigh Temperature setting.recovery_temperatureRecovery Temperature setting.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.4.8 AVS\_PoEGetProperty

<table><tr><td>Function Name</td><td>AVS_PoEGetProperty</td></tr><tr><td>Purpose</td><td>Retrieves of PoE properties.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoEGetProperty(void* handle,AVS_POEPROPERTY_TYPE property, float* value)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.property &amp; valuePlease refer to following table.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

<table><tr><td>property</td><td>value</td></tr><tr><td>AVS_POEPROPERTY_POEHWSETTING</td><td>0: PoE-PSE HW setting disabled1: PoE-PSE HW setting enabled</td></tr><tr><td>AVS_POEPROPERTY_POEINITIALSTATE</td><td>0: PoE-PSE should be turned off when powered on1: PoE-PSE should be turned onwhen powered on.</td></tr><tr><td>AVS_POEPROPERTY_OVERTEMPERATURE</td><td>0: no interrupt1: over temperature interrupt arise</td></tr><tr><td>AVS_POEPROPERTY_CURRENTTEMPERATURE</td><td>Thermal temperature in °C.</td></tr><tr><td>AVS_POEPROPERTY_CONSUMEPOWER</td><td>Consumed power budget in W.</td></tr><tr><td>AVS_POEPROPERTY_REMAINPOWER</td><td>Remaining available power in W.</td></tr><tr><td>AVS_POEPROPERTY_POWERBUDGET</td><td>Total Budget in W.</td></tr><tr><td>AVS_POEPROPERTY_NUMS</td><td></td></tr></table>

# 3.2.4.9 AVS\_PoEGetPortProperty

<table><tr><td>Function Name</td><td>AVS_PoEGetPortProperty</td></tr><tr><td>Purpose</td><td>Retrieves of PoE port properties.</td></tr><tr><td>Category</td><td>Power over Ethernet</td></tr><tr><td>Header File</td><td>PoE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_PoEGetPortProperty(void* handle, unsigned int port, AVS_POEPORTPROPERTY_TYPE property, float* value)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.portIndicates port number from 0 to N. (N is the number of port)property &amp; valuePlease refer to following table.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

<table><tr><td>String Identifier</td><td>Value</td></tr><tr><td>AVS_POEPORTPROPERTY_CURRENT</td><td>Port PoE power current (unit: A)</td></tr><tr><td>AVS_POEPORTPROPERTY_VOLT</td><td>Port PoE power voltage (unit: V)</td></tr><tr><td>AVS_POEPORTPROPERTY_POECLASS</td><td>Port PoE Class</td></tr><tr><td>AVS_POEPORTPROPERTY_POWERGOOD</td><td>Port Power Good (unit: Watt)</td></tr><tr><td>AVS_POEPORTPROPERTY_LASTPOWERSTATE</td><td>0 : PoE power off1 : PoE power on</td></tr></table>

# 3.2.5 Trigger over Ethernet

ToE is to send a preconfigured ToE action commands to GigE Vision camera when detecting a rising/falling edge of external trigger signal. User also can force the software ToE action commands by AVS SDK. The following shows the basic steps.

<table><tr><td>Procedure</td><td>AVS Function Name</td></tr><tr><td>1. Select Trigger Source</td><td>AVS_ToESetTriggerSource</td></tr><tr><td>2. Configure Action Command</td><td>AVS_ToESetActionCommand</td></tr><tr><td>3. Set Trigger Activation</td><td>AVS_ToESetTriggerActivation</td></tr><tr><td>4. Enable ToE function</td><td>AVS_ToESetTriggerEnable</td></tr><tr><td>5. Manually send ToE</td><td>AVS_ToESendActionCommand</td></tr><tr><td>6. ToE counters</td><td>AVS_ToEGetTriggerCount</td></tr></table>

# 3.2.5.1 AVS\_ToEGetPortNums

<table><tr><td>Function Name</td><td>AVS_ToEGetPortNums</td></tr><tr><td>Purpose</td><td>Retrieves the number of ToE port.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEGetPortNums(void* handle, unsigned int* nums)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.numsNumber of ToE ports.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.2 AVS\_ToESendActionCommand

<table><tr><td>Function Name</td><td>AVS_ToESendActionCommand</td></tr><tr><td>Purpose</td><td>Sends a software ToE action command over the selected port.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToESendActionCommand(void* handle, unsigned int port)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.portIndicates port number from 0 to N. (N is the number of port)-1 indicates to send ToE action command over all ports.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.3 AVS\_ToESetActionCommand

<table><tr><td>Function Name</td><td>AVS_ToESetActionCommand</td></tr><tr><td>Purpose</td><td>Configures ToE action command for each port.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToESetActionCommand(void* handle, unsigned int port, unsigned long devicekey, unsigned long groupkey, unsigned long groupmask)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.portIndicates port number from 0 to N. (N is the number of port)Devicekey32-bit number of your choice, the key must be unique among all cameras in the network segment. The Devicekey on the camera should be the same on the card.GroupkeyA 32-bit number of your choice used to define a group of devices on which an action should be executed. If the action group key on the camera and the action group key in the protocol message are identical, the camera executes the corresponding action. The Groupkey on the camera should be the same on the card.GroupmaskA 32-bit number of your choice used to filter out a sub-group of cameras belonging to a group of cameras. The cameras belonging to a sub-group execute an action at the same time. The Groupmask on the camera should be the same on the card.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.4 AVS\_ToEGetActionCommand

<table><tr><td>Function Name</td><td>AVS_ToEGetActionCommand</td></tr><tr><td>Purpose</td><td>Retrieves ToE action command for each port.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEGetActionCommand(void* handle, unsigned int port, unsigned long* devicekey, unsigned long* groupkey, unsigned long* groupmask)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.portIndicates port number from 0 to N. (N is the number of port)DevicekeyRetrieves Devicekey on the card.GroupkeyRetrieves Groupkey on the card.GroupmaskRetrieves Groupmask on the card.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.5 AVS\_ToESetTriggerSource

<table><tr><td>Function Name</td><td>AVS_ToESetTriggerSource</td></tr><tr><td>Purpose</td><td>Configures ToE function source.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToESetTriggerSource(void* handle, int source)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.source0: Software trigger source1: External hardware trigger source</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.6 AVS\_ToEGetTriggerSource

<table><tr><td>Function Name</td><td>AVS_ToEGetTriggerSource</td></tr><tr><td>Purpose</td><td>Acquires ToE function source.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEGetTriggerSource(void* handle, int *source)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.source0: Software trigger source1: External hardware trigger source</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.7 AVS\_ToESetTriggerEnable

<table><tr><td>Function Name</td><td>AVS_ToESetTriggerEnable</td></tr><tr><td>Purpose</td><td>Enable ToE function.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToESetTriggerEnable(void* handle, int enable)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.enable0: Disable ToE function1: Enable ToE function</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.8 AVS\_ToEGetTriggerEnable

<table><tr><td>Function Name</td><td>AVS_ToEGetTriggerEnable</td></tr><tr><td>Purpose</td><td>Retrieves ToE function.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEGetTriggerEnable(void* handle, int *enable)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.enable0: Disable ToE function1: Enable ToE function</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.9 AVS\_ToESetTriggerActivation

<table><tr><td>Function Name</td><td>AVS_ToESetTriggerActivation</td></tr><tr><td>Purpose</td><td>Retrieves ToE function status.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToESetTriggerActivation(void* handle,AVS_EDGETRIGGER_TYPE edgetrigger)</td></tr></table>

<table><tr><td>Parameter(s)</td></tr><tr><td>handleAcquired from the return value of AVS_GetProductHandle.edgetriggerSet the edge trigger mode AVS_EDGETRIGGER_TYPE, Please refer to following table.</td></tr><tr><td>Return Code</td></tr><tr><td>No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

<table><tr><td>String Identifier</td><td>Parameter</td></tr><tr><td>AVS_EDGETRIGGER_RISINGEDGE</td><td>Signal rising edge trigger</td></tr><tr><td>AVS_EDGETRIGGER_FALLINGEDGE</td><td>Signal falling edge trigger</td></tr><tr><td>AVS_EDGETRIGGER_CHANGINGEDGE</td><td>Signal changing edge trigger</td></tr></table>

# 3.2.5.10 AVS\_ToEGetTriggerActivation

<table><tr><td>Function Name</td><td>AVS_ToEGetTriggerActivation</td></tr><tr><td>Purpose</td><td>Acquires ToE trigger activation mode of ToE, specifying that the source trigger is considered valid on the rising or falling edge.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEGetTriggerActivation (void* handle, AVS_EDGETRIGGER_TYPE* edgetrigger)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.edgetriggerPlease refer to following table.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

<table><tr><td>String Identifier</td><td>Parameter</td></tr><tr><td>AVS_EDGETRIGGER_RISINGEDGE</td><td>Signal rising edge trigger</td></tr><tr><td>AVS_EDGETRIGGER_FALLINGEDGE</td><td>Signal falling edge trigger</td></tr><tr><td>AVS_EDGETRIGGER_CHANGINGEDGE</td><td>Signal changing edge trigger</td></tr></table>

3.2.5.11 AVS\_ToESetOneTriggerAllMode

<table><tr><td>Function Name</td><td>AVS_ToESetOneTriggerAllMode</td></tr><tr><td>Purpose</td><td>Sets ToE trigger mode, where 4 to 4 mode indicates that each pin of the DI performs corresponding port action command to active, and 1 to 4 mode indicates that DI_0 performs all port action commands to active.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToESetOneTriggerAllMode(void* handle, int *enable)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.enable0: N to N mode (N is the number of port)1: 1 to N mode (N is the number of port)</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.12 AVS\_ToEGetOneTriggerAllMode

<table><tr><td>Function Name</td><td>AVS_ToEGetOneTriggerAllMode</td></tr><tr><td>Purpose</td><td>Acquires ToE trigger mode, where 4 to 4 mode indicates that each pin of the DI performs corresponding port action command to active, and 1 to 4 mode indicates that DI_0 performs all port action commands to active.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToESetOneTriggerAllMode(void* handle, int *enable)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.enable0: N to N mode (N is the number of port)1: 1 to N mode (N is the number of port)</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.13 AVS\_ToESetExTriggerDebounce

<table><tr><td>Function Name</td><td>AVS_ToESetExTriggerDebounce</td></tr><tr><td>Purpose</td><td>Sets trigger de-bounce time for filtering the external trigger.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToESetExTriggerDebounce(void* handle, unsigned long debounce)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.debounceSet the debounce time, input range: 0x0 ~ 0xFFFFFFF.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.14 AVS\_ToEGetExTriggerDebounce

<table><tr><td>Function Name</td><td>AVS_ToEGetExTriggerDebounce</td></tr><tr><td>Purpose</td><td>Acquires trigger de-bounce time for filtering the external trigger.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEGetExTriggerDebounce(void* handle, unsigned long* debounce)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.debounceThe debounce time, range: 0x0 ~ 0xFFFFFFF.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.15 AVS\_ToEGetExTriggerDebounceUnit

<table><tr><td>Function Name</td><td>AVS_ToEGetExTriggerDebounceUnit</td></tr><tr><td>Purpose</td><td>Acquires trigger de-bounce unit in nano second.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEGetExTriggerDebounceUnit(void* handle, unsigned long* nanosec)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.nanosecTime in nano second.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.16 AVS\_ToEGetTriggerCount

<table><tr><td>Function Name</td><td>AVS_ToEGetTriggerCount</td></tr><tr><td>Purpose</td><td>Acquires trigger count, directing 16-bit counter to count triggers originating from hardware or software and ToE commands sent from the card.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEGetTriggerCount(void* handle, unsigned int port, unsigned int* triggerincount, unsigned int* triggeroutcount)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.portIndicates port number from 0 to N. (N is the number of port)triggerincountNumber of triggers from hardware trigger or software trigger (Valid value: 0 to 65535)triggeroutcountNumber of action commands from the card (Valid value: 0 to 65535)</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>

3.2.5.17 AVS\_ToEResetTriggerCount

<table><tr><td>Function Name</td><td>AVS_ToEResetTriggerCount</td></tr><tr><td>Purpose</td><td>Resets trigger count, with trigger counters reset to 0.</td></tr><tr><td>Category</td><td>Trigger over Ethernet</td></tr><tr><td>Header File</td><td>ToE.h</td></tr><tr><td>Syntax (C/C++)</td><td>int AVS_ToEResetTriggerCount (void* handle)</td></tr><tr><td colspan="2">Parameter(s)</td></tr><tr><td colspan="2">handleAcquired from the return value of AVS_GetProductHandle.</td></tr><tr><td colspan="2">Return Code</td></tr><tr><td colspan="2">No error occurs if the return value &gt;= 0, and if a negative value, please refer to Section 2 for more information about return codes.</td></tr></table>
[🔗 Link to the original document](.adlink-avs-flr-v1-0-20211012/adlink-avs-flr-v1-0-20211012.pdf)
