21. High-level API Reference
YAPI
YAPI.InitAPI()
yInitAPI()
Initializes the Yoctopuce programming library explicitly.
js
function yInitAPI(
mode
,
errmsg
)
cpp
YRETCODE yInitAPI( int
mode
, string&
errmsg
)
m
+(YRETCODE) InitAPI :(int)
mode
:(NSError**)
errmsg
pas
function yInitAPI(
mode
: integer, var
errmsg
: string): integer
vb
function yInitAPI( ByVal
mode
As Integer, ByRef
errmsg
As String) As Integer
cs
int InitAPI( int
mode
, ref string
errmsg
)
java
int InitAPI( int
mode
)
uwp
async Task<int> InitAPI( int
mode
)
py
def InitAPI(
mode
,
errmsg
=None)
php
function yInitAPI(
$mode
,
&$errmsg
)
es
function InitAPI(
mode
,
errmsg
)
It is not strictly needed to call
yInitAPI()
, as the library is automatically initialized when calling
yRegisterHub()
for the first time.
When
Y_DETECT_NONE
is used as detection
mode
, you must explicitly use
yRegisterHub()
to
point the API to the VirtualHub on which your devices are connected before trying to access them.
Parameters :
mode
an integer corresponding to the type of automatic device detection to use. Possible values are
Y_DETECT_NONE
,
Y_DETECT_USB
,
Y_DETECT_NET
, and
Y_DETECT_ALL
.
errmsg
a string passed by reference to receive any error message.
Returns :
YAPI_SUCCESS
when the call succeeds.
On failure, throws an exception or returns a negative error code.
www.yoctopuce.com
147
Содержание Yocto-RangeFinder
Страница 1: ...Yocto RangeFinder User s guide...
Страница 2: ......
Страница 18: ...12 www yoctopuce com...
Страница 26: ...20 www yoctopuce com...
Страница 42: ...36 www yoctopuce com...
Страница 70: ...gcc lyocto lm lpthread lusb 1 0 lstdc 10 Using Yocto RangeFinder with C 64 www yoctopuce com...
Страница 90: ...84 www yoctopuce com...
Страница 120: ...114 www yoctopuce com...
Страница 130: ...124 www yoctopuce com...
Страница 158: ...21 High level API Reference On failure throws an exception or returns a negative error code 152 www yoctopuce com...
Страница 484: ...478 www yoctopuce com...
Страница 488: ...482 www yoctopuce com...
Страница 490: ...23 Characteristics 484 www yoctopuce com...
Страница 491: ......
Страница 492: ......