background image

19. Using the Yocto-Display with Android

To  tell  the  truth,  Android  is  not  a  programming  language,  it  is  an  operating  system  developed  by 
Google  for  mobile  appliances  such  as  smart  phones  and  tablets.  But  it  so  happens  that  under 
Android  everything  is  programmed  with  the  same  programming  language:  Java.  Nevertheless,  the 
programming  paradigms  and  the  possibilities  to  access  the  hardware  are  slightly  different  from 
classical Java, and this justifies a separate chapter on Android programming.

19.1. Native access and VirtualHub

In the opposite to the classical Java API, the Java for Android API can access USB modules natively. 
However,  as  there  is  no  VirtualHub  running  under  Android,  it  is  not  possible  to  remotely  control 
Yoctopuce  modules  connected  to  a  machine  under  Android.  Naturally,  the  Java  for  Android  API 
remains perfectly able to connect itself to a VirtualHub running on another OS.

19.2. Getting ready

Go to the Yoctopuce web site and download the Java for Android programming library

1

. The library is 

available as source files, and also as a jar file. Connect your modules, decompress the library files in 
the directory of your choice, and configure your Android programming environment so that it can find 
them.

To  keep  them  simple,  all  the  examples  provided  in  this  documentation  are  snippets  of  Android 
applications.  You  must  integrate  them  in  your  own  Android  applications  to  make  them  work. 
However,  your  can  find  complete  applications  in  the  examples  provided  with  the  Java  for  Android 
library.

19.3. Compatibility

In an ideal world, you would only need to have a smart phone running under Android to be able to 
make Yoctopuce modules work. Unfortunately, it is not quite so in the real world. A machine running 
under  Android  must  fulfil  to  a  few  requirements  to  be  able  to  manage  Yoctopuce  USB  modules 
natively.

www.yoctopuce.com/EN/libraries.php

www.yoctopuce.com

113

Summary of Contents for Yocto-Display

Page 1: ...Yocto Display User Manual...

Page 2: ......

Page 3: ...sor and memory 7 3 2 Orientation 7 3 3 Layer system 7 3 4 Graphic routines 8 3 5 Text display 9 3 6 Font file format 10 3 7 Sequences and animations 11 3 8 Optimizations 11 4 The embedded file system...

Page 4: ...rol of the Display function 38 9 4 Control of the module part 42 9 5 Error handling 44 10 Using Yocto Display with PHP 47 10 1 Getting ready 47 10 2 Control of the Display function 47 10 3 Control of...

Page 5: ...y with Python 101 17 1 Source files 101 17 2 Dynamic library 101 17 3 Control of the Display function 101 17 4 Control of the module part 104 17 5 Error handling 105 18 Using the Yocto Display with Ja...

Page 6: ...ce 324 22 6 Files function interface 372 23 Troubleshooting 413 23 1 Where to start 413 23 2 Programming examples don t seem to work 413 23 3 Linux and USB 413 23 4 ARM Platforms HF and EL 414 23 5 Po...

Page 7: ...or for similar applications in domestic and commercial environments In order to use it you must at least install it in a protective enclosure and connect it to a host computer Yoctopuce thanks you fo...

Page 8: ...ocess control equipment and similar applications in residential or commercial environment If you intend to use the Yocto Display for another kind of application you should check the safety regulations...

Page 9: ...out if the USB plug acts as a lever In this case if the tracks stayed in position the connector can be soldered back with a good iron and using flux to avoid bridges Alternatively you can solder a USB...

Page 10: ...USB bus being quite critical this functionality can be of great help You can only view the current consumption of a module by software Serial number Each Yocto module has a unique serial number assign...

Page 11: ...nels You can do this very easily thanks to the configuration interface You do not need to perform a calibration if you use only simple switches or push buttons Test push buttons Each channel has its o...

Page 12: ...hub and the male connector on the Yocto Display You can also use a small 4 wires cable with a 1 27mm connector 1 25mm works as well it does not make a difference for 4 pins This makes it possible to...

Page 13: ...lp you store some graphics fonts and other animations 3 2 Orientation To facilitate its hardware installation your Yocto Display can work in four distinct orientations You only need to set a single pa...

Page 14: ...ntains basic graphic routines lines rectangles circles discs text display etc All these routines support clipping you can write on top of a layer border the part located in the zone managed is taken i...

Page 15: ...from the decimal point the base line etc The alignment options Primitives allowing you to display text are selectFont drawText Fonts built in into the device firmware are Small yfm height 8 pixels Me...

Page 16: ...care to provide to the API a string that is compatible with the character set used in your display The most common pitfall is to use an UTF 8 encoded string because this is the most common format use...

Page 17: ...the Yocto Display file system You can play it back at will with playSequence You can create loops by calling playSequence within a sequence You can find in the libraries a code sample3 illustrating h...

Page 18: ...and once the image is complete the two layers are switched In the libraries you can find an example4 using this technique to animate a Von Koch flake Using a bitmap When the graphics become complex i...

Page 19: ...resent on the module remove erases a file from the module format resets the file system to an empty not fragmented state A piece of software using a well designed file system should always start by ma...

Page 20: ...new file with the same name but not necessarily if you create files with a distinct name each time For this reason it is not recommended to automatically create files with ever changing names You can...

Page 21: ...ndows 8 and Windows 10 Both 32 bit and 64 bit versions are supported The programming library is also available for the Universal Windows Platform UWP which is supported by all flavors of Windows 10 in...

Page 22: ...ot be prepared to face unstable behaviors and unpredictable failures You can find more details on this topic in the chapter about assembly and connections 5 2 Testing USB connectivity At this point yo...

Page 23: ...ing the Yocto button of the module 5 4 Test of the module The first item to check is that your module is working well click on the serial number corresponding to your module This displays a window sum...

Page 24: ...logical name to two modules connected to the same computer and you try to access one of them through this logical name behavior is undetermined you have no way of knowing which of the two modules answ...

Page 25: ...screws The screw head diameter must not be larger than 8mm or they will damage the module circuits Make sure that the lower surface of the module is not in contact with the support We recommend using...

Page 26: ...connect peripherals requiring more than 100mA behind a bus powered hub In order to help you controlling and planning overall power consumption for your project all Yoctopuce modules include a built i...

Page 27: ...ng it is unlikely that this will be a hinderance for using Yoctopuce products Note that you will never need to allocate or deallocate an object linked to the Yoctopuce API it is automatically managed...

Page 28: ...sic enumeration functions FirstXxx and nextXxxx available for each YXxx class Access by hardware name Each module function has a hardware name assigned at the factory and which cannot be modified The...

Page 29: ...ductId Hexadecimal number read only productRelease Hexadecimal number read only firmwareRelease String read only persistentSettings Enumerated modifiable luminosity 0 100 modifiable beacon On Off modi...

Page 30: ...string containing the logical name of the module initially empty This attribute can be modified at will by the user Once initialized to an non empty value it can be used to access a given module If t...

Page 31: ...y directly If two displays with the same logical name are used in the same project there is no way to determine which one answers when one tries accessing by logical name The logical name is limited t...

Page 32: ...name is limited to 19 characters among A Z a z 0 9 _ and advertisedValue Short character string summarizing the current state of the analog input that is be automatically advertised up to the parent h...

Page 33: ...o open The time reference is the same as the upTime attribute i e the elapsed time since the module was turned on If you substract from this value the lastTimePressed value you can get the duration of...

Page 34: ...pplication uses the native library to control the locally connected module Native control by DLL Here the main part of the code controlling the modules is located in a DLL The software is compiled wit...

Page 35: ...cess to the module The service control method comes with a non negligible advantage the application does not need to run on the machine on which the modules are connected The application can very well...

Page 36: ...all 7 8 Programming where to start At this point of the user s guide you should know the main theoretical points of your Yocto Display It is now time to practice You must download the Yoctopuce librar...

Page 37: ...only need to connect your Yocto Display open a shell and start working by typing for example C YDisplay any layer 0 drawText 64 32 CENTER Hello world To use the command API on Linux you need either ha...

Page 38: ...m having to know the exact names of your function and of your module But you can use logical names as well as long as you have configured them beforehand Let us imagine a Yocto Display module with the...

Page 39: ...imited When this limit is reached nothing guaranties that the saving process is performed correctly This limit linked to the technology employed by the module micro processor is located at about 10000...

Page 40: ...34 www yoctopuce com...

Page 41: ...o transpilation is needed no Babel no jspm just plain Javascript Here is your favorite engines minimum version needed to run this code All of them are officially released at the time we write this doc...

Page 42: ...ut breaking the code flow It is almost like multi threaded execution except that control switch between pending tasks only happens at places where the await keyword appears We have therefore chosen to...

Page 43: ...simply use npm instal g babel cli npm instal babel preset env You would typically ask Babel to put the transpiled files in another directory named compat for instance Your files and all files of the...

Page 44: ...ous function calls For instance instead of writing async function logInfo module console log Name await module get_logicalName console log Beacon await module get_beacon logInfo myModule you can use f...

Page 45: ...long as MyFunction is defined only once display YDisplay FindDisplay YD128X32 123456 display display YDisplay FindDisplay YD128X32 123456 MaFonction display YDisplay FindDisplay MonModule display disp...

Page 46: ...lay size w await disp get_displayWidth h await disp get_displayHeight reteive the first layer let l0 await disp get_displayLayer 0 display a text in the middle of the screen await l0 drawText w 2 h 2...

Page 47: ...script script src lib yocto_display js script script var disp l1 var h w y x vx vy async function startDemo await YAPI LogUnhandledPromiseRejections await YAPI DisableExceptions Setup the API to use...

Page 48: ...lor red border none id msg span br body html No installation is needed to run this example all you have to do is open the HTML file using a web browser 9 4 Control of the module part Each module can b...

Page 49: ...s modification is performed only in the random access memory RAM of the module if the module is restarted the modifications are lost To memorize them persistently it is necessary to ask the module to...

Page 50: ...function startDemo await YAPI LogUnhandledPromiseRejections await YAPI DisableExceptions Setup the API to use the VirtualHub on local machine let errmsg new YErrorMsg if await YAPI RegisterHub 127 0...

Page 51: ...library offers another possibility for error handling allowing you to create a robust program without needing to catch exceptions at every line of code You simply need to call the YAPI DisableExceptio...

Page 52: ...46 www yoctopuce com...

Page 53: ...preferably locally on you machine If you wish to use the PHP server of your internet provider it is possible but you will probably need to configure your ADSL router for it to accept and forward TCP...

Page 54: ...123456 which you have named MyModule and for which you have given the display function the name MyFunction The following five calls are strictly equivalent as long as MyFunction is defined only once...

Page 55: ...e serial value serial br disp resetAll retreive the display size w disp get_displayWidth h disp get_displayHeight reteive the first layer l0 disp get_displayLayer 0 l0 clear display a text in the midd...

Page 56: ...r else printf input type radio name beacon value ON ON printf input type radio name beacon value OFF checked OFF br printf upTime s sec br intVal module get_upTime 1000 printf USB current smA br modul...

Page 57: ...e get_logicalName print New name input name newname value maxlength 19 br yFreeAPI input type submit FORM BODY HTML Warning the number of write cycles of the nonvolatile memory of the module is limite...

Page 58: ...internal extensions can call each other and call the outside but seen from the outside there is only one official phone number that of the switchboard itself You cannot reach the internal extensions f...

Page 59: ...e NAT configuration of the DSL router The issue of this solution is that it exposes the home automation server to external attacks The HTTP callback API solves this issue without having to modify the...

Page 60: ...allbacks section Click on the configure button on the first line Click on the edit button of the Outgoing callbacks section And select Yocto API callback You then only need to define the URL of the PH...

Page 61: ...ata from a POST HTTP In this case place the PHP script in a subdirectory Limitations This method that allows you to go through NAT filters cheaply has nevertheless a price Communications being initiat...

Page 62: ...lly replaced by specific return values which can be tested by the caller when necessary For each function the name of each return value in case of error is systematically documented in the library ref...

Page 63: ...ure the simplest possible interaction from C The library is naturally also available as binary files so that you can link it directly if you prefer You will soon notice that the C API defines many fun...

Page 64: ...s are strictly equivalent as long as MyFunction is defined only once YDisplay display yFindDisplay YD128X32 123456 display YDisplay display yFindDisplay YD128X32 123456 MyFunction YDisplay display yFi...

Page 65: ...disp NULL cout No module connected check USB cable endl usage return 1 else disp yFindDisplay target display if disp isOnline cout Module is offline check USB cable endl usage return 1 disp resetAll r...

Page 66: ...ge const char exe cout usage exe serial or logical name ON OFF endl exit 1 int main int argc const char argv string errmsg Setup the API to use local USB devices if yRegisterHub usb errmsg YAPI_SUCCES...

Page 67: ...manent memory To do so use the saveToFlash method Inversely it is possible to force the module to forget its current settings by using the revertFromFlash method The short example below allows you to...

Page 68: ...here will be a time when a user will have unplugged the device either before running the software or even while the software is running The Yoctopuce library is designed to help you support this kind...

Page 69: ...ts in several distinct manners This section explains how to implement the different options Integration in source format Integrating all the sources of the library into your projects has several advan...

Page 70: ...possibly update this library if a patch reveals itself necessary without needing to recompile the source code of the application On the other hand it is an integration mode which systematically requi...

Page 71: ...ive C API defines many functions which return objects You do not need to deallocate these objects yourself the API does it automatically at the end of the application In order to keep them simple all...

Page 72: ...size w disp get_displayWidth h disp get_displayHeight reteive the first layer l0 disp get_displayLayer 0 display a text in the middle of the screen l0 drawText w 2 h 2 Y_ALIGN_CENTER Hello world visua...

Page 73: ...calls are strictly equivalent as long as MyFunction is defined only once YDisplay display Display FindDisplay YD128X32 123456 display YDisplay display Display FindDisplay YD128X32 123456 MyFunction YD...

Page 74: ...set_xxx method For more details regarding the used functions refer to the API chapters Changing the module settings When you want to modify the settings of a module you only need to call the correspo...

Page 75: ...odules Obtaining the list of the connected modules is performed with the yFirstModule function which returns the first module found Then you only need to call the nextModule function of this object to...

Page 76: ...gram crash bang As this latest situation is not the most desirable the Yoctopuce library offers another possibility for error handling allowing you to create a robust program without needing to catch...

Page 77: ...with the modules3 The source files in Visual Basic manage the high level part of the API Therefore your need both this DLL and the vb files of the sources directory to create a project managing Yoctop...

Page 78: ...the computer running the library If the initialization does not succeed this function returns a value different from YAPI_SUCCESS and errmsg contains the error message yFindDisplay The yFindDisplay f...

Page 79: ...vx vy As Integer If argv Length 1 Then Usage target argv 1 REM Setup the API to use local USB devices If yRegisterHub usb errmsg YAPI_SUCCESS Then Console WriteLine RegisterHub error errmsg End End If...

Page 80: ...orts System IO Imports System Environment Module Module1 Sub usage Console WriteLine usage demo serial or logical name ON OFF End End Sub Sub Main Dim argv As String System Environment GetCommandLineA...

Page 81: ...d The short example below allows you to modify the logical name of a module Module Module1 Sub usage Console WriteLine usage demo serial or logical name new logical name End End Sub Sub Main Dim argv...

Page 82: ...the isOnline function and then hope that it will stay so during the fraction of a second necessary for the following code lines to run This method is not perfect but it can be sufficient in some case...

Page 83: ...e returned value In the case of functions which do not normally return information the return value is YAPI_SUCCESS if everything went well and a different error code in case of failure When you work...

Page 84: ...78 www yoctopuce com...

Page 85: ...ave to recreate the projects structure from scratch 14 2 Using the Yoctopuce API in a Visual C project The Visual C NET Yoctopuce library is composed of a DLL and of source files in Visual C The DLL i...

Page 86: ...look at these lines in more details YAPI RegisterHub The YAPI RegisterHub function initializes the Yoctopuce API and indicates where the modules should be looked for When used with the parameter usb...

Page 87: ..._number Console WriteLine execname logical_name Console WriteLine execname any System Threading Thread Sleep 2500 Environment Exit 0 static void Main string args string errmsg string target YDisplay d...

Page 88: ...I FreeAPI 14 4 Control of the module part Each module can be controlled in a similar manner you can find below a simple sample program displaying the main parameters of the module and enabling you to...

Page 89: ...ns refer to the API chapters Changing the module settings When you want to modify the settings of a module you only need to call the corresponding YModule set_xxx function However this modification is...

Page 90: ...t 100000 cycles In short you can use the YModule saveToFlash function only 100000 times in the life of the module Make sure you do not call this function within a loop Listing the modules Obtaining th...

Page 91: ...de you can relatively easily determine where the problem happened and view the explanatory message linked to the exception Otherwise the exception makes your program crash bang As this latest situatio...

Page 92: ...86 www yoctopuce com...

Page 93: ...architecture Thanks to this library you can use UWP on all the Windows 10 versions including Windows 10 IoT Core However using the new UWP API has some consequences the Windows Runtime API to access...

Page 94: ...actually a drop down menu In the first case Visual Studio copies the selected files into your project In the second case Visual Studio simply creates a link to the original files We recommend to use...

Page 95: ...You can use logical names as well as long as you have initialized them Let us imagine a Yocto Display module with serial number YD128X32 123456 which you have named MyModule and for which you have gi...

Page 96: ...terHub HubURL YDisplay disp YDisplayLayer l0 l1 int h w y x vx vy find the display according to command line parameters if Target ToLower any disp YDisplay FirstDisplay if disp null WriteLine No modul...

Page 97: ...ostics using System Threading Tasks using Windows UI Xaml Controls using com yoctopuce YoctoAPI namespace Demo public class Demo DemoBase public string HubURL get set public string Target get set publ...

Page 98: ...ent settings by using the YModule revertFromFlash method The short example below allows you to modify the logical name of a module using System using System Diagnostics using System Threading Tasks us...

Page 99: ...annot disregard error handling Inevitably there will be a time when a user will have unplugged the device either before running the software or even while the software is running The Yoctopuce library...

Page 100: ...I_Exception ex Debug WriteLine Exception from Yoctopuce lib ex Message catch Exception ex Debug WriteLine Other exceptions ex Message 15 Using the Yocto Display with Universal Windows Platform 94 www...

Page 101: ...o the Yoctopuce web site and download the Yoctopuce Delphi libraries3 Uncompress everything in a directory of your choice add the subdirectory sources in the list of directories of Delphi libraries 4...

Page 102: ...it is online if not disp isOnline then begin writeln No module connected check USB cable halt end display clean up disp resetAll retreive the display size w disp get_displayWidth h disp get_displayHe...

Page 103: ...ve initialized them Let us imagine a Yocto Display module with serial number YD128X32 123456 which you have named MyModule and for which you have given the display function the name MyFunction The fol...

Page 104: ...dModule serial refresh module repeat read c case c of r refresh module b beacon module Y_BEACON_ON beacon module Y_BEACON_OFF end until c x yFreeAPI end Each property xxx of the module can be read tha...

Page 105: ...ached nothing guaranties that the saving process is performed correctly This limit linked to the technology employed by the module micro processor is located at about 100000 cycles In short you can us...

Page 106: ...verything goes well If your program is running in debug mode you can relatively easily determine where the problem happened and view the explanatory message linked to the exception Otherwise the excep...

Page 107: ...ry A section of the low level library is written in C but you should not need to interact directly with it it is provided as a DLL under Windows as a so files under UNIX and as a dylib file under Mac...

Page 108: ...unction The following five calls are strictly equivalent as long as MyFunction is defined only once display YDisplay FindDisplay YD128X32 123456 display display YDisplay FindDisplay YD128X32 123456 My...

Page 109: ...ean up disp resetAll retreive the display size w disp get_displayWidth h disp get_displayHeight retreive the first layer l0 disp get_displayLayer 0 l0 clear display a text in the middle of the screen...

Page 110: ...sec print USB current str m get_usbCurrent mA print logs n m get_lastLogs else print sys argv 1 not connected check identification and USB cable YAPI FreeAPI Each property xxx of the module can be re...

Page 111: ...modules Obtaining the list of the connected modules is performed with the YModule yFirstModule function which returns the first module found Then you only need to call the nextModule function of this...

Page 112: ...uce library offers another possibility for error handling allowing you to create a robust program without needing to catch exceptions at every line of code You simply need to call the YAPI DisableExce...

Page 113: ...ss the library files in a folder of your choice connect your modules run the VirtualHub software and you are ready to start your first tests You do not need to install any driver In order to keep them...

Page 114: ...t which you can then use at will to control the display isOnline The isOnline method of the object returned by YDisplay FindDisplay allows you to know if the corresponding module is present and in wor...

Page 115: ...display size w disp get_displayWidth h disp get_displayHeight reteive the first layer l0 disp get_displayLayer 0 display a text in the middle of the screen l0 drawText w 2 h 2 YDisplayLayer ALIGN CEN...

Page 116: ...println usage demo serial or logical name ON OFF YModule module if args length 0 module YModule FirstModule if module null System out println No module connected check USB cable System exit 1 else mo...

Page 117: ...API to use local VirtualHub YAPI RegisterHub 127 0 0 1 catch YAPI_Exception ex System out println Cannot contact VirtualHub on 127 0 0 1 ex getLocalizedMessage System out println Ensure that the Virtu...

Page 118: ...4 Error handling When you implement a program which must interact with USB modules you cannot disregard error handling Inevitably there will be a time when a user will have unplugged the device either...

Page 119: ...connect itself to a VirtualHub running on another OS 19 2 Getting ready Go to the Yoctopuce web site and download the Java for Android programming library1 The library is available as source files and...

Page 120: ...roid machine works with Yoctopuce modules consists in trying Supported hardware The library is tested and validated on the following machines Samsung Galaxy S3 Samsung Galaxy Note 2 Google Nexus 5 Goo...

Page 121: ...CHED in the section intent filter of the main activity The section activity must have a pointer to an XML file containing the list of USB modules which can run the application manifest xmlns android h...

Page 122: ...lization does not succeed an exception is thrown YDisplay FindDisplay The YDisplay FindDisplay function allows you to find a display from the serial number of the module on which it resides and from i...

Page 123: ...ments OnItemSelectedListener private YDisplay display null private ArrayAdapter String aa Override public void onCreate Bundle savedInstanceState super onCreate savedInstanceState setContentView R lay...

Page 124: ...neTo w 1 0 l0 lineTo w 6 0 catch YAPI_Exception e e printStackTrace 19 6 Control of the module part Each module can be controlled in a similar manner you can find below a simple sample program display...

Page 125: ...onStop YAPI FreeAPI private void DisplayModuleInfo TextView field if module null return try field TextView findViewById R id serialfield field setText module getSerialNumber field TextView findViewByI...

Page 126: ...uration in its permanent memory To do so use the YModule saveToFlash method Inversely it is possible to force the module to forget its current settings by using the YModule revertFromFlash method The...

Page 127: ...viceList fixme field TextView findViewById R id logicalnamefield field setText module getLogicalName catch YAPI_Exception e e printStackTrace Override public void onItemSelected AdapterView parent Vie...

Page 128: ...app Activity import android os Bundle import android util TypedValue import android view View import android widget LinearLayout import android widget TextView import com yoctopuce YoctoAPI YAPI impor...

Page 129: ...he problem is the one used in the short examples provided in this chapter before accessing a module check that it is online with the isOnline function and then hope that it will stay so during the fra...

Page 130: ...124 www yoctopuce com...

Page 131: ...model This technique consists in asking the API to signal by itself the important changes as soon as they are detected Each time a key parameter is modified the API calls a callback function which you...

Page 132: ...tion is running You only need to call UpdateDeviceList at regular intervals from a timer or from a specific thread to precisely control when the calls to these callbacks happen waiting loop managing c...

Page 133: ...call the executable must initialize its own API and make an inventory of USB connected modules This requires about one second per call 21 2 VirtualHub and HTTP GET The VirtualHub is available on almos...

Page 134: ...4444 bySerial YD128X32 12345 api module luminosity 100 Driving the module functions through the REST interface The module functions can be manipulated in the same way To know the state of the display...

Page 135: ...connected Yoctopuce modules It must be called at least once To manage hot plug and detect potential newly connected modules this function must be called at regular intervals The forceupdate parameter...

Page 136: ...the module luminosity if yapiHTTPRequest serial getValue data sizeof dataBuffer fullsize errmsg 0 then begin writeln errmsg halt end searches for the HTTP header end p pos 13 10 13 10 data displays t...

Page 137: ...sage Here is a sample program written in pascal using the yapi dll DLL to list the connected modules device description structure type yDeviceSt packed record vendorid word deviceid word devrelease wo...

Page 138: ...and one Visual Basic 6 compatible version prefixed with vb6_ 21 4 Porting the high level library As all the sources of the Yoctopuce API are fully provided you can very well port the whole API in the...

Page 139: ...fine the function interfaces For languages which support exceptions all of these functions throw exceptions in case of error by default rather than returning the documented error value for each functi...

Page 140: ...s 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 yDis...

Page 141: ...d of the data loaded by the library ySetDelegate object Objective C only Register an object that must follow the protocol YDeviceHotPlug ySetDeviceListValidity deviceListValidity Change the time betwe...

Page 142: ...n yCheckLogicalName ByVal name As String As Boolean cs bool CheckLogicalName string name java boolean CheckLogicalName String name uwp bool CheckLogicalName string name py def CheckLogicalName name ph...

Page 143: ...arHTTPCallbackCacheDir Disables the HTTP callback cache php function yClearHTTPCallbackCacheDir bool_removeFiles This method disables the HTTP callback cache and can additionally cleanup the cache dir...

Page 144: ...sableExceptions m void DisableExceptions pas procedure yDisableExceptions vb procedure yDisableExceptions cs void DisableExceptions uwp void DisableExceptions py def DisableExceptions php function yDi...

Page 145: ...e yEnableExceptions vb procedure yEnableExceptions cs void EnableExceptions uwp void EnableExceptions py def EnableExceptions php function yEnableExceptions es function EnableExceptions Be aware than...

Page 146: ...Object osContext Before calling yRegisterHub usb you need to activate the USB host port of the system This function takes as argument an object of class android content Context or any subclass It is n...

Page 147: ...procedure yFreeAPI vb procedure yFreeAPI cs void FreeAPI java void FreeAPI uwp void FreeAPI py def FreeAPI php function yFreeAPI es function FreeAPI It is generally not required to call this function...

Page 148: ...sion es function GetAPIVersion The version is a string in the form Major Minor Build for instance 1 01 5535 For languages using an external DLL for instance C VisualBasic or Delphi the character strin...

Page 149: ...u64 vb function yGetCacheValidity As Long cs ulong GetCacheValidity java long GetCacheValidity uwp Task ulong GetCacheValidity py def GetCacheValidity php function yGetCacheValidity es function GetCac...

Page 150: ...int GetDeviceListValidity pas function yGetDeviceListValidity LongInt vb function yGetDeviceListValidity As Integer cs int GetDeviceListValidity java int GetDeviceListValidity uwp Task int GetDeviceL...

Page 151: ...u64 GetTickCount pas function yGetTickCount u64 vb function yGetTickCount As Long cs ulong GetTickCount java long GetTickCount uwp ulong GetTickCount py def GetTickCount php function yGetTickCount es...

Page 152: ...ts errmsg None php function yHandleEvents errmsg es function HandleEvents errmsg If your program includes significant loops you may want to include a call to this function to make sure that the librar...

Page 153: ...e 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...

Page 154: ...PreregisterHub string url py def PreregisterHub url errmsg None php function yPreregisterHub url errmsg es function PreregisterHub url errmsg This function has the same purpose and same arguments as R...

Page 155: ...unc vb procedure yRegisterDeviceArrivalCallback ByVal arrivalCallback As yDeviceUpdateFunc cs void RegisterDeviceArrivalCallback yDeviceUpdateFunc arrivalCallback java void RegisterDeviceArrivalCallba...

Page 156: ...Func vb procedure yRegisterDeviceRemovalCallback ByVal removalCallback As yDeviceUpdateFunc cs void RegisterDeviceRemovalCallback yDeviceUpdateFunc removalCallback java void RegisterDeviceRemovalCallb...

Page 157: ...regular computer running a VirtualHub or a networked YoctoHub such as YoctoHub Ethernet or YoctoHub Wireless If you want to use the VirtualHub running on you local computer use the IP address 127 0 0...

Page 158: ...22 High level API Reference 152 www yoctopuce com On failure throws an exception or returns a negative error code...

Page 159: ...eryCallback As YHubDiscoveryCallback cs void RegisterHubDiscoveryCallback YHubDiscoveryCallback hubDiscoveryCallback java void RegisterHubDiscoveryCallback HubDiscoveryCallback hubDiscoveryCallback uw...

Page 160: ...as happens for incoming websocket callbacks Parameters ws node WebSocket object for the incoming websocket callback connection errmsg a string passed by reference to receive any error message authpwd...

Page 161: ...cedure yRegisterLogFunction logfun yLogFunc vb procedure yRegisterLogFunction ByVal logfun As yLogFunc cs void RegisterLogFunction yLogFunc logfun java void RegisterLogFunction LogCallback logfun uwp...

Page 162: ...priate library to use However for Linux ARM it not possible to reliably distinguish between a Hard Float armhf and a Soft Float armel install For in this case it is therefore recommended to manually s...

Page 163: ...eValidity ulong cacheValidityMs py def SetCacheValidity cacheValidityMs php function ySetCacheValidity cacheValidityMs es function SetCacheValidity cacheValidityMs By default when accessing a module a...

Page 164: ...n object that must follow the protocol YDeviceHotPlug m void SetDelegate id object The methods yDeviceArrival and yDeviceRemoval will be invoked while yUpdateDeviceList is running You will have to cal...

Page 165: ...istValidity uwp Task SetDeviceListValidity int deviceListValidity py def SetDeviceListValidity deviceListValidity php function ySetDeviceListValidity deviceListValidity es function SetDeviceListValidi...

Page 166: ...fore any call to yRegisterHub This method takes in parameter the path of the directory used for saving data between each callback This folder must exist and the PHP script needs to have write access t...

Page 167: ...dateDeviceList periodically in order to keep the API up to date with current devices Parameters callback the function to call after the timeout occurs On Microsoft Internet Explorer the callback must...

Page 168: ...default this feature is disabled because it doubles the number of packets sent and slows down the API considerably Therefore the acknowledge of incoming USB packets should only be enabled on phones o...

Page 169: ...php function ySleep ms_duration errmsg es function Sleep ms_duration errmsg This function implements a passive waiting loop meaning that it does not consume CPU cycles significantly The processor is l...

Page 170: ...rl uint mstimeout py def TestHub url mstimeout errmsg None php function yTestHub url mstimeout errmsg es function TestHub url mstimeout errmsg This method do not register the hub it only test if the h...

Page 171: ...bDiscovery string errmsg m YRETCODE TriggerHubDiscovery NSError errmsg pas function yTriggerHubDiscovery var errmsg string integer vb function yTriggerHubDiscovery ByRef errmsg As String As Integer cs...

Page 172: ...gisterHub url cpp void yUnregisterHub const string url m void UnregisterHub NSString url pas procedure yUnregisterHub url string vb procedure yUnregisterHub ByVal url As String cs void UnregisterHub s...

Page 173: ...iceList uwp Task int UpdateDeviceList py def UpdateDeviceList errmsg None php function yUpdateDeviceList errmsg es function UpdateDeviceList errmsg The library searches the machines or USB ports previ...

Page 174: ...resh the device list and to make the application aware of hot plug events This asynchronous version exists only in Javascript It uses a callback instead of a return value in order to avoid blocking Fi...

Page 175: ...unc 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...

Page 176: ...the luminosity of the module informative leds from 0 to 100 module get_parentHub Returns the serial number of the YoctoHub on which this module is connected module get_persistentSettings Returns the c...

Page 177: ...back callback Register a callback function to be called when the localization beacon of the module has been changed module registerConfigChangeCallback callback Register a callback function to be call...

Page 178: ...reReboot Schedules a module reboot into special firmware update mode module updateFirmware path Prepares a firmware update of the module module updateFirmwareEx path force Prepares a firmware update o...

Page 179: ...not require that the module is online at the time it is invoked The returned object is nevertheless valid Use the method YModule isOnline to test if the module is indeed online at a given time In case...

Page 180: ...SerialNumber FunctionLogicalName ModuleLogicalName FunctionIdentifier ModuleLogicalName FunctionLogicalName This function does not require that the module is online at the time it is invoked The retur...

Page 181: ...tModule pas function yFirstModule TYModule vb function yFirstModule As YModule cs YModule FirstModule java YModule FirstModule uwp YModule FirstModule py def FirstModule php function yFirstModule es f...

Page 182: ...lynew php function checkFirmware path onlynew es function checkFirmware path onlynew cmd YModule target checkFirmware path onlynew This method is useful to test if the module needs to be updated It is...

Page 183: ...cpp void clearCache m void clearCache pas procedure clearCache vb procedure clearCache cs void clearCache java void clearCache py def clearCache php function clearCache es function clearCache Invalida...

Page 184: ...tion describe cpp string describe m NSString describe pas function describe string vb function describe As String cs string describe java String describe py def describe php function describe es funct...

Page 185: ...pas function download pathname string TByteArray vb function download As Byte cs byte download string pathname java byte download String pathname uwp Task byte download string pathname py def downloa...

Page 186: ...eger As String cs string functionBaseType int functionIndex java String functionBaseType int functionIndex py def functionBaseType functionIndex php function functionBaseType functionIndex es function...

Page 187: ...function functionCount cpp int functionCount m int functionCount pas function functionCount integer vb function functionCount As Integer cs int functionCount java int functionCount py def functionCou...

Page 188: ...functionId ByVal functionIndex As Integer As String cs string functionId int functionIndex java String functionId int functionIndex py def functionId functionIndex php function functionId functionInd...

Page 189: ...ction functionName ByVal functionIndex As Integer As String cs string functionName int functionIndex java String functionName int functionIndex py def functionName functionIndex php function functionN...

Page 190: ...nType ByVal functionIndex As Integer As String cs string functionType int functionIndex java String functionType int functionIndex py def functionType functionIndex php function functionType functionI...

Page 191: ...nValue ByVal functionIndex As Integer As String cs string functionValue int functionIndex java String functionValue int functionIndex py def functionValue functionIndex php function functionValue func...

Page 192: ...lSettings TByteArray vb function get_allSettings As Byte cs byte get_allSettings java byte get_allSettings uwp Task byte get_allSettings py def get_allSettings php function get_allSettings es function...

Page 193: ...EACON_enum beacon pas function get_beacon Integer vb function get_beacon As Integer cs int get_beacon java int get_beacon uwp Task int get_beacon py def get_beacon php function get_beacon es function...

Page 194: ...m NSString errorMessage pas function get_errorMessage string vb function get_errorMessage As String cs string get_errorMessage java String get_errorMessage py def get_errorMessage php function get_err...

Page 195: ...DE get_errorType pas function get_errorType YRETCODE vb function get_errorType As YRETCODE cs YRETCODE get_errorType java int get_errorType py def get_errorType php function get_errorType es function...

Page 196: ...function get_firmwareRelease string vb function get_firmwareRelease As String cs string get_firmwareRelease java String get_firmwareRelease uwp Task string get_firmwareRelease py def get_firmwareRele...

Page 197: ...funType pas function get_functionIds funType string TStringArray vb function get_functionIds As List cs List string get_functionIds string funType java ArrayList String get_functionIds String funType...

Page 198: ...rdwareId cpp string get_hardwareId m NSString hardwareId vb function get_hardwareId As String cs string get_hardwareId java String get_hardwareId py def get_hardwareId php function get_hardwareId es f...

Page 199: ...unction get_icon2d TByteArray vb function get_icon2d As Byte cs byte get_icon2d java byte get_icon2d uwp Task byte get_icon2d py def get_icon2d php function get_icon2d es function get_icon2d cmd YModu...

Page 200: ...s function get_lastLogs string vb function get_lastLogs As String cs string get_lastLogs java String get_lastLogs uwp Task string get_lastLogs py def get_lastLogs php function get_lastLogs es function...

Page 201: ...alName pas function get_logicalName string vb function get_logicalName As String cs string get_logicalName java String get_logicalName uwp Task string get_logicalName py def get_logicalName php functi...

Page 202: ...inosity pas function get_luminosity LongInt vb function get_luminosity As Integer cs int get_luminosity java int get_luminosity uwp Task int get_luminosity py def get_luminosity php function get_lumin...

Page 203: ...ntHub pas function get_parentHub string vb function get_parentHub As String cs string get_parentHub java String get_parentHub uwp Task string get_parentHub py def get_parentHub php function get_parent...

Page 204: ...Integer vb function get_persistentSettings As Integer cs int get_persistentSettings java int get_persistentSettings uwp Task int get_persistentSettings py def get_persistentSettings php function get_p...

Page 205: ...productId pas function get_productId LongInt vb function get_productId As Integer cs int get_productId java int get_productId uwp Task int get_productId py def get_productId php function get_productId...

Page 206: ...ctName pas function get_productName string vb function get_productName As String cs string get_productName java String get_productName uwp Task string get_productName py def get_productName php functi...

Page 207: ...s function get_productRelease LongInt vb function get_productRelease As Integer cs int get_productRelease java int get_productRelease uwp Task int get_productRelease py def get_productRelease php func...

Page 208: ...unction get_rebootCountdown LongInt vb function get_rebootCountdown As Integer cs int get_rebootCountdown java int get_rebootCountdown uwp Task int get_rebootCountdown py def get_rebootCountdown php f...

Page 209: ...ber pas function get_serialNumber string vb function get_serialNumber As String cs string get_serialNumber java String get_serialNumber uwp Task string get_serialNumber py def get_serialNumber php fun...

Page 210: ...ces pas function get_subDevices TStringArray vb function get_subDevices As List cs List string get_subDevices java ArrayList String get_subDevices uwp Task List string get_subDevices py def get_subDev...

Page 211: ...pTime m s64 upTime pas function get_upTime int64 vb function get_upTime As Long cs long get_upTime java long get_upTime uwp Task long get_upTime py def get_upTime php function get_upTime es function g...

Page 212: ...l cpp string get_url m NSString url pas function get_url string vb function get_url As String cs string get_url java String get_url uwp Task string get_url py def get_url php function get_url es funct...

Page 213: ...Current pas function get_usbCurrent LongInt vb function get_usbCurrent As Integer cs int get_usbCurrent java int get_usbCurrent uwp Task int get_usbCurrent py def get_usbCurrent php function get_usbCu...

Page 214: ...on get_userData cpp void get_userData m id userData pas function get_userData Tobject vb function get_userData As Object cs object get_userData java Object get_userData py def get_userData php functio...

Page 215: ...rVar LongInt vb function get_userVar As Integer cs int get_userVar java int get_userVar uwp Task int get_userVar py def get_userVar php function get_userVar es function get_userVar cmd YModule target...

Page 216: ...string boolean vb function hasFunction As Boolean cs bool hasFunction string funcId java boolean hasFunction String funcId uwp Task bool hasFunction string funcId py def hasFunction funcId php functio...

Page 217: ...on isOnline boolean vb function isOnline As Boolean cs bool isOnline java boolean isOnline py def isOnline php function isOnline es function isOnline If there are valid cached values for the module th...

Page 218: ...requested module This asynchronous version exists only in Javascript It uses a callback instead of a return value in order to avoid blocking Firefox Javascript VM that does not implement context switc...

Page 219: ...long msValidity py def load msValidity php function load msValidity es function load msValidity By default whenever accessing a device all module attributes are kept in cache for the standard duration...

Page 220: ...t It uses a callback instead of a return value in order to avoid blocking Firefox javascript VM that does not implement context switching during blocking I O calls See the documentation section on asy...

Page 221: ...g text java int log String text uwp Task int log string text py def log text php function log text es function log text cmd YModule target log text This function is useful in particular to trace the e...

Page 222: ...nextModule m YModule nextModule pas function nextModule TYModule vb function nextModule As YModule cs YModule nextModule java YModule nextModule uwp YModule nextModule py def nextModule php function...

Page 223: ...boot LongInt LongInt vb function reboot As Integer cs int reboot int secBeforeReboot java int reboot int secBeforeReboot uwp Task int reboot int secBeforeReboot py def reboot secBeforeReboot php funct...

Page 224: ...ck TYModuleBeaconCallback LongInt vb function registerBeaconCallback As Integer cs int registerBeaconCallback BeaconCallback callback java int registerBeaconCallback BeaconCallback callback uwp Task i...

Page 225: ...back callback pas function registerConfigChangeCallback callback TYModuleConfigChangeCallback LongInt vb function registerConfigChangeCallback As Integer cs int registerConfigChangeCallback ConfigChan...

Page 226: ...ModuleLogCallback As Integer cs int registerLogCallback LogCallback callback java void registerLogCallback LogCallback callback py def registerLogCallback callback This callback will be called each ti...

Page 227: ...tFromFlash m int revertFromFlash pas function revertFromFlash LongInt vb function revertFromFlash As Integer cs int revertFromFlash java int revertFromFlash uwp Task int revertFromFlash py def revertF...

Page 228: ...nction saveToFlash As Integer cs int saveToFlash java int saveToFlash uwp Task int saveToFlash py def saveToFlash php function saveToFlash es function saveToFlash cmd YModule target saveToFlash Warnin...

Page 229: ...java int set_allSettings byte settings uwp Task int set_allSettings py def set_allSettings settings php function set_allSettings settings es function set_allSettings settings cmd YModule target set_al...

Page 230: ...java int set_allSettingsAndFiles byte settings uwp Task int set_allSettingsAndFiles py def set_allSettingsAndFiles settings php function set_allSettingsAndFiles settings es function set_allSettingsAnd...

Page 231: ...beacon newval Integer integer vb function set_beacon ByVal newval As Integer As Integer cs int set_beacon int newval java int set_beacon int newval uwp Task int set_beacon int newval py def set_beacon...

Page 232: ...ring newval java int set_logicalName String newval uwp Task int set_logicalName string newval py def set_logicalName newval php function set_logicalName newval es function set_logicalName newval cmd Y...

Page 233: ...int set_luminosity int newval java int set_luminosity int newval uwp Task int set_luminosity int newval py def set_luminosity newval php function set_luminosity newval es function set_luminosity newva...

Page 234: ...erData void data m void setUserData id data pas procedure set_userData data Tobject vb procedure set_userData ByVal data As Object cs void set_userData object data java void set_userData Object data p...

Page 235: ...s Integer cs int set_userVar int newval java int set_userVar int newval uwp Task int set_userVar int newval py def set_userVar newval php function set_userVar newval es function set_userVar newval cmd...

Page 236: ...nfigChangeCallback m int triggerConfigChangeCallback pas function triggerConfigChangeCallback LongInt vb function triggerConfigChangeCallback As Integer cs int triggerConfigChangeCallback java int tri...

Page 237: ...nction triggerFirmwareUpdate As Integer cs int triggerFirmwareUpdate int secBeforeReboot java int triggerFirmwareUpdate int secBeforeReboot uwp Task int triggerFirmwareUpdate int secBeforeReboot py de...

Page 238: ...function updateFirmware As YFirmwareUpdate cs YFirmwareUpdate updateFirmware string path java YFirmwareUpdate updateFirmware String path uwp Task YFirmwareUpdate updateFirmware string path py def upd...

Page 239: ...reUpdate updateFirmwareEx string path bool force java YFirmwareUpdate updateFirmwareEx String path boolean force uwp Task YFirmwareUpdate updateFirmwareEx string path bool force py def updateFirmwareE...

Page 240: ...llback context The callback function can therefore freely issue synchronous or asynchronous commands without risking to block the Javascript VM Parameters callback callback function that is invoked wh...

Page 241: ...c Retrieves a display for a given identifier yFindDisplayInContext yctx func Retrieves a display for a given identifier in a YAPI context yFirstDisplay Starts the enumeration of displays currently acc...

Page 242: ...Returns the height of the layers to draw on in pixels display get_layerWidth Returns the width of the layers to draw on in pixels display get_logicalName Returns the logical name of the display displa...

Page 243: ...quenceName Stops recording display commands and saves the sequence into the specified file on the display internal memory display set_brightness newval Changes the brightness of the display display se...

Page 244: ...ntifier ModuleSerialNumber FunctionLogicalName ModuleLogicalName FunctionIdentifier ModuleLogicalName FunctionLogicalName This function does not require that the display is online at the time it is in...

Page 245: ...eSerialNumber FunctionLogicalName ModuleLogicalName FunctionIdentifier ModuleLogicalName FunctionLogicalName This function does not require that the display is online at the time it is invoked The ret...

Page 246: ...splay pas function yFirstDisplay TYDisplay vb function yFirstDisplay As YDisplay cs YDisplay FirstDisplay java YDisplay FirstDisplay uwp YDisplay FirstDisplay py def FirstDisplay php function yFirstDi...

Page 247: ...e java YDisplay FirstDisplayInContext YAPIContext yctx uwp YDisplay FirstDisplayInContext YAPIContext yctx es function FirstDisplayInContext yctx Use the method YDisplay nextDisplay to iterate on next...

Page 248: ...cpp void clearCache m void clearCache pas procedure clearCache vb procedure clearCache cs void clearCache java void clearCache py def clearCache php function clearCache es function clearCache Invalida...

Page 249: ...erId py def copyLayerContent srcLayerId dstLayerId php function copyLayerContent srcLayerId dstLayerId es function copyLayerContent srcLayerId dstLayerId cmd YDisplay target copyLayerContent srcLayerI...

Page 250: ...function NAME it the name used for the first access to the function SERIAL is the serial number of the module if the module is connected or unresolved and FUNCTIONID is the hardware identifier of the...

Page 251: ...ngInt vb function fade As Integer cs int fade int brightness int duration java int fade int brightness int duration uwp Task int fade int brightness int duration py def fade brightness duration php fu...

Page 252: ...s function get_advertisedValue string vb function get_advertisedValue As String cs string get_advertisedValue java String get_advertisedValue uwp Task string get_advertisedValue py def get_advertisedV...

Page 253: ...ightness pas function get_brightness LongInt vb function get_brightness As Integer cs int get_brightness java int get_brightness uwp Task int get_brightness py def get_brightness php function get_brig...

Page 254: ...pas function get_displayHeight LongInt vb function get_displayHeight As Integer cs int get_displayHeight java int get_displayHeight uwp Task int get_displayHeight py def get_displayHeight php functio...

Page 255: ...layerId integer TYDisplayLayer vb function get_displayLayer As YDisplayLayer cs YDisplayLayer get_displayLayer int layerId java YDisplayLayer get_displayLayer int layerId py def get_displayLayer layer...

Page 256: ...on get_displayType Integer vb function get_displayType As Integer cs int get_displayType java int get_displayType uwp Task int get_displayType py def get_displayType php function get_displayType es fu...

Page 257: ...dth pas function get_displayWidth LongInt vb function get_displayWidth As Integer cs int get_displayWidth java int get_displayWidth uwp Task int get_displayWidth py def get_displayWidth php function g...

Page 258: ..._enum enabled pas function get_enabled Integer vb function get_enabled As Integer cs int get_enabled java int get_enabled uwp Task int get_enabled py def get_enabled php function get_enabled es functi...

Page 259: ...NSString errorMessage pas function get_errorMessage string vb function get_errorMessage As String cs string get_errorMessage java String get_errorMessage py def get_errorMessage php function get_error...

Page 260: ...get_errorType pas function get_errorType YRETCODE vb function get_errorType As YRETCODE cs YRETCODE get_errorType java int get_errorType py def get_errorType php function get_errorType es function ge...

Page 261: ...Name java String get_friendlyName py def get_friendlyName php function get_friendlyName es function get_friendlyName The returned string uses the logical names of the module and of the display if they...

Page 262: ...FUN_DESCR vb function get_functionDescriptor As YFUN_DESCR cs YFUN_DESCR get_functionDescriptor java String get_functionDescriptor py def get_functionDescriptor php function get_functionDescriptor es...

Page 263: ...js function get_functionId cpp string get_functionId m NSString functionId vb function get_functionId As String cs string get_functionId java String get_functionId py def get_functionId php function...

Page 264: ...vb function get_hardwareId As String cs string get_hardwareId java String get_hardwareId py def get_hardwareId php function get_hardwareId es function get_hardwareId The unique hardware identifier is...

Page 265: ...yerCount pas function get_layerCount LongInt vb function get_layerCount As Integer cs int get_layerCount java int get_layerCount uwp Task int get_layerCount py def get_layerCount php function get_laye...

Page 266: ...eight pas function get_layerHeight LongInt vb function get_layerHeight As Integer cs int get_layerHeight java int get_layerHeight uwp Task int get_layerHeight py def get_layerHeight php function get_l...

Page 267: ...yerWidth pas function get_layerWidth LongInt vb function get_layerWidth As Integer cs int get_layerWidth java int get_layerWidth uwp Task int get_layerWidth py def get_layerWidth php function get_laye...

Page 268: ...calName pas function get_logicalName string vb function get_logicalName As String cs string get_logicalName java String get_logicalName uwp Task string get_logicalName py def get_logicalName php funct...

Page 269: ...ction get_module cpp YModule get_module m YModule module pas function get_module TYModule vb function get_module As YModule cs YModule get_module java YModule get_module py def get_module php function...

Page 270: ...It uses a callback instead of a return value in order to avoid blocking Firefox javascript VM that does not implement context switching during blocking I O calls See the documentation section on async...

Page 271: ...entation Integer vb function get_orientation As Integer cs int get_orientation java int get_orientation uwp Task int get_orientation py def get_orientation php function get_orientation es function get...

Page 272: ...tartupSeq pas function get_startupSeq string vb function get_startupSeq As String cs string get_startupSeq java String get_startupSeq uwp Task string get_startupSeq py def get_startupSeq php function...

Page 273: ...ion get_userData cpp void get_userData m id userData pas function get_userData Tobject vb function get_userData As Object cs object get_userData java Object get_userData py def get_userData php functi...

Page 274: ...nline boolean vb function isOnline As Boolean cs bool isOnline java boolean isOnline py def isOnline php function isOnline es function isOnline If there is a cached value for the display in cache that...

Page 275: ...ror while trying to contact the device hosting the requested function This asynchronous version exists only in Javascript It uses a callback instead of a return value in order to avoid blocking the Ja...

Page 276: ...long msValidity py def load msValidity php function load msValidity es function load msValidity By default whenever accessing a device all function attributes are kept in cache for the standard durati...

Page 277: ...ribute NSString attrName pas function loadAttribute attrName string string vb function loadAttribute As String cs string loadAttribute string attrName java String loadAttribute String attrName uwp Tas...

Page 278: ...trafic for instance This asynchronous version exists only in Javascript It uses a callback instead of a return value in order to avoid blocking the Javascript virtual machine Parameters msValidity an...

Page 279: ...ueCallbacks java int muteValueCallbacks uwp Task int muteValueCallbacks py def muteValueCallbacks php function muteValueCallbacks es function muteValueCallbacks cmd YDisplay target muteValueCallbacks...

Page 280: ...Sequence LongInt vb function newSequence As Integer cs int newSequence java int newSequence uwp Task int newSequence py def newSequence php function newSequence es function newSequence cmd YDisplay ta...

Page 281: ...isplay m YDisplay nextDisplay pas function nextDisplay TYDisplay vb function nextDisplay As YDisplay cs YDisplay nextDisplay java YDisplay nextDisplay uwp YDisplay nextDisplay py def nextDisplay php f...

Page 282: ...int pauseSequence int delay_ms py def pauseSequence delay_ms php function pauseSequence delay_ms es function pauseSequence delay_ms cmd YDisplay target pauseSequence delay_ms This method can be used...

Page 283: ...enceName string LongInt vb function playSequence As Integer cs int playSequence string sequenceName java int playSequence String sequenceName uwp Task int playSequence string sequenceName py def playS...

Page 284: ...ueCallback UpdateCallback callback uwp Task int registerValueCallback ValueCallback callback py def registerValueCallback callback php function registerValueCallback callback es function registerValue...

Page 285: ...All LongInt vb function resetAll As Integer cs int resetAll java int resetAll uwp Task int resetAll py def resetAll php function resetAll es function resetAll cmd YDisplay target resetAll Using this f...

Page 286: ...ng LongInt vb function saveSequence As Integer cs int saveSequence string sequenceName java int saveSequence String sequenceName uwp Task int saveSequence string sequenceName py def saveSequence seque...

Page 287: ...int set_brightness int newval java int set_brightness int newval uwp Task int set_brightness int newval py def set_brightness newval php function set_brightness newval es function set_brightness newv...

Page 288: ...r vb function set_enabled ByVal newval As Integer As Integer cs int set_enabled int newval java int set_enabled int newval uwp Task int set_enabled int newval py def set_enabled newval php function se...

Page 289: ...tring newval java int set_logicalName String newval uwp Task int set_logicalName string newval py def set_logicalName newval php function set_logicalName newval es function set_logicalName newval cmd...

Page 290: ...set_orientation int newval java int set_orientation int newval uwp Task int set_orientation int newval py def set_orientation newval php function set_orientation newval es function set_orientation new...

Page 291: ...As String As Integer cs int set_startupSeq string newval java int set_startupSeq String newval uwp Task int set_startupSeq string newval py def set_startupSeq newval php function set_startupSeq newva...

Page 292: ...serData void data m void setUserData id data pas procedure set_userData data Tobject vb procedure set_userData ByVal data As Object cs void set_userData object data java void set_userData Object data...

Page 293: ...Sequence pas function stopSequence LongInt vb function stopSequence As Integer cs int stopSequence java int stopSequence uwp Task int stopSequence py def stopSequence php function stopSequence es func...

Page 294: ...erContent layerIdA layerIdB es function swapLayerContent layerIdA layerIdB cmd YDisplay target swapLayerContent layerIdA layerIdB The color and transparency of all the pixels from the two layers are s...

Page 295: ...Callbacks As Integer cs int unmuteValueCallbacks java int unmuteValueCallbacks uwp Task int unmuteValueCallbacks py def unmuteValueCallbacks php function unmuteValueCallbacks es function unmuteValueCa...

Page 296: ...procedure upload cs int upload string pathname java int upload String pathname byte content uwp Task int upload string pathname py def upload pathname content php function upload pathname content es...

Page 297: ...allback context The callback function can therefore freely issue synchronous or asynchronous commands without risking to block the Javascript VM Parameters callback callback function that is invoked w...

Page 298: ...layer makes it fully transparent displaylayer clearConsole Blanks the console area within console margins and resets the console pointer to the upper left corner of the console displaylayer consoleOu...

Page 299: ...eraser instead of a pen for all subsequent drawing functions except for bitmap copy functions displaylayer selectFont fontname Selects a font to use for the next text drawing functions by providing th...

Page 300: ...vb function clear As Integer cs int clear java int clear uwp Task int clear py def clear php function clear es function clear cmd YDisplay target layer layerId clear This method does not change any ot...

Page 301: ...on clearConsole cpp int clearConsole m int clearConsole pas function clearConsole LongInt vb function clearConsole As Integer cs int clearConsole java int clearConsole uwp Task int clearConsole py def...

Page 302: ...eOut String text uwp Task int consoleOut string text py def consoleOut text php function consoleOut text es function consoleOut text cmd YDisplay target layer layerId consoleOut text The console point...

Page 303: ...int y2 uwp Task int drawBar int x1 int y1 int x2 int y2 py def drawBar x1 y1 x2 y2 php function drawBar x1 y1 x2 y2 es function drawBar x1 y1 x2 y2 cmd YDisplay target layer layerId drawBar x1 y1 x2 y...

Page 304: ...layer layerId drawBitmap x y w bitmap bgcol The bitmap is provided as a binary object where each pixel maps to a bit from left to right and from top to bottom The most significant bit of each byte ma...

Page 305: ...rawCircle int x int y int r java int drawCircle int x int y int r uwp Task int drawCircle int x int y int r py def drawCircle x y r php function drawCircle x y r es function drawCircle x y r cmd YDisp...

Page 306: ...drawDisc int x int y int r java int drawDisc int x int y int r uwp Task int drawDisc int x int y int r py def drawDisc x y r php function drawDisc x y r es function drawDisc x y r cmd YDisplay target...

Page 307: ...nt y string imagename py def drawImage x y imagename php function drawImage x y imagename es function drawImage x y imagename cmd YDisplay target layer layerId drawImage x y imagename The GIF image mu...

Page 308: ...LongInt vb function drawPixel As Integer cs int drawPixel int x int y java int drawPixel int x int y uwp Task int drawPixel int x int y py def drawPixel x y php function drawPixel x y es function draw...

Page 309: ...nt y2 uwp Task int drawRect int x1 int y1 int x2 int y2 py def drawRect x1 y1 x2 y2 php function drawRect x1 y1 x2 y2 es function drawRect x1 y1 x2 y2 cmd YDisplay target layer layerId drawRect x1 y1...

Page 310: ...t The point of the text that is aligned to the specified pixel position is called the anchor point and can be chosen among several options Text is rendered from left to right without implicit wrapping...

Page 311: ...cpp YDisplay get_display m YDisplay display pas function get_display TYDisplay vb function get_display As YDisplay cs YDisplay get_display java YDisplay get_display uwp Task YDisplay get_display py d...

Page 312: ...t pas function get_displayHeight LongInt vb function get_displayHeight As Integer cs int get_displayHeight java int get_displayHeight uwp Task int get_displayHeight py def get_displayHeight php functi...

Page 313: ...dth pas function get_displayWidth LongInt vb function get_displayWidth As Integer cs int get_displayWidth java int get_displayWidth uwp Task int get_displayWidth py def get_displayWidth php function g...

Page 314: ...Height pas function get_layerHeight LongInt vb function get_layerHeight As Integer cs int get_layerHeight java int get_layerHeight uwp Task int get_layerHeight py def get_layerHeight php function get_...

Page 315: ...yerWidth pas function get_layerWidth LongInt vb function get_layerWidth As Integer cs int get_layerWidth java int get_layerWidth uwp Task int get_layerWidth py def get_layerWidth php function get_laye...

Page 316: ...ef hide php function hide es function hide cmd YDisplay target layer layerId hide The state of the layer is perserved but the layer is not displayed on the screen until the next call to unhide Hiding...

Page 317: ...nt lineTo int x int y uwp Task int lineTo int x int y py def lineTo x y php function lineTo x y es function lineTo x y cmd YDisplay target layer layerId lineTo x y The specified destination pixel is i...

Page 318: ...Int y LongInt LongInt vb function moveTo As Integer cs int moveTo int x int y java int moveTo int x int y uwp Task int moveTo int x int y py def moveTo x y php function moveTo x y es function moveTo x...

Page 319: ...ion reset As Integer cs int reset java int reset uwp Task int reset py def reset php function reset es function reset cmd YDisplay target layer layerId reset Reinitializes the drawing pointer to the u...

Page 320: ...cs int selectColorPen int color java int selectColorPen int color uwp Task int selectColorPen int color py def selectColorPen color php function selectColorPen color es function selectColorPen color...

Page 321: ...ion selectEraser LongInt vb function selectEraser As Integer cs int selectEraser java int selectEraser uwp Task int selectEraser py def selectEraser php function selectEraser es function selectEraser...

Page 322: ...lectFont String fontname uwp Task int selectFont string fontname py def selectFont fontname php function selectFont fontname es function selectFont fontname cmd YDisplay target layer layerId selectFon...

Page 323: ...yPen int graylevel uwp Task int selectGrayPen int graylevel py def selectGrayPen graylevel php function selectGrayPen graylevel es function selectGrayPen graylevel cmd YDisplay target layer layerId se...

Page 324: ...bool mode py def setAntialiasingMode mode php function setAntialiasingMode mode es function setAntialiasingMode mode cmd YDisplay target layer layerId setAntialiasingMode mode Anti aliasing provides...

Page 325: ...t LongInt vb function setConsoleBackground As Integer cs int setConsoleBackground int bgcol java int setConsoleBackground int bgcol uwp Task int setConsoleBackground int bgcol py def setConsoleBackgro...

Page 326: ...java int setConsoleMargins int x1 int y1 int x2 int y2 uwp Task int setConsoleMargins int x1 int y1 int x2 int y2 py def setConsoleMargins x1 y1 x2 y2 php function setConsoleMargins x1 y1 x2 y2 es fun...

Page 327: ...ction setConsoleWordWrap As Integer cs int setConsoleWordWrap bool wordwrap java int setConsoleWordWrap boolean wordwrap uwp Task int setConsoleWordWrap bool wordwrap py def setConsoleWordWrap wordwra...

Page 328: ...ayerPosition int x int y int scrollTime py def setLayerPosition x y scrollTime php function setLayerPosition x y scrollTime es function setLayerPosition x y scrollTime cmd YDisplay target layer layerI...

Page 329: ...s function unhide LongInt vb function unhide As Integer cs int unhide java int unhide uwp Task int unhide py def unhide php function unhide es function unhide cmd YDisplay target layer layerId unhide...

Page 330: ...YoctoAPI YAnButton py from yocto_anbutton import php require_once yocto_anbutton php Global functions yFindAnButton func Retrieves an analog input for a given identifier yFindAnButtonInContext yctx fu...

Page 331: ...eleased the input contact transitioned from closed to open anbutton get_logicalName Returns the logical name of the analog input anbutton get_module Gets the YModule object for the device on which the...

Page 332: ...e maximal calibration value for the input between 0 and 4095 included without actually starting the automated calibration anbutton set_calibrationMin newval Changes the minimal calibration value for t...

Page 333: ...ntifier ModuleSerialNumber FunctionLogicalName ModuleLogicalName FunctionIdentifier ModuleLogicalName FunctionLogicalName This function does not require that the analog input is online at the time it...

Page 334: ...lNumber FunctionLogicalName ModuleLogicalName FunctionIdentifier ModuleLogicalName FunctionLogicalName This function does not require that the analog input is online at the time it is invoked The retu...

Page 335: ...pas function yFirstAnButton TYAnButton vb function yFirstAnButton As YAnButton cs YAnButton FirstAnButton java YAnButton FirstAnButton uwp YAnButton FirstAnButton py def FirstAnButton php function yFi...

Page 336: ...a YAnButton FirstAnButtonInContext YAPIContext yctx uwp YAnButton FirstAnButtonInContext YAPIContext yctx es function FirstAnButtonInContext yctx Use the method YAnButton nextAnButton to iterate on ne...

Page 337: ...pp void clearCache m void clearCache pas procedure clearCache vb procedure clearCache cs void clearCache java void clearCache py def clearCache php function clearCache es function clearCache Invalidat...

Page 338: ...function NAME it the name used for the first access to the function SERIAL is the serial number of the module if the module is connected or unresolved and FUNCTIONID is the hardware identifier of the...

Page 339: ...as function get_advertisedValue string vb function get_advertisedValue As String cs string get_advertisedValue java String get_advertisedValue uwp Task string get_advertisedValue py def get_advertised...

Page 340: ...um analogCalibration pas function get_analogCalibration Integer vb function get_analogCalibration As Integer cs int get_analogCalibration java int get_analogCalibration uwp Task int get_analogCalibrat...

Page 341: ...function get_calibratedValue LongInt vb function get_calibratedValue As Integer cs int get_calibratedValue java int get_calibratedValue uwp Task int get_calibratedValue py def get_calibratedValue php...

Page 342: ...pas function get_calibrationMax LongInt vb function get_calibrationMax As Integer cs int get_calibrationMax java int get_calibrationMax uwp Task int get_calibrationMax py def get_calibrationMax php fu...

Page 343: ...pas function get_calibrationMin LongInt vb function get_calibrationMin As Integer cs int get_calibrationMin java int get_calibrationMin uwp Task int get_calibrationMin py def get_calibrationMin php fu...

Page 344: ...m NSString errorMessage pas function get_errorMessage string vb function get_errorMessage As String cs string get_errorMessage java String get_errorMessage py def get_errorMessage php function get_err...

Page 345: ...DE get_errorType pas function get_errorType YRETCODE vb function get_errorType As YRETCODE cs YRETCODE get_errorType java int get_errorType py def get_errorType php function get_errorType es function...

Page 346: ...java String get_friendlyName py def get_friendlyName php function get_friendlyName es function get_friendlyName The returned string uses the logical names of the module and of the analog input if the...

Page 347: ...YFUN_DESCR vb function get_functionDescriptor As YFUN_DESCR cs YFUN_DESCR get_functionDescriptor java String get_functionDescriptor py def get_functionDescriptor php function get_functionDescriptor es...

Page 348: ...le js function get_functionId cpp string get_functionId m NSString functionId vb function get_functionId As String cs string get_functionId java String get_functionId py def get_functionId php functio...

Page 349: ...b function get_hardwareId As String cs string get_hardwareId java String get_hardwareId py def get_hardwareId php function get_hardwareId es function get_hardwareId The unique hardware identifier is c...

Page 350: ...isPressed pas function get_isPressed Integer vb function get_isPressed As Integer cs int get_isPressed java int get_isPressed uwp Task int get_isPressed py def get_isPressed php function get_isPressed...

Page 351: ...s function get_lastTimePressed int64 vb function get_lastTimePressed As Long cs long get_lastTimePressed java long get_lastTimePressed uwp Task long get_lastTimePressed py def get_lastTimePressed php...

Page 352: ...function get_lastTimeReleased int64 vb function get_lastTimeReleased As Long cs long get_lastTimeReleased java long get_lastTimeReleased uwp Task long get_lastTimeReleased py def get_lastTimeReleased...

Page 353: ...icalName pas function get_logicalName string vb function get_logicalName As String cs string get_logicalName java String get_logicalName uwp Task string get_logicalName py def get_logicalName php func...

Page 354: ...unction get_module cpp YModule get_module m YModule module pas function get_module TYModule vb function get_module As YModule cs YModule get_module java YModule get_module py def get_module php functi...

Page 355: ...It uses a callback instead of a return value in order to avoid blocking Firefox javascript VM that does not implement context switching during blocking I O calls See the documentation section on asyn...

Page 356: ...nter As Long cs long get_pulseCounter java long get_pulseCounter uwp Task long get_pulseCounter py def get_pulseCounter php function get_pulseCounter es function get_pulseCounter cmd YAnButton target...

Page 357: ...pulseTimer pas function get_pulseTimer int64 vb function get_pulseTimer As Long cs long get_pulseTimer java long get_pulseTimer uwp Task long get_pulseTimer py def get_pulseTimer php function get_puls...

Page 358: ...m int rawValue pas function get_rawValue LongInt vb function get_rawValue As Integer cs int get_rawValue java int get_rawValue uwp Task int get_rawValue py def get_rawValue php function get_rawValue e...

Page 359: ...tivity pas function get_sensitivity LongInt vb function get_sensitivity As Integer cs int get_sensitivity java int get_sensitivity uwp Task int get_sensitivity py def get_sensitivity php function get_...

Page 360: ...ction get_userData cpp void get_userData m id userData pas function get_userData Tobject vb function get_userData As Object cs object get_userData java Object get_userData py def get_userData php func...

Page 361: ...e boolean vb function isOnline As Boolean cs bool isOnline java boolean isOnline py def isOnline php function isOnline es function isOnline If there is a cached value for the analog input in cache tha...

Page 362: ...an error while trying to contact the device hosting the requested function This asynchronous version exists only in Javascript It uses a callback instead of a return value in order to avoid blocking...

Page 363: ...ad long msValidity py def load msValidity php function load msValidity es function load msValidity By default whenever accessing a device all function attributes are kept in cache for the standard dur...

Page 364: ...tribute NSString attrName pas function loadAttribute attrName string string vb function loadAttribute As String cs string loadAttribute string attrName java String loadAttribute String attrName uwp Ta...

Page 365: ...rk trafic for instance This asynchronous version exists only in Javascript It uses a callback instead of a return value in order to avoid blocking the Javascript virtual machine Parameters msValidity...

Page 366: ...ueCallbacks java int muteValueCallbacks uwp Task int muteValueCallbacks py def muteValueCallbacks php function muteValueCallbacks es function muteValueCallbacks cmd YAnButton target muteValueCallbacks...

Page 367: ...YAnButton nextAnButton pas function nextAnButton TYAnButton vb function nextAnButton As YAnButton cs YAnButton nextAnButton java YAnButton nextAnButton uwp YAnButton nextAnButton py def nextAnButton...

Page 368: ...ValueCallback UpdateCallback callback uwp Task int registerValueCallback ValueCallback callback py def registerValueCallback callback php function registerValueCallback callback es function registerVa...

Page 369: ...ounter m int resetCounter pas function resetCounter LongInt vb function resetCounter As Integer cs int resetCounter java int resetCounter uwp Task int resetCounter py def resetCounter php function res...

Page 370: ...ewval As Integer As Integer cs int set_analogCalibration int newval java int set_analogCalibration int newval uwp Task int set_analogCalibration int newval py def set_analogCalibration newval php func...

Page 371: ...Integer As Integer cs int set_calibrationMax int newval java int set_calibrationMax int newval uwp Task int set_calibrationMax int newval py def set_calibrationMax newval php function set_calibration...

Page 372: ...Integer As Integer cs int set_calibrationMin int newval java int set_calibrationMin int newval uwp Task int set_calibrationMin int newval py def set_calibrationMin newval php function set_calibration...

Page 373: ...string newval java int set_logicalName String newval uwp Task int set_logicalName string newval py def set_logicalName newval php function set_logicalName newval es function set_logicalName newval cmd...

Page 374: ...unction set_sensitivity newval es function set_sensitivity newval cmd YAnButton target set_sensitivity newval The sensibility is used to filter variations around a fixed value but does not preclude th...

Page 375: ..._userData void data m void setUserData id data pas procedure set_userData data Tobject vb procedure set_userData ByVal data As Object cs void set_userData object data java void set_userData Object dat...

Page 376: ...Callbacks As Integer cs int unmuteValueCallbacks java int unmuteValueCallbacks uwp Task int unmuteValueCallbacks py def unmuteValueCallbacks php function unmuteValueCallbacks es function unmuteValueCa...

Page 377: ...callback context The callback function can therefore freely issue synchronous or asynchronous commands without risking to block the Javascript VM Parameters callback callback function that is invoked...

Page 378: ...ontext yctx func Retrieves a filesystem for a given identifier in a YAPI context yFirstFiles Starts the enumeration of filesystems currently accessible yFirstFilesInContext yctx Starts the enumeration...

Page 379: ...or the device on which the function is located asynchronous version files get_userData Returns the value of the userData attribute as previously stored using method set_userData files isOnline Checks...

Page 380: ...unmuteValueCallbacks Re enables the propagation of every new advertised value to the parent hub files upload pathname content Uploads a file to the filesystem to the specified full path name files wai...

Page 381: ...FunctionLogicalName ModuleLogicalName FunctionIdentifier ModuleLogicalName FunctionLogicalName This function does not require that the filesystem is online at the time it is invoked The returned obje...

Page 382: ...FunctionLogicalName ModuleLogicalName FunctionIdentifier ModuleLogicalName FunctionLogicalName This function does not require that the filesystem is online at the time it is invoked The returned obje...

Page 383: ...FirstFiles pas function yFirstFiles TYFiles vb function yFirstFiles As YFiles cs YFiles FirstFiles java YFiles FirstFiles uwp YFiles FirstFiles py def FirstFiles php function yFirstFiles es function...

Page 384: ...ble java YFiles FirstFilesInContext YAPIContext yctx uwp YFiles FirstFilesInContext YAPIContext yctx es function FirstFilesInContext yctx Use the method YFiles nextFiles to iterate on next filesystems...

Page 385: ...void clearCache m void clearCache pas procedure clearCache vb procedure clearCache cs void clearCache java void clearCache py def clearCache php function clearCache es function clearCache Invalidates...

Page 386: ...ction NAME it the name used for the first access to the function SERIAL is the serial number of the module if the module is connected or unresolved and FUNCTIONID is the hardware identifier of the fun...

Page 387: ...ction download pathname string TByteArray vb function download As Byte cs byte download string pathname java byte download String pathname uwp Task byte download string pathname py def download pathna...

Page 388: ...at uses a callback to pass the result when the donwload is completed Parameters pathname path and name of the new file to load callback callback function that is invoked when the w The callback functi...

Page 389: ...tion fileExist filename string boolean vb function fileExist As Boolean cs bool fileExist string filename java boolean fileExist String filename uwp Task bool fileExist string filename py def fileExis...

Page 390: ...nt format_fs pas function format_fs LongInt vb function format_fs As Integer cs int format_fs java int format_fs uwp Task int format_fs py def format_fs php function format_fs es function format_fs cm...

Page 391: ...function get_advertisedValue string vb function get_advertisedValue As String cs string get_advertisedValue java String get_advertisedValue uwp Task string get_advertisedValue py def get_advertisedVal...

Page 392: ...tring errorMessage pas function get_errorMessage string vb function get_errorMessage As String cs string get_errorMessage java String get_errorMessage py def get_errorMessage php function get_errorMes...

Page 393: ...t_errorType pas function get_errorType YRETCODE vb function get_errorType As YRETCODE cs YRETCODE get_errorType java int get_errorType py def get_errorType php function get_errorType es function get_e...

Page 394: ...sCount pas function get_filesCount LongInt vb function get_filesCount As Integer cs int get_filesCount java int get_filesCount uwp Task int get_filesCount py def get_filesCount php function get_filesC...

Page 395: ...reeSpace pas function get_freeSpace LongInt vb function get_freeSpace As Integer cs int get_freeSpace java int get_freeSpace uwp Task int get_freeSpace py def get_freeSpace php function get_freeSpace...

Page 396: ...ava String get_friendlyName py def get_friendlyName php function get_friendlyName es function get_friendlyName The returned string uses the logical names of the module and of the filesystem if they ar...

Page 397: ..._DESCR vb function get_functionDescriptor As YFUN_DESCR cs YFUN_DESCR get_functionDescriptor java String get_functionDescriptor py def get_functionDescriptor php function get_functionDescriptor es fun...

Page 398: ...function get_functionId cpp string get_functionId m NSString functionId vb function get_functionId As String cs string get_functionId java String get_functionId py def get_functionId php function get...

Page 399: ...nction get_hardwareId As String cs string get_hardwareId java String get_hardwareId py def get_hardwareId php function get_hardwareId es function get_hardwareId The unique hardware identifier is compo...

Page 400: ...YFileRecord get_list string pattern java ArrayList YFileRecord get_list String pattern uwp Task List YFileRecord get_list string pattern py def get_list pattern php function get_list pattern es funct...

Page 401: ...lName pas function get_logicalName string vb function get_logicalName As String cs string get_logicalName java String get_logicalName uwp Task string get_logicalName py def get_logicalName php functio...

Page 402: ...on get_module cpp YModule get_module m YModule module pas function get_module TYModule vb function get_module As YModule cs YModule get_module java YModule get_module py def get_module php function ge...

Page 403: ...uses a callback instead of a return value in order to avoid blocking Firefox javascript VM that does not implement context switching during blocking I O calls See the documentation section on asynchro...

Page 404: ...get_userData cpp void get_userData m id userData pas function get_userData Tobject vb function get_userData As Object cs object get_userData java Object get_userData py def get_userData php function...

Page 405: ...boolean vb function isOnline As Boolean cs bool isOnline java boolean isOnline py def isOnline php function isOnline es function isOnline If there is a cached value for the filesystem in cache that h...

Page 406: ...rror while trying to contact the device hosting the requested function This asynchronous version exists only in Javascript It uses a callback instead of a return value in order to avoid blocking the J...

Page 407: ...ong msValidity py def load msValidity php function load msValidity es function load msValidity By default whenever accessing a device all function attributes are kept in cache for the standard duratio...

Page 408: ...bute NSString attrName pas function loadAttribute attrName string string vb function loadAttribute As String cs string loadAttribute string attrName java String loadAttribute String attrName uwp Task...

Page 409: ...rafic for instance This asynchronous version exists only in Javascript It uses a callback instead of a return value in order to avoid blocking the Javascript virtual machine Parameters msValidity an i...

Page 410: ...eCallbacks java int muteValueCallbacks uwp Task int muteValueCallbacks py def muteValueCallbacks php function muteValueCallbacks es function muteValueCallbacks cmd YFiles target muteValueCallbacks You...

Page 411: ...les nextFiles m YFiles nextFiles pas function nextFiles TYFiles vb function nextFiles As YFiles cs YFiles nextFiles java YFiles nextFiles uwp YFiles nextFiles py def nextFiles php function nextFiles e...

Page 412: ...lback UpdateCallback callback uwp Task int registerValueCallback ValueCallback callback py def registerValueCallback callback php function registerValueCallback callback es function registerValueCallb...

Page 413: ...move pathname php function remove pathname es function remove pathname cmd YFiles target remove pathname Because of filesystem fragmentation deleting a file may not always free up the whole space used...

Page 414: ...ing newval java int set_logicalName String newval uwp Task int set_logicalName string newval py def set_logicalName newval php function set_logicalName newval es function set_logicalName newval cmd YF...

Page 415: ...Data void data m void setUserData id data pas procedure set_userData data Tobject vb procedure set_userData ByVal data As Object cs void set_userData object data java void set_userData Object data py...

Page 416: ...allbacks As Integer cs int unmuteValueCallbacks java int unmuteValueCallbacks uwp Task int unmuteValueCallbacks py def unmuteValueCallbacks php function unmuteValueCallbacks es function unmuteValueCal...

Page 417: ...cs int upload string pathname java int upload String pathname byte content uwp Task int upload string pathname py def upload pathname content php function upload pathname content es function upload p...

Page 418: ...lback context The callback function can therefore freely issue synchronous or asynchronous commands without risking to block the Javascript VM Parameters callback callback function that is invoked whe...

Page 419: ...users to have write access to the Yoctopuce peripherals To add a new udev rule to your installation you must add a file with a name following the arbitraryName rules format in the etc udev rules d di...

Page 420: ...etween an HF and an EL executable and will return meaningless messages when you try to use the wrong type of binary All pre compiled Yoctopuce binaries are provided in both formats as two separate Arm...

Page 421: ...w that the device was damaged by mistake Yoctopuce engineers might be able to repair it and thus avoid creating electronic waste Waste Electrical and Electronic Equipment WEEE If you really want to ge...

Page 422: ...416 www yoctopuce com...

Page 423: ...otection class class III Normal operating temperature 5 40 C Extended operating temperature 25 70 C Supported Operating Systems Windows PC IoT Linux Intel ARM macOS Android Drivers no driver needed AP...

Page 424: ...24 Characteristics 418 www yoctopuce com...

Reviews: