20. High-level API Reference
20.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>
nodejs
var yoctolib = require('yoctolib');
var YAPI = yoctolib.YAPI;
var YModule = yoctolib.YModule;
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
name
)
Checks if a given string is valid as logical name for a module or a function.
Disables the use of exceptions to report runtime errors.
Re-enables the use of exceptions for runtime error handling.
osContext
)
This function is used only on Android.
yFreeAPI()
Frees dynamically allocated memory blocks used by the Yoctopuce library.
Returns the version identifier for the Yoctopuce library in use.
Returns the current value of a monotone millisecond-based time counter.
errmsg
)
Maintains the device-to-library communication channel.
mode
,
errmsg
)
Initializes the Yoctopuce programming library explicitly.
url
,
errmsg
)
Fault-tolerant alternative to RegisterHub().
yRegisterDeviceArrivalCallback(
arrivalCallback
)
Register a callback function, to be called each time a device is plugged.
yRegisterDeviceRemovalCallback(
removalCallback
)
Register a callback function, to be called each time a device is unplugged.
138
www.yoctopuce.com
Summary of Contents for Yocto-GPS
Page 1: ...Yocto GPS User s guide...
Page 2: ......
Page 6: ...22 Characteristics 557 Blueprint 559 Index 561...
Page 10: ...4 www yoctopuce com...
Page 14: ...8 www yoctopuce com...
Page 18: ...12 www yoctopuce com...
Page 22: ...16 www yoctopuce com...
Page 38: ...32 www yoctopuce com...
Page 42: ...36 www yoctopuce com...
Page 54: ...48 www yoctopuce com...
Page 72: ...66 www yoctopuce com...
Page 92: ...86 www yoctopuce com...
Page 122: ...116 www yoctopuce com...
Page 132: ...126 www yoctopuce com...
Page 564: ...22 Characteristics 558 www yoctopuce com...
Page 565: ......
Page 566: ......