22. High-level API Reference
www.yoctopuce.com
169
22.2. Module control interface
This interface is identical for all Yoctopuce USB modules. It can be used to control the module global
parameters, and to enumerate the functions provided by each 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
yFindModule(
func
)
Allows you to find a module from its serial number or from its logical name.
yFindModuleInContext(
yctx
,
func
)
Retrieves a module for a given identifier in a YAPI context.
yFirstModule()
Starts the enumeration of modules currently accessible.
YModule
methods
module
→
checkFirmware(
path
,
onlynew
)
Tests whether the byn file is valid for this module.
module
→
clearCache()
Invalidates the cache.
module
→
describe()
Returns a descriptive text that identifies the module.
module
→
download(
pathname
)
Downloads the specified built-in file and returns a binary buffer with its content.
module
→
functionBaseType(
functionIndex
)
Retrieves the base type of the nth function on the module.
module
→
functionCount()
Returns the number of functions (beside the "module" interface) available on the module.
module
→
functionId(
functionIndex
)
Retrieves the hardware identifier of the nth function on the module.
module
→
functionName(
functionIndex
)
Retrieves the logical name of the nth function on the module.
module
→
functionType(
functionIndex
)
Retrieves the type of the nth function on the module.
module
→
functionValue(
functionIndex
)
Retrieves the advertised value of the nth function on the module.
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...