22. High-level API Reference
www.yoctopuce.com
147
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
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.
Summary of Contents for Yocto-Display
Page 1: ...Yocto Display User Manual...
Page 2: ......
Page 40: ...34 www yoctopuce com...
Page 52: ...46 www yoctopuce com...
Page 84: ...78 www yoctopuce com...
Page 92: ...86 www yoctopuce com...
Page 130: ...124 www yoctopuce com...
Page 422: ...416 www yoctopuce com...