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.
Содержание Yocto-Display
Страница 1: ...Yocto Display User Manual...
Страница 2: ......
Страница 40: ...34 www yoctopuce com...
Страница 52: ...46 www yoctopuce com...
Страница 84: ...78 www yoctopuce com...
Страница 92: ...86 www yoctopuce com...
Страница 130: ...124 www yoctopuce com...
Страница 158: ...22 High level API Reference 152 www yoctopuce com On failure throws an exception or returns a negative error code...
Страница 422: ...416 www yoctopuce com...
Страница 424: ...24 Characteristics 418 www yoctopuce com...