22. High-level API Reference
134
www.yoctopuce.com
22.1. General functions
These general functions should be used to initialize and configure the Yoctopuce library. In most cases,
a simple call to function
yRegisterHub()
should be enough. The module-specific functions
yFind...()
or
yFirst...()
should then be used to retrieve an object that provides interaction
with the module.
In order to use the functions described here, you should include:
js
<script type='text/javascript' src='yocto_api.js'></script>
cpp
#include "yocto_api.h"
m
#import "yocto_api.h"
pas
uses yocto_api;
vb
yocto_api.vb
cs
yocto_api.cs
java
import com.yoctopuce.YoctoAPI.YModule;
uwp
import com.yoctopuce.YoctoAPI.YModule;
py
from yocto_api import *
php
require_once('yocto_api.php');
es
in HTML: <script src="../../lib/yocto_api.js"></script>
in node.js: require('yoctolib-es2017/yocto_api.js');
Global functions
yCheckLogicalName(
name
)
Checks if a given string is valid as logical name for a module or a function.
yClearHTTPCallbackCacheDir(
bool_removeFiles
)
Disables the HTTP callback cache.
yDisableExceptions()
Disables the use of exceptions to report runtime errors.
yEnableExceptions()
Re-enables the use of exceptions for runtime error handling.
yEnableUSBHost(
osContext
)
This function is used only on Android.
yFreeAPI()
Frees dynamically allocated memory blocks used by the Yoctopuce library.
yGetAPIVersion()
Returns the version identifier for the Yoctopuce library in use.
yGetCacheValidity()
Returns the validity period of the data loaded by the library.
yGetDeviceListValidity()
Returns the time between each forced enumeration of the YoctoHub used.
yGetTickCount()
Returns the current value of a monotone millisecond-based time counter.
yHandleEvents(
errmsg
)
Maintains the device-to-library communication channel.
yInitAPI(
mode
,
errmsg
)
Initializes the Yoctopuce programming library explicitly.
yPreregisterHub(
url
,
errmsg
)
Содержание 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...