',cmt:'
Yoctopuce application programming interface allows you to control the module voltage output. You affect absolute output values or make transitions
'}}; doc['VSource']['FindVSource']={syn:'Retrieves a voltage source for a given identifier.',lib:'YVSource.FindVSource()',pro:'function FindVSource(func)',cmt:'Retrieves a voltage source for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of voltage sources currently accessible. Use the method YVSource.nextVSource() to iterate on next voltage sources.
',ret:'a pointer to a YVSource object, corresponding to the first voltage source currently online, or a null pointer if there are none.'}; doc['VSource']['describe']={syn:'Returns a short text that describes the function in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'vsource.describe()',pro:'function describe()',cmt:'Returns a short text that describes the function in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the function (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['VSource']['get_advertisedValue']={syn:'Returns the current value of the voltage source (no more than 6 characters).',lib:'vsource.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the voltage source (no more than 6 characters).
',ret:'a string corresponding to the current value of the voltage source (no more than 6 characters)',ext:'On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['VSource']['get_errorMessage']={syn:'Returns the error message of the latest error with this function.',lib:'vsource.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with this function. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using this function object'}; doc['VSource']['get_errorType']={syn:'Returns the numerical error code of the latest error with this function.',lib:'vsource.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with this function. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using this function object'}; doc['VSource']['get_extPowerFailure']={syn:'Returns true if external power supply voltage is too low.',lib:'vsource.get_extPowerFailure()',pro:'function get_extPowerFailure()',cmt:'Returns true if external power supply voltage is too low.
',ret:'either Y_EXTPOWERFAILURE_FALSE or Y_EXTPOWERFAILURE_TRUE, according to true if external power supply voltage is too low',ext:'On failure, throws an exception or returns Y_EXTPOWERFAILURE_INVALID.'}; doc['VSource']['get_failure']={syn:'Returns true if the module is in failure mode.',lib:'vsource.get_failure()',pro:'function get_failure()',cmt:'Returns true if the module is in failure mode. More information can be obtained by testing get_overheat, get_overcurrent etc... When a error condition is met, the output voltage is set to z\xE9ro and cannot be changed until the reset() function is called.
',ret:'either Y_FAILURE_FALSE or Y_FAILURE_TRUE, according to true if the module is in failure mode',ext:'On failure, throws an exception or returns Y_FAILURE_INVALID.'}; doc['VSource']['get_friendlyName']={syn:'Returns a global identifier of the function in the format MODULE_NAME.FUNCTION_NAME.',lib:'vsource.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the function in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the function if they are defined, otherwise the serial number of the module and the hardware identifier of the function (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the function using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['VSource']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'vsource.get_vsourceDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['VSource']['get_functionId']={syn:'Returns the hardware identifier of the function, without reference to the module.',lib:'vsource.get_vsourceId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the function, without reference to the module. For example relay1
',ret:'a string that identifies the function (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['VSource']['get_hardwareId']={syn:'Returns the unique hardware identifier of the function in the form SERIAL.FUNCTIONID.',lib:'vsource.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the function in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the function. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the function (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['VSource']['get_logicalName']={syn:'Returns the logical name of the voltage source.',lib:'vsource.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the voltage source.
',ret:'a string corresponding to the logical name of the voltage source',ext:'On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['VSource']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'vsource.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['VSource']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'vsource.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['VSource']['get_overCurrent']={syn:'Returns true if the appliance connected to the device is too greedy .',lib:'vsource.get_overCurrent()',pro:'function get_overCurrent()',cmt:'Returns true if the appliance connected to the device is too greedy .
',ret:'either Y_OVERCURRENT_FALSE or Y_OVERCURRENT_TRUE, according to true if the appliance connected to the device is too greedy',ext:'On failure, throws an exception or returns Y_OVERCURRENT_INVALID.'}; doc['VSource']['get_overHeat']={syn:'Returns TRUE if the module is overheating.',lib:'vsource.get_overHeat()',pro:'function get_overHeat()',cmt:'Returns TRUE if the module is overheating.
',ret:'either Y_OVERHEAT_FALSE or Y_OVERHEAT_TRUE, according to TRUE if the module is overheating',ext:'On failure, throws an exception or returns Y_OVERHEAT_INVALID.'}; doc['VSource']['get_overLoad']={syn:'Returns true if the device is not able to maintaint the requested voltage output .',lib:'vsource.get_overLoad()',pro:'function get_overLoad()',cmt:'Returns true if the device is not able to maintaint the requested voltage output .
',ret:'either Y_OVERLOAD_FALSE or Y_OVERLOAD_TRUE, according to true if the device is not able to maintaint the requested voltage output',ext:'On failure, throws an exception or returns Y_OVERLOAD_INVALID.'}; doc['VSource']['get_regulationFailure']={syn:'Returns true if the voltage output is too high regarding the requested voltage .',lib:'vsource.get_regulationFailure()',pro:'function get_regulationFailure()',cmt:'Returns true if the voltage output is too high regarding the requested voltage .
',ret:'either Y_REGULATIONFAILURE_FALSE or Y_REGULATIONFAILURE_TRUE, according to true if the voltage output is too high regarding the requested voltage',ext:'On failure, throws an exception or returns Y_REGULATIONFAILURE_INVALID.'}; doc['VSource']['get_unit']={syn:'Returns the measuring unit for the voltage.',lib:'vsource.get_unit()',pro:'function get_unit()',cmt:'Returns the measuring unit for the voltage.
',ret:'a string corresponding to the measuring unit for the voltage',ext:'On failure, throws an exception or returns Y_UNIT_INVALID.'}; doc['VSource']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'vsource.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['VSource']['get_voltage']={syn:'Returns the voltage output command (mV) ',lib:'vsource.get_voltage()',pro:'function get_voltage()',cmt:'Returns the voltage output command (mV)
',ret:'an integer corresponding to the voltage output command (mV)',ext:'On failure, throws an exception or returns Y_VOLTAGE_INVALID.'}; doc['VSource']['isOnline']={syn:'Checks if the function is currently reachable, without raising any error.',lib:'vsource.isOnline()',pro:'function isOnline()',cmt:'Checks if the function is currently reachable, without raising any error. If there is a cached value for the function in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the requested function.
',ret:'true if the function can be reached, and false otherwise'}; doc['VSource']['isOnline_async']={syn:'Checks if the function is currently reachable, without raising any error (asynchronous version).',lib:'vsource.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the function is currently reachable, without raising any error (asynchronous version). If there is a cached value for the function in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 Firefox Javascript VM that does not implement context switching during blocking I/O calls.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['VSource']['load']={syn:'Preloads the function cache with a specified validity duration.',lib:'vsource.load()',pro:'function load(msValidity)',cmt:'Preloads the function cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['VSource']['load_async']={syn:'Preloads the function cache with a specified validity duration (asynchronous version).',lib:'vsource.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the function cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['VSource']['nextVSource']={syn:'Continues the enumeration of voltage sources started using yFirstVSource().',lib:'vsource.nextVSource()',pro:'function nextVSource()',cmt:'Continues the enumeration of voltage sources started using yFirstVSource().
',ret:'a pointer to a YVSource object, corresponding to a voltage source currently online, or a null pointer if there are no more voltage sources to enumerate.'}; doc['VSource']['pulse']={syn:'Sets device output to a specific volatage, for a specified duration, then brings it automatically to 0V.',lib:'vsource.pulse()',pro:'function pulse(voltage, ms_duration)',cmt:'Sets device output to a specific volatage, for a specified duration, then brings it automatically to 0V.
',par:{voltage:'pulse voltage, in millivolts',ms_duration:'pulse duration, in millisecondes'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['VSource']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'vsource.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['VSource']['set_logicalName']={syn:'Changes the logical name of the voltage source.',lib:'vsource.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the voltage source. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the voltage source'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['VSource']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'vsource.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['VSource']['set_voltage']={syn:'Tunes the device output voltage (milliVolts).',lib:'vsource.set_voltage()',pro:'function set_voltage(newval)',cmt:'Tunes the device output voltage (milliVolts).
',par:{newval:'an integer'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['VSource']['voltageMove']={syn:'Performs a smooth move at constant speed toward a given value.',lib:'vsource.voltageMove()',pro:'function voltageMove(target, ms_duration)',cmt:'Performs a smooth move at constant speed toward a given value.
',par:{target:'new output value at end of transition, in milliVolts.',ms_duration:'transition duration, in milliseconds'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['VSource']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'vsource.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing :'}; //--- (end of generated code: VSource) //--- (generated code: Network) doc['Network']={'':{syn:'Network function interface',inc:'<script type='text/javascript' src='yocto_network.js'></script>',cmt:'YNetwork objects provide access to TCP/IP parameters of Yoctopuce modules that include a built-in network interface.
'}}; doc['Network']['FindNetwork']={syn:'Retrieves a network interface for a given identifier.',lib:'YNetwork.FindNetwork()',pro:'function FindNetwork(func)',cmt:'Retrieves a network interface for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of network interfaces currently accessible. Use the method YNetwork.nextNetwork() to iterate on next network interfaces.
',ret:'a pointer to a YNetwork object, corresponding to the first network interface currently online, or a null pointer if there are none.'}; doc['Network']['callbackLogin']={syn:'Connects to the notification callback and saves the credentials required to log into it.',lib:'network.callbackLogin()',pro:'function callbackLogin(username, password)',cmt:'Connects to the notification callback and saves the credentials required to log into it. The password is not stored into the module, only a hashed copy of the credentials are saved. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{username:'username required to log to the callback',password:'password required to log to the callback'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['describe']={syn:'Returns a short text that describes the network interface in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'network.describe()',pro:'function describe()',cmt:'Returns a short text that describes the network interface in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the network interface (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['Network']['get_adminPassword']={syn:'Returns a hash string if a password has been set for user \x22admin\x22, or an empty string otherwise.',lib:'network.get_adminPassword()',pro:'function get_adminPassword()',cmt:'Returns a hash string if a password has been set for user \x22admin\x22, or an empty string otherwise.
',ret:'a string corresponding to a hash string if a password has been set for user \x22admin\x22, or an empty string otherwise',ext:'On failure, throws an exception or returns Y_ADMINPASSWORD_INVALID.'}; doc['Network']['get_advertisedValue']={syn:'Returns the current value of the network interface (no more than 6 characters).',lib:'network.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the network interface (no more than 6 characters).
',ret:'a string corresponding to the current value of the network interface (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['Network']['get_callbackCredentials']={syn:'Returns a hashed version of the notification callback credentials if set, or an empty string otherwise.',lib:'network.get_callbackCredentials()',pro:'function get_callbackCredentials()',cmt:'Returns a hashed version of the notification callback credentials if set, or an empty string otherwise.
',ret:'a string corresponding to a hashed version of the notification callback credentials if set, or an empty string otherwise',ext:'On failure, throws an exception or returns Y_CALLBACKCREDENTIALS_INVALID.'}; doc['Network']['get_callbackEncoding']={syn:'Returns the encoding standard to use for representing notification values.',lib:'network.get_callbackEncoding()',pro:'function get_callbackEncoding()',cmt:'Returns the encoding standard to use for representing notification values.
',ret:'a value among Y_CALLBACKENCODING_FORM, Y_CALLBACKENCODING_JSON, Y_CALLBACKENCODING_JSON_ARRAY, Y_CALLBACKENCODING_CSV and Y_CALLBACKENCODING_YOCTO_API corresponding to the encoding standard to use for representing notification values',ext:'On failure, throws an exception or returns Y_CALLBACKENCODING_INVALID.'}; doc['Network']['get_callbackMaxDelay']={syn:'Returns the maximum waiting time between two callback notifications, in seconds.',lib:'network.get_callbackMaxDelay()',pro:'function get_callbackMaxDelay()',cmt:'Returns the maximum waiting time between two callback notifications, in seconds.
',ret:'an integer corresponding to the maximum waiting time between two callback notifications, in seconds',ext:'On failure, throws an exception or returns Y_CALLBACKMAXDELAY_INVALID.'}; doc['Network']['get_callbackMethod']={syn:'Returns the HTTP method used to notify callbacks for significant state changes.',lib:'network.get_callbackMethod()',pro:'function get_callbackMethod()',cmt:'Returns the HTTP method used to notify callbacks for significant state changes.
',ret:'a value among Y_CALLBACKMETHOD_POST, Y_CALLBACKMETHOD_GET and Y_CALLBACKMETHOD_PUT corresponding to the HTTP method used to notify callbacks for significant state changes',ext:'On failure, throws an exception or returns Y_CALLBACKMETHOD_INVALID.'}; doc['Network']['get_callbackMinDelay']={syn:'Returns the minimum waiting time between two callback notifications, in seconds.',lib:'network.get_callbackMinDelay()',pro:'function get_callbackMinDelay()',cmt:'Returns the minimum waiting time between two callback notifications, in seconds.
',ret:'an integer corresponding to the minimum waiting time between two callback notifications, in seconds',ext:'On failure, throws an exception or returns Y_CALLBACKMINDELAY_INVALID.'}; doc['Network']['get_callbackUrl']={syn:'Returns the callback URL to notify of significant state changes.',lib:'network.get_callbackUrl()',pro:'function get_callbackUrl()',cmt:'Returns the callback URL to notify of significant state changes.
',ret:'a string corresponding to the callback URL to notify of significant state changes',ext:'On failure, throws an exception or returns Y_CALLBACKURL_INVALID.'}; doc['Network']['get_discoverable']={syn:'Returns the activation state of the multicast announce protocols to allow easy discovery of the module in the network neighborhood (uPnP/Bonjour protocol).',lib:'network.get_discoverable()',pro:'function get_discoverable()',cmt:'Returns the activation state of the multicast announce protocols to allow easy discovery of the module in the network neighborhood (uPnP/Bonjour protocol).
',ret:'either Y_DISCOVERABLE_FALSE or Y_DISCOVERABLE_TRUE, according to the activation state of the multicast announce protocols to allow easy discovery of the module in the network neighborhood (uPnP/Bonjour protocol)',ext:'On failure, throws an exception or returns Y_DISCOVERABLE_INVALID.'}; doc['Network']['get_errorMessage']={syn:'Returns the error message of the latest error with the network interface.',lib:'network.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the network interface. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the network interface object'}; doc['Network']['get_errorType']={syn:'Returns the numerical error code of the latest error with the network interface.',lib:'network.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the network interface. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the network interface object'}; doc['Network']['get_friendlyName']={syn:'Returns a global identifier of the network interface in the format MODULE_NAME.FUNCTION_NAME.',lib:'network.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the network interface in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the network interface if they are defined, otherwise the serial number of the module and the hardware identifier of the network interface (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the network interface using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['Network']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'network.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['Network']['get_functionId']={syn:'Returns the hardware identifier of the network interface, without reference to the module.',lib:'network.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the network interface, without reference to the module. For example relay1
',ret:'a string that identifies the network interface (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['Network']['get_hardwareId']={syn:'Returns the unique hardware identifier of the network interface in the form SERIAL.FUNCTIONID.',lib:'network.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the network interface in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the network interface. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the network interface (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['Network']['get_ipAddress']={syn:'Returns the IP address currently in use by the device.',lib:'network.get_ipAddress()',pro:'function get_ipAddress()',cmt:'Returns the IP address currently in use by the device. The address may have been configured statically, or provided by a DHCP server.
',ret:'a string corresponding to the IP address currently in use by the device',ext:'On failure, throws an exception or returns Y_IPADDRESS_INVALID.'}; doc['Network']['get_logicalName']={syn:'Returns the logical name of the network interface.',lib:'network.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the network interface.
',ret:'a string corresponding to the logical name of the network interface. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['Network']['get_macAddress']={syn:'Returns the MAC address of the network interface.',lib:'network.get_macAddress()',pro:'function get_macAddress()',cmt:'Returns the MAC address of the network interface. The MAC address is also available on a sticker on the module, in both numeric and barcode forms.
',ret:'a string corresponding to the MAC address of the network interface',ext:'On failure, throws an exception or returns Y_MACADDRESS_INVALID.'}; doc['Network']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'network.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['Network']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'network.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Network']['get_poeCurrent']={syn:'Returns the current consumed by the module from Power-over-Ethernet (PoE), in milli-amps.',lib:'network.get_poeCurrent()',pro:'function get_poeCurrent()',cmt:'Returns the current consumed by the module from Power-over-Ethernet (PoE), in milli-amps. The current consumption is measured after converting PoE source to 5 Volt, and should never exceed 1800 mA.
',ret:'an integer corresponding to the current consumed by the module from Power-over-Ethernet (PoE), in milli-amps',ext:'On failure, throws an exception or returns Y_POECURRENT_INVALID.'}; doc['Network']['get_primaryDNS']={syn:'Returns the IP address of the primary name server to be used by the module.',lib:'network.get_primaryDNS()',pro:'function get_primaryDNS()',cmt:'Returns the IP address of the primary name server to be used by the module.
',ret:'a string corresponding to the IP address of the primary name server to be used by the module',ext:'On failure, throws an exception or returns Y_PRIMARYDNS_INVALID.'}; doc['Network']['get_readiness']={syn:'Returns the current established working mode of the network interface.',lib:'network.get_readiness()',pro:'function get_readiness()',cmt:'Returns the current established working mode of the network interface. Level zero (DOWN_0) means that no hardware link has been detected. Either there is no signal on the network cable, or the selected wireless access point cannot be detected. Level 1 (LIVE_1) is reached when the network is detected, but is not yet connected. For a wireless network, this shows that the requested SSID is present. Level 2 (LINK_2) is reached when the hardware connection is established. For a wired network connection, level 2 means that the cable is attached at both ends. For a connection to a wireless access point, it shows that the security parameters are properly configured. For an ad-hoc wireless connection, it means that there is at least one other device connected on the ad-hoc network. Level 3 (DHCP_3) is reached when an IP address has been obtained using DHCP. Level 4 (DNS_4) is reached when the DNS server is reachable on the network. Level 5 (WWW_5) is reached when global connectivity is demonstrated by properly loading the current time from an NTP server.
',ret:'a value among Y_READINESS_DOWN, Y_READINESS_EXISTS, Y_READINESS_LINKED, Y_READINESS_LAN_OK and Y_READINESS_WWW_OK corresponding to the current established working mode of the network interface',ext:'On failure, throws an exception or returns Y_READINESS_INVALID.'}; doc['Network']['get_router']={syn:'Returns the IP address of the router on the device subnet (default gateway).',lib:'network.get_router()',pro:'function get_router()',cmt:'Returns the IP address of the router on the device subnet (default gateway).
',ret:'a string corresponding to the IP address of the router on the device subnet (default gateway)',ext:'On failure, throws an exception or returns Y_ROUTER_INVALID.'}; doc['Network']['get_secondaryDNS']={syn:'Returns the IP address of the secondary name server to be used by the module.',lib:'network.get_secondaryDNS()',pro:'function get_secondaryDNS()',cmt:'Returns the IP address of the secondary name server to be used by the module.
',ret:'a string corresponding to the IP address of the secondary name server to be used by the module',ext:'On failure, throws an exception or returns Y_SECONDARYDNS_INVALID.'}; doc['Network']['get_subnetMask']={syn:'Returns the subnet mask currently used by the device.',lib:'network.get_subnetMask()',pro:'function get_subnetMask()',cmt:'Returns the subnet mask currently used by the device.
',ret:'a string corresponding to the subnet mask currently used by the device',ext:'On failure, throws an exception or returns Y_SUBNETMASK_INVALID.'}; doc['Network']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'network.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['Network']['get_userPassword']={syn:'Returns a hash string if a password has been set for \x22user\x22 user, or an empty string otherwise.',lib:'network.get_userPassword()',pro:'function get_userPassword()',cmt:'Returns a hash string if a password has been set for \x22user\x22 user, or an empty string otherwise.
',ret:'a string corresponding to a hash string if a password has been set for \x22user\x22 user, or an empty string otherwise',ext:'On failure, throws an exception or returns Y_USERPASSWORD_INVALID.'}; doc['Network']['get_wwwWatchdogDelay']={syn:'Returns the allowed downtime of the WWW link (in seconds) before triggering an automated reboot to try to recover Internet connectivity.',lib:'network.get_wwwWatchdogDelay()',pro:'function get_wwwWatchdogDelay()',cmt:'Returns the allowed downtime of the WWW link (in seconds) before triggering an automated reboot to try to recover Internet connectivity. A zero value disables automated reboot in case of Internet connectivity loss.
',ret:'an integer corresponding to the allowed downtime of the WWW link (in seconds) before triggering an automated reboot to try to recover Internet connectivity',ext:'On failure, throws an exception or returns Y_WWWWATCHDOGDELAY_INVALID.'}; doc['Network']['isOnline']={syn:'Checks if the network interface is currently reachable, without raising any error.',lib:'network.isOnline()',pro:'function isOnline()',cmt:'Checks if the network interface is currently reachable, without raising any error. If there is a cached value for the network interface in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the network interface.
',ret:'true if the network interface can be reached, and false otherwise'}; doc['Network']['isOnline_async']={syn:'Checks if the network interface is currently reachable, without raising any error (asynchronous version).',lib:'network.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the network interface is currently reachable, without raising any error (asynchronous version). If there is a cached value for the network interface in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Network']['load']={syn:'Preloads the network interface cache with a specified validity duration.',lib:'network.load()',pro:'function load(msValidity)',cmt:'Preloads the network interface cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Network']['load_async']={syn:'Preloads the network interface cache with a specified validity duration (asynchronous version).',lib:'network.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the network interface cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Network']['nextNetwork']={syn:'Continues the enumeration of network interfaces started using yFirstNetwork().',lib:'network.nextNetwork()',pro:'function nextNetwork()',cmt:'Continues the enumeration of network interfaces started using yFirstNetwork().
',ret:'a pointer to a YNetwork object, corresponding to a network interface currently online, or a null pointer if there are no more network interfaces to enumerate.'}; doc['Network']['ping']={syn:'Pings str_host to test the network connectivity.',lib:'network.ping()',pro:'function ping(host)',cmt:'Pings str_host to test the network connectivity. Sends four ICMP ECHO_REQUEST requests from the module to the target str_host. This method returns a string with the result of the 4 ICMP ECHO_REQUEST requests.
',par:{host:'the hostname or the IP address of the target'},ret:'a string with the result of the ping.'}; doc['Network']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'network.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['Network']['set_adminPassword']={syn:'Changes the password for the \x22admin\x22 user.',lib:'network.set_adminPassword()',pro:'function set_adminPassword(newval)',cmt:'Changes the password for the \x22admin\x22 user. This password becomes instantly required to perform any change of the module state. If the specified value is an empty string, a password is not required anymore. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the password for the \x22admin\x22 user'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_callbackCredentials']={syn:'Changes the credentials required to connect to the callback address.',lib:'network.set_callbackCredentials()',pro:'function set_callbackCredentials(newval)',cmt:'Changes the credentials required to connect to the callback address. The credentials must be provided as returned by function get_callbackCredentials, in the form username:hash. The method used to compute the hash varies according to the the authentication scheme implemented by the callback, For Basic authentication, the hash is the MD5 of the string username:password. For Digest authentication, the hash is the MD5 of the string username:realm:password. For a simpler way to configure callback credentials, use function callbackLogin instead. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the credentials required to connect to the callback address'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_callbackEncoding']={syn:'Changes the encoding standard to use for representing notification values.',lib:'network.set_callbackEncoding()',pro:'function set_callbackEncoding(newval)',cmt:'Changes the encoding standard to use for representing notification values.
',par:{newval:'a value among Y_CALLBACKENCODING_FORM, Y_CALLBACKENCODING_JSON, Y_CALLBACKENCODING_JSON_ARRAY, Y_CALLBACKENCODING_CSV and Y_CALLBACKENCODING_YOCTO_API corresponding to the encoding standard to use for representing notification values'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_callbackMaxDelay']={syn:'Changes the maximum waiting time between two callback notifications, in seconds.',lib:'network.set_callbackMaxDelay()',pro:'function set_callbackMaxDelay(newval)',cmt:'Changes the maximum waiting time between two callback notifications, in seconds.
',par:{newval:'an integer corresponding to the maximum waiting time between two callback notifications, in seconds'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_callbackMethod']={syn:'Changes the HTTP method used to notify callbacks for significant state changes.',lib:'network.set_callbackMethod()',pro:'function set_callbackMethod(newval)',cmt:'Changes the HTTP method used to notify callbacks for significant state changes.
',par:{newval:'a value among Y_CALLBACKMETHOD_POST, Y_CALLBACKMETHOD_GET and Y_CALLBACKMETHOD_PUT corresponding to the HTTP method used to notify callbacks for significant state changes'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_callbackMinDelay']={syn:'Changes the minimum waiting time between two callback notifications, in seconds.',lib:'network.set_callbackMinDelay()',pro:'function set_callbackMinDelay(newval)',cmt:'Changes the minimum waiting time between two callback notifications, in seconds.
',par:{newval:'an integer corresponding to the minimum waiting time between two callback notifications, in seconds'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_callbackUrl']={syn:'Changes the callback URL to notify significant state changes.',lib:'network.set_callbackUrl()',pro:'function set_callbackUrl(newval)',cmt:'Changes the callback URL to notify significant state changes. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the callback URL to notify significant state changes'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_discoverable']={syn:'Changes the activation state of the multicast announce protocols to allow easy discovery of the module in the network neighborhood (uPnP/Bonjour protocol).',lib:'network.set_discoverable()',pro:'function set_discoverable(newval)',cmt:'Changes the activation state of the multicast announce protocols to allow easy discovery of the module in the network neighborhood (uPnP/Bonjour protocol).
',par:{newval:'either Y_DISCOVERABLE_FALSE or Y_DISCOVERABLE_TRUE, according to the activation state of the multicast announce protocols to allow easy discovery of the module in the network neighborhood (uPnP/Bonjour protocol)'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_logicalName']={syn:'Changes the logical name of the network interface.',lib:'network.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the network interface. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the network interface.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_primaryDNS']={syn:'Changes the IP address of the primary name server to be used by the module.',lib:'network.set_primaryDNS()',pro:'function set_primaryDNS(newval)',cmt:'Changes the IP address of the primary name server to be used by the module. When using DHCP, if a value is specified, it overrides the value received from the DHCP server. Remember to call the saveToFlash() method and then to reboot the module to apply this setting.
',par:{newval:'a string corresponding to the IP address of the primary name server to be used by the module'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_secondaryDNS']={syn:'Changes the IP address of the secondary name server to be used by the module.',lib:'network.set_secondaryDNS()',pro:'function set_secondaryDNS(newval)',cmt:'Changes the IP address of the secondary name server to be used by the module. When using DHCP, if a value is specified, it overrides the value received from the DHCP server. Remember to call the saveToFlash() method and then to reboot the module to apply this setting.
',par:{newval:'a string corresponding to the IP address of the secondary name server to be used by the module'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'network.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['Network']['set_userPassword']={syn:'Changes the password for the \x22user\x22 user.',lib:'network.set_userPassword()',pro:'function set_userPassword(newval)',cmt:'Changes the password for the \x22user\x22 user. This password becomes instantly required to perform any use of the module. If the specified value is an empty string, a password is not required anymore. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the password for the \x22user\x22 user'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['set_wwwWatchdogDelay']={syn:'Changes the allowed downtime of the WWW link (in seconds) before triggering an automated reboot to try to recover Internet connectivity.',lib:'network.set_wwwWatchdogDelay()',pro:'function set_wwwWatchdogDelay(newval)',cmt:'Changes the allowed downtime of the WWW link (in seconds) before triggering an automated reboot to try to recover Internet connectivity. A zero value disables automated reboot in case of Internet connectivity loss. The smallest valid non-zero timeout is 90 seconds.
',par:{newval:'an integer corresponding to the allowed downtime of the WWW link (in seconds) before triggering an automated reboot to try to recover Internet connectivity'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['useDHCP']={syn:'Changes the configuration of the network interface to enable the use of an IP address received from a DHCP server.',lib:'network.useDHCP()',pro:'function useDHCP(fallbackIpAddr, fallbackSubnetMaskLen, fallbackRouter)',cmt:'Changes the configuration of the network interface to enable the use of an IP address received from a DHCP server. Until an address is received from a DHCP server, the module uses the IP parameters specified to this function. Remember to call the saveToFlash() method and then to reboot the module to apply this setting.
',par:{fallbackIpAddr:'fallback IP address, to be used when no DHCP reply is received',fallbackSubnetMaskLen:'fallback subnet mask length when no DHCP reply is received, as an integer (eg. 24 means 255.255.255.0)',fallbackRouter:'fallback router IP address, to be used when no DHCP reply is received'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['useStaticIP']={syn:'Changes the configuration of the network interface to use a static IP address.',lib:'network.useStaticIP()',pro:'function useStaticIP(ipAddress, subnetMaskLen, router)',cmt:'Changes the configuration of the network interface to use a static IP address. Remember to call the saveToFlash() method and then to reboot the module to apply this setting.
',par:{ipAddress:'device IP address',subnetMaskLen:'subnet mask length, as an integer (eg. 24 means 255.255.255.0)',router:'router IP address (default gateway)'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Network']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'network.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: Network) //--- (generated code: Wireless) doc['Wireless']={'':{syn:'Wireless function interface',inc:'<script type='text/javascript' src='yocto_wireless.js'></script>',cmt:'YWireless functions provides control over wireless network parameters and status for devices that are wireless-enabled.
'}}; doc['Wireless']['FindWireless']={syn:'Retrieves a wireless lan interface for a given identifier.',lib:'YWireless.FindWireless()',pro:'function FindWireless(func)',cmt:'Retrieves a wireless lan interface for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of wireless lan interfaces currently accessible. Use the method YWireless.nextWireless() to iterate on next wireless lan interfaces.
',ret:'a pointer to a YWireless object, corresponding to the first wireless lan interface currently online, or a null pointer if there are none.'}; doc['Wireless']['adhocNetwork']={syn:'Changes the configuration of the wireless lan interface to create an ad-hoc wireless network, without using an access point.',lib:'wireless.adhocNetwork()',pro:'function adhocNetwork(ssid, securityKey)',cmt:'Changes the configuration of the wireless lan interface to create an ad-hoc wireless network, without using an access point. If a security key is specified, the network is protected by WEP128, since WPA is not standardized for ad-hoc networks. Remember to call the saveToFlash() method and then to reboot the module to apply this setting.
',par:{ssid:'the name of the network to connect to',securityKey:'the network key, as a character string'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Wireless']['describe']={syn:'Returns a short text that describes the wireless lan interface in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'wireless.describe()',pro:'function describe()',cmt:'Returns a short text that describes the wireless lan interface in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the wireless lan interface (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['Wireless']['get_advertisedValue']={syn:'Returns the current value of the wireless lan interface (no more than 6 characters).',lib:'wireless.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the wireless lan interface (no more than 6 characters).
',ret:'a string corresponding to the current value of the wireless lan interface (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['Wireless']['get_channel']={syn:'Returns the 802.11 channel currently used, or 0 when the selected network has not been found.',lib:'wireless.get_channel()',pro:'function get_channel()',cmt:'Returns the 802.11 channel currently used, or 0 when the selected network has not been found.
',ret:'an integer corresponding to the 802.11 channel currently used, or 0 when the selected network has not been found',ext:'On failure, throws an exception or returns Y_CHANNEL_INVALID.'}; doc['Wireless']['get_detectedWlans']={syn:'Returns a list of YWlanRecord objects that describe detected Wireless networks.',lib:'wireless.get_detectedWlans()',pro:'function get_detectedWlans()',cmt:'Returns a list of YWlanRecord objects that describe detected Wireless networks. This list is not updated when the module is already connected to an acces point (infrastructure mode). To force an update of this list, adhocNetwork() must be called to disconnect the module from the current network. The returned list must be unallocated by the caller.
',ret:'a list of YWlanRecord objects, containing the SSID, channel, link quality and the type of security of the wireless network.',ext:'On failure, throws an exception or returns an empty list.'}; doc['Wireless']['get_errorMessage']={syn:'Returns the error message of the latest error with the wireless lan interface.',lib:'wireless.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the wireless lan interface. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the wireless lan interface object'}; doc['Wireless']['get_errorType']={syn:'Returns the numerical error code of the latest error with the wireless lan interface.',lib:'wireless.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the wireless lan interface. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the wireless lan interface object'}; doc['Wireless']['get_friendlyName']={syn:'Returns a global identifier of the wireless lan interface in the format MODULE_NAME.FUNCTION_NAME.',lib:'wireless.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the wireless lan interface in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the wireless lan interface if they are defined, otherwise the serial number of the module and the hardware identifier of the wireless lan interface (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the wireless lan interface using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['Wireless']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'wireless.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['Wireless']['get_functionId']={syn:'Returns the hardware identifier of the wireless lan interface, without reference to the module.',lib:'wireless.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the wireless lan interface, without reference to the module. For example relay1
',ret:'a string that identifies the wireless lan interface (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['Wireless']['get_hardwareId']={syn:'Returns the unique hardware identifier of the wireless lan interface in the form SERIAL.FUNCTIONID.',lib:'wireless.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the wireless lan interface in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the wireless lan interface. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the wireless lan interface (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['Wireless']['get_linkQuality']={syn:'Returns the link quality, expressed in percent.',lib:'wireless.get_linkQuality()',pro:'function get_linkQuality()',cmt:'Returns the link quality, expressed in percent.
',ret:'an integer corresponding to the link quality, expressed in percent',ext:'On failure, throws an exception or returns Y_LINKQUALITY_INVALID.'}; doc['Wireless']['get_logicalName']={syn:'Returns the logical name of the wireless lan interface.',lib:'wireless.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the wireless lan interface.
',ret:'a string corresponding to the logical name of the wireless lan interface. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['Wireless']['get_message']={syn:'Returns the latest status message from the wireless interface.',lib:'wireless.get_message()',pro:'function get_message()',cmt:'Returns the latest status message from the wireless interface.
',ret:'a string corresponding to the latest status message from the wireless interface',ext:'On failure, throws an exception or returns Y_MESSAGE_INVALID.'}; doc['Wireless']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'wireless.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['Wireless']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'wireless.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Wireless']['get_security']={syn:'Returns the security algorithm used by the selected wireless network.',lib:'wireless.get_security()',pro:'function get_security()',cmt:'Returns the security algorithm used by the selected wireless network.
',ret:'a value among Y_SECURITY_UNKNOWN, Y_SECURITY_OPEN, Y_SECURITY_WEP, Y_SECURITY_WPA and Y_SECURITY_WPA2 corresponding to the security algorithm used by the selected wireless network',ext:'On failure, throws an exception or returns Y_SECURITY_INVALID.'}; doc['Wireless']['get_ssid']={syn:'Returns the wireless network name (SSID).',lib:'wireless.get_ssid()',pro:'function get_ssid()',cmt:'Returns the wireless network name (SSID).
',ret:'a string corresponding to the wireless network name (SSID)',ext:'On failure, throws an exception or returns Y_SSID_INVALID.'}; doc['Wireless']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'wireless.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['Wireless']['isOnline']={syn:'Checks if the wireless lan interface is currently reachable, without raising any error.',lib:'wireless.isOnline()',pro:'function isOnline()',cmt:'Checks if the wireless lan interface is currently reachable, without raising any error. If there is a cached value for the wireless lan interface in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the wireless lan interface.
',ret:'true if the wireless lan interface can be reached, and false otherwise'}; doc['Wireless']['isOnline_async']={syn:'Checks if the wireless lan interface is currently reachable, without raising any error (asynchronous version).',lib:'wireless.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the wireless lan interface is currently reachable, without raising any error (asynchronous version). If there is a cached value for the wireless lan interface in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Wireless']['joinNetwork']={syn:'Changes the configuration of the wireless lan interface to connect to an existing access point (infrastructure mode).',lib:'wireless.joinNetwork()',pro:'function joinNetwork(ssid, securityKey)',cmt:'Changes the configuration of the wireless lan interface to connect to an existing access point (infrastructure mode). Remember to call the saveToFlash() method and then to reboot the module to apply this setting.
',par:{ssid:'the name of the network to connect to',securityKey:'the network key, as a character string'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Wireless']['load']={syn:'Preloads the wireless lan interface cache with a specified validity duration.',lib:'wireless.load()',pro:'function load(msValidity)',cmt:'Preloads the wireless lan interface cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Wireless']['load_async']={syn:'Preloads the wireless lan interface cache with a specified validity duration (asynchronous version).',lib:'wireless.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the wireless lan interface cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Wireless']['nextWireless']={syn:'Continues the enumeration of wireless lan interfaces started using yFirstWireless().',lib:'wireless.nextWireless()',pro:'function nextWireless()',cmt:'Continues the enumeration of wireless lan interfaces started using yFirstWireless().
',ret:'a pointer to a YWireless object, corresponding to a wireless lan interface currently online, or a null pointer if there are no more wireless lan interfaces to enumerate.'}; doc['Wireless']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'wireless.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['Wireless']['set_logicalName']={syn:'Changes the logical name of the wireless lan interface.',lib:'wireless.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the wireless lan interface. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the wireless lan interface.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Wireless']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'wireless.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['Wireless']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'wireless.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: Wireless) //--- (generated code: Voc) doc['Voc']={'':{syn:'Voc function interface',inc:'<script type='text/javascript' src='yocto_voc.js'></script>',cmt:'The Yoctopuce application programming interface allows you to read an instant measure of the sensor, as well as the minimal and maximal values observed.
'}}; doc['Voc']['FindVoc']={syn:'Retrieves a Volatile Organic Compound sensor for a given identifier.',lib:'YVoc.FindVoc()',pro:'function FindVoc(func)',cmt:'Retrieves a Volatile Organic Compound sensor for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of Volatile Organic Compound sensors currently accessible. Use the method YVoc.nextVoc() to iterate on next Volatile Organic Compound sensors.
',ret:'a pointer to a YVoc object, corresponding to the first Volatile Organic Compound sensor currently online, or a null pointer if there are none.'}; doc['Voc']['calibrateFromPoints']={syn:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure.',lib:'voc.calibrateFromPoints()',pro:'function calibrateFromPoints(rawValues, refValues)',cmt:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure. It is possible to configure up to five correction points. Correction points must be provided in ascending order, and be in the range of the sensor. The device will automatically perform a linear interpolation of the error correction between specified points. Remember to call the saveToFlash() method of the module if the modification must be kept.
For more information on advanced capabilities to refine the calibration of sensors, please contact support
',par:{rawValues:'array of floating point numbers, corresponding to the raw values returned by the sensor for the correction points.',refValues:'array of floating point numbers, corresponding to the corrected values for the correction points.'}}; doc['Voc']['describe']={syn:'Returns a short text that describes the Volatile Organic Compound sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'voc.describe()',pro:'function describe()',cmt:'Returns a short text that describes the Volatile Organic Compound sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the Volatile Organic Compound sensor (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['Voc']['get_advertisedValue']={syn:'Returns the current value of the Volatile Organic Compound sensor (no more than 6 characters).',lib:'voc.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the Volatile Organic Compound sensor (no more than 6 characters).
',ret:'a string corresponding to the current value of the Volatile Organic Compound sensor (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['Voc']['get_currentRawValue']={syn:'Returns the unrounded and uncalibrated raw value returned by the sensor.',lib:'voc.get_currentRawValue()',pro:'function get_currentRawValue()',cmt:'Returns the unrounded and uncalibrated raw value returned by the sensor.
',ret:'a floating point number corresponding to the unrounded and uncalibrated raw value returned by the sensor',ext:'On failure, throws an exception or returns Y_CURRENTRAWVALUE_INVALID.'}; doc['Voc']['get_currentValue']={syn:'Returns the current measured value.',lib:'voc.get_currentValue()',pro:'function get_currentValue()',cmt:'Returns the current measured value.
',ret:'a floating point number corresponding to the current measured value',ext:'On failure, throws an exception or returns Y_CURRENTVALUE_INVALID.'}; doc['Voc']['get_errorMessage']={syn:'Returns the error message of the latest error with the Volatile Organic Compound sensor.',lib:'voc.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the Volatile Organic Compound sensor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the Volatile Organic Compound sensor object'}; doc['Voc']['get_errorType']={syn:'Returns the numerical error code of the latest error with the Volatile Organic Compound sensor.',lib:'voc.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the Volatile Organic Compound sensor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the Volatile Organic Compound sensor object'}; doc['Voc']['get_friendlyName']={syn:'Returns a global identifier of the Volatile Organic Compound sensor in the format MODULE_NAME.FUNCTION_NAME.',lib:'voc.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the Volatile Organic Compound sensor in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the Volatile Organic Compound sensor if they are defined, otherwise the serial number of the module and the hardware identifier of the Volatile Organic Compound sensor (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the Volatile Organic Compound sensor using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['Voc']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'voc.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['Voc']['get_functionId']={syn:'Returns the hardware identifier of the Volatile Organic Compound sensor, without reference to the module.',lib:'voc.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the Volatile Organic Compound sensor, without reference to the module. For example relay1
',ret:'a string that identifies the Volatile Organic Compound sensor (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['Voc']['get_hardwareId']={syn:'Returns the unique hardware identifier of the Volatile Organic Compound sensor in the form SERIAL.FUNCTIONID.',lib:'voc.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the Volatile Organic Compound sensor in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the Volatile Organic Compound sensor. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the Volatile Organic Compound sensor (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['Voc']['get_highestValue']={syn:'Returns the maximal value observed.',lib:'voc.get_highestValue()',pro:'function get_highestValue()',cmt:'Returns the maximal value observed.
',ret:'a floating point number corresponding to the maximal value observed',ext:'On failure, throws an exception or returns Y_HIGHESTVALUE_INVALID.'}; doc['Voc']['get_logFrequency']={syn:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.',lib:'voc.get_logFrequency()',pro:'function get_logFrequency()',cmt:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.
',ret:'a string corresponding to the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory',ext:'On failure, throws an exception or returns Y_LOGFREQUENCY_INVALID.'}; doc['Voc']['get_logicalName']={syn:'Returns the logical name of the Volatile Organic Compound sensor.',lib:'voc.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the Volatile Organic Compound sensor.
',ret:'a string corresponding to the logical name of the Volatile Organic Compound sensor. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['Voc']['get_lowestValue']={syn:'Returns the minimal value observed.',lib:'voc.get_lowestValue()',pro:'function get_lowestValue()',cmt:'Returns the minimal value observed.
',ret:'a floating point number corresponding to the minimal value observed',ext:'On failure, throws an exception or returns Y_LOWESTVALUE_INVALID.'}; doc['Voc']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'voc.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['Voc']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'voc.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Voc']['get_recordedData']={syn:'Retrieves a DataSet object holding historical data for this sensor, for a specified time interval.',lib:'voc.get_recordedData()',pro:'function get_recordedData(startTime, endTime)',cmt:'Retrieves a DataSet object holding historical data for this sensor, for a specified time interval. The measures will be retrieved from the data logger, which must have been turned on at the desired time. See the documentation of the DataSet class for information on how to get an overview of the recorded data, and how to load progressively a large set of measures from the data logger.
This function only works if the device uses a recent firmware, as DataSet objects are not supported by firmwares older than version 13000.
',par:{startTime:'the start of the desired measure time interval, as a Unix timestamp, i.e. the number of seconds since January 1, 1970 UTC. The special value 0 can be used to include any meaasure, without initial limit.',endTime:'the end of the desired measure time interval, as a Unix timestamp, i.e. the number of seconds since January 1, 1970 UTC. The special value 0 can be used to include any meaasure, without ending limit.'},ret:'an instance of YDataSet, providing access to historical data. Past measures can be loaded progressively using methods from the YDataSet object.'}; doc['Voc']['get_reportFrequency']={syn:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.',lib:'voc.get_reportFrequency()',pro:'function get_reportFrequency()',cmt:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.
',ret:'a string corresponding to the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function',ext:'On failure, throws an exception or returns Y_REPORTFREQUENCY_INVALID.'}; doc['Voc']['get_resolution']={syn:'Returns the resolution of the measured values.',lib:'voc.get_resolution()',pro:'function get_resolution()',cmt:'Returns the resolution of the measured values. The resolution corresponds to the numerical precision of the measures, which is not always the same as the actual precision of the sensor.
',ret:'a floating point number corresponding to the resolution of the measured values',ext:'On failure, throws an exception or returns Y_RESOLUTION_INVALID.'}; doc['Voc']['get_unit']={syn:'Returns the measuring unit for the measured value.',lib:'voc.get_unit()',pro:'function get_unit()',cmt:'Returns the measuring unit for the measured value.
',ret:'a string corresponding to the measuring unit for the measured value',ext:'On failure, throws an exception or returns Y_UNIT_INVALID.'}; doc['Voc']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'voc.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['Voc']['isOnline']={syn:'Checks if the Volatile Organic Compound sensor is currently reachable, without raising any error.',lib:'voc.isOnline()',pro:'function isOnline()',cmt:'Checks if the Volatile Organic Compound sensor is currently reachable, without raising any error. If there is a cached value for the Volatile Organic Compound sensor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the Volatile Organic Compound sensor.
',ret:'true if the Volatile Organic Compound sensor can be reached, and false otherwise'}; doc['Voc']['isOnline_async']={syn:'Checks if the Volatile Organic Compound sensor is currently reachable, without raising any error (asynchronous version).',lib:'voc.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the Volatile Organic Compound sensor is currently reachable, without raising any error (asynchronous version). If there is a cached value for the Volatile Organic Compound sensor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Voc']['load']={syn:'Preloads the Volatile Organic Compound sensor cache with a specified validity duration.',lib:'voc.load()',pro:'function load(msValidity)',cmt:'Preloads the Volatile Organic Compound sensor cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Voc']['loadCalibrationPoints']={syn:'Retrieves error correction data points previously entered using the method calibrateFromPoints.',lib:'voc.loadCalibrationPoints()',pro:'function loadCalibrationPoints(rawValues, refValues)',cmt:'Retrieves error correction data points previously entered using the method calibrateFromPoints.
',par:{rawValues:'array of floating point numbers, that will be filled by the function with the raw sensor values for the correction points.',refValues:'array of floating point numbers, that will be filled by the function with the desired values for the correction points.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Voc']['load_async']={syn:'Preloads the Volatile Organic Compound sensor cache with a specified validity duration (asynchronous version).',lib:'voc.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the Volatile Organic Compound sensor cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Voc']['nextVoc']={syn:'Continues the enumeration of Volatile Organic Compound sensors started using yFirstVoc().',lib:'voc.nextVoc()',pro:'function nextVoc()',cmt:'Continues the enumeration of Volatile Organic Compound sensors started using yFirstVoc().
',ret:'a pointer to a YVoc object, corresponding to a Volatile Organic Compound sensor currently online, or a null pointer if there are no more Volatile Organic Compound sensors to enumerate.'}; doc['Voc']['registerTimedReportCallback']={syn:'Registers the callback function that is invoked on every periodic timed notification.',lib:'voc.registerTimedReportCallback()',pro:'function registerTimedReportCallback(callback)',cmt:'Registers the callback function that is invoked on every periodic timed notification. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and an YMeasure object describing the new advertised value.'}}; doc['Voc']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'voc.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['Voc']['set_highestValue']={syn:'Changes the recorded maximal value observed.',lib:'voc.set_highestValue()',pro:'function set_highestValue(newval)',cmt:'Changes the recorded maximal value observed.
',par:{newval:'a floating point number corresponding to the recorded maximal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Voc']['set_logFrequency']={syn:'Changes the datalogger recording frequency for this function.',lib:'voc.set_logFrequency()',pro:'function set_logFrequency(newval)',cmt:'Changes the datalogger recording frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable recording for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the datalogger recording frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Voc']['set_logicalName']={syn:'Changes the logical name of the Volatile Organic Compound sensor.',lib:'voc.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the Volatile Organic Compound sensor. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the Volatile Organic Compound sensor.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Voc']['set_lowestValue']={syn:'Changes the recorded minimal value observed.',lib:'voc.set_lowestValue()',pro:'function set_lowestValue(newval)',cmt:'Changes the recorded minimal value observed.
',par:{newval:'a floating point number corresponding to the recorded minimal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Voc']['set_reportFrequency']={syn:'Changes the timed value notification frequency for this function.',lib:'voc.set_reportFrequency()',pro:'function set_reportFrequency(newval)',cmt:'Changes the timed value notification frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable timed value notifications for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the timed value notification frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Voc']['set_resolution']={syn:'Changes the resolution of the measured physical values.',lib:'voc.set_resolution()',pro:'function set_resolution(newval)',cmt:'Changes the resolution of the measured physical values. The resolution corresponds to the numerical precision when displaying value. It does not change the precision of the measure itself.
',par:{newval:'a floating point number corresponding to the resolution of the measured physical values'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Voc']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'voc.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['Voc']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'voc.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: Voc) //--- (generated code: Watchdog) doc['Watchdog']={'':{syn:'Watchdog function interface',inc:'<script type='text/javascript' src='yocto_watchdog.js'></script>',cmt:'The watchog function works like a relay and can cause a brief power cut to an appliance after a preset delay to force this appliance to reset. The Watchdog must be called from time to time to reset the timer and prevent the appliance reset. The watchdog can be driven direcly with pulse and delayedpulse methods to switch off an appliance for a given duration.
'}}; doc['Watchdog']['FindWatchdog']={syn:'Retrieves a watchdog for a given identifier.',lib:'YWatchdog.FindWatchdog()',pro:'function FindWatchdog(func)',cmt:'Retrieves a watchdog for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of watchdog currently accessible. Use the method YWatchdog.nextWatchdog() to iterate on next watchdog.
',ret:'a pointer to a YWatchdog object, corresponding to the first watchdog currently online, or a null pointer if there are none.'}; doc['Watchdog']['delayedPulse']={syn:'Schedules a pulse.',lib:'watchdog.delayedPulse()',pro:'function delayedPulse(ms_delay, ms_duration)',cmt:'Schedules a pulse.
',par:{ms_delay:'waiting time before the pulse, in millisecondes',ms_duration:'pulse duration, in millisecondes'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['describe']={syn:'Returns a short text that describes the watchdog in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'watchdog.describe()',pro:'function describe()',cmt:'Returns a short text that describes the watchdog in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the watchdog (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['Watchdog']['get_advertisedValue']={syn:'Returns the current value of the watchdog (no more than 6 characters).',lib:'watchdog.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the watchdog (no more than 6 characters).
',ret:'a string corresponding to the current value of the watchdog (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['Watchdog']['get_autoStart']={syn:'Returns the watchdog runing state at module power up.',lib:'watchdog.get_autoStart()',pro:'function get_autoStart()',cmt:'Returns the watchdog runing state at module power up.
',ret:'either Y_AUTOSTART_OFF or Y_AUTOSTART_ON, according to the watchdog runing state at module power up',ext:'On failure, throws an exception or returns Y_AUTOSTART_INVALID.'}; doc['Watchdog']['get_countdown']={syn:'Returns the number of milliseconds remaining before a pulse (delayedPulse() call) When there is no scheduled pulse, returns zero.',lib:'watchdog.get_countdown()',pro:'function get_countdown()',cmt:'Returns the number of milliseconds remaining before a pulse (delayedPulse() call) When there is no scheduled pulse, returns zero.
',ret:'an integer corresponding to the number of milliseconds remaining before a pulse (delayedPulse() call) When there is no scheduled pulse, returns zero',ext:'On failure, throws an exception or returns Y_COUNTDOWN_INVALID.'}; doc['Watchdog']['get_errorMessage']={syn:'Returns the error message of the latest error with the watchdog.',lib:'watchdog.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the watchdog. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the watchdog object'}; doc['Watchdog']['get_errorType']={syn:'Returns the numerical error code of the latest error with the watchdog.',lib:'watchdog.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the watchdog. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the watchdog object'}; doc['Watchdog']['get_friendlyName']={syn:'Returns a global identifier of the watchdog in the format MODULE_NAME.FUNCTION_NAME.',lib:'watchdog.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the watchdog in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the watchdog if they are defined, otherwise the serial number of the module and the hardware identifier of the watchdog (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the watchdog using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['Watchdog']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'watchdog.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['Watchdog']['get_functionId']={syn:'Returns the hardware identifier of the watchdog, without reference to the module.',lib:'watchdog.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the watchdog, without reference to the module. For example relay1
',ret:'a string that identifies the watchdog (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['Watchdog']['get_hardwareId']={syn:'Returns the unique hardware identifier of the watchdog in the form SERIAL.FUNCTIONID.',lib:'watchdog.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the watchdog in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the watchdog. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the watchdog (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['Watchdog']['get_logicalName']={syn:'Returns the logical name of the watchdog.',lib:'watchdog.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the watchdog.
',ret:'a string corresponding to the logical name of the watchdog. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['Watchdog']['get_maxTimeOnStateA']={syn:'Retourne the maximum time (ms) allowed for $THEFUNCTIONS$ to stay in state A before automatically switching back in to B state.',lib:'watchdog.get_maxTimeOnStateA()',pro:'function get_maxTimeOnStateA()',cmt:'Retourne the maximum time (ms) allowed for $THEFUNCTIONS$ to stay in state A before automatically switching back in to B state. Zero means no maximum time.
',ret:'an integer',ext:'On failure, throws an exception or returns Y_MAXTIMEONSTATEA_INVALID.'}; doc['Watchdog']['get_maxTimeOnStateB']={syn:'Retourne the maximum time (ms) allowed for $THEFUNCTIONS$ to stay in state B before automatically switching back in to A state.',lib:'watchdog.get_maxTimeOnStateB()',pro:'function get_maxTimeOnStateB()',cmt:'Retourne the maximum time (ms) allowed for $THEFUNCTIONS$ to stay in state B before automatically switching back in to A state. Zero means no maximum time.
',ret:'an integer',ext:'On failure, throws an exception or returns Y_MAXTIMEONSTATEB_INVALID.'}; doc['Watchdog']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'watchdog.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['Watchdog']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'watchdog.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Watchdog']['get_output']={syn:'Returns the output state of the watchdog, when used as a simple switch (single throw).',lib:'watchdog.get_output()',pro:'function get_output()',cmt:'Returns the output state of the watchdog, when used as a simple switch (single throw).
',ret:'either Y_OUTPUT_OFF or Y_OUTPUT_ON, according to the output state of the watchdog, when used as a simple switch (single throw)',ext:'On failure, throws an exception or returns Y_OUTPUT_INVALID.'}; doc['Watchdog']['get_pulseTimer']={syn:'Returns the number of milliseconds remaining before the watchdog is returned to idle position (state A), during a measured pulse generation.',lib:'watchdog.get_pulseTimer()',pro:'function get_pulseTimer()',cmt:'Returns the number of milliseconds remaining before the watchdog is returned to idle position (state A), during a measured pulse generation. When there is no ongoing pulse, returns zero.
',ret:'an integer corresponding to the number of milliseconds remaining before the watchdog is returned to idle position (state A), during a measured pulse generation',ext:'On failure, throws an exception or returns Y_PULSETIMER_INVALID.'}; doc['Watchdog']['get_running']={syn:'Returns the watchdog running state.',lib:'watchdog.get_running()',pro:'function get_running()',cmt:'Returns the watchdog running state.
',ret:'either Y_RUNNING_OFF or Y_RUNNING_ON, according to the watchdog running state',ext:'On failure, throws an exception or returns Y_RUNNING_INVALID.'}; doc['Watchdog']['get_state']={syn:'Returns the state of the watchdog (A for the idle position, B for the active position).',lib:'watchdog.get_state()',pro:'function get_state()',cmt:'Returns the state of the watchdog (A for the idle position, B for the active position).
',ret:'either Y_STATE_A or Y_STATE_B, according to the state of the watchdog (A for the idle position, B for the active position)',ext:'On failure, throws an exception or returns Y_STATE_INVALID.'}; doc['Watchdog']['get_stateAtPowerOn']={syn:'Returns the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED for no change).',lib:'watchdog.get_stateAtPowerOn()',pro:'function get_stateAtPowerOn()',cmt:'Returns the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED for no change).
',ret:'a value among Y_STATEATPOWERON_UNCHANGED, Y_STATEATPOWERON_A and Y_STATEATPOWERON_B corresponding to the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED for no change)',ext:'On failure, throws an exception or returns Y_STATEATPOWERON_INVALID.'}; doc['Watchdog']['get_triggerDelay']={syn:'Returns the waiting duration before a reset is automatically triggered by the watchdog, in milliseconds.',lib:'watchdog.get_triggerDelay()',pro:'function get_triggerDelay()',cmt:'Returns the waiting duration before a reset is automatically triggered by the watchdog, in milliseconds.
',ret:'an integer corresponding to the waiting duration before a reset is automatically triggered by the watchdog, in milliseconds',ext:'On failure, throws an exception or returns Y_TRIGGERDELAY_INVALID.'}; doc['Watchdog']['get_triggerDuration']={syn:'Returns the duration of resets caused by the watchdog, in milliseconds.',lib:'watchdog.get_triggerDuration()',pro:'function get_triggerDuration()',cmt:'Returns the duration of resets caused by the watchdog, in milliseconds.
',ret:'an integer corresponding to the duration of resets caused by the watchdog, in milliseconds',ext:'On failure, throws an exception or returns Y_TRIGGERDURATION_INVALID.'}; doc['Watchdog']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'watchdog.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['Watchdog']['isOnline']={syn:'Checks if the watchdog is currently reachable, without raising any error.',lib:'watchdog.isOnline()',pro:'function isOnline()',cmt:'Checks if the watchdog is currently reachable, without raising any error. If there is a cached value for the watchdog in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the watchdog.
',ret:'true if the watchdog can be reached, and false otherwise'}; doc['Watchdog']['isOnline_async']={syn:'Checks if the watchdog is currently reachable, without raising any error (asynchronous version).',lib:'watchdog.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the watchdog is currently reachable, without raising any error (asynchronous version). If there is a cached value for the watchdog in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Watchdog']['load']={syn:'Preloads the watchdog cache with a specified validity duration.',lib:'watchdog.load()',pro:'function load(msValidity)',cmt:'Preloads the watchdog cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['load_async']={syn:'Preloads the watchdog cache with a specified validity duration (asynchronous version).',lib:'watchdog.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the watchdog cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Watchdog']['nextWatchdog']={syn:'Continues the enumeration of watchdog started using yFirstWatchdog().',lib:'watchdog.nextWatchdog()',pro:'function nextWatchdog()',cmt:'Continues the enumeration of watchdog started using yFirstWatchdog().
',ret:'a pointer to a YWatchdog object, corresponding to a watchdog currently online, or a null pointer if there are no more watchdog to enumerate.'}; doc['Watchdog']['pulse']={syn:'Sets the relay to output B (active) for a specified duration, then brings it automatically back to output A (idle state).',lib:'watchdog.pulse()',pro:'function pulse(ms_duration)',cmt:'Sets the relay to output B (active) for a specified duration, then brings it automatically back to output A (idle state).
',par:{ms_duration:'pulse duration, in millisecondes'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'watchdog.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['Watchdog']['resetWatchdog']={syn:'Resets the watchdog.',lib:'watchdog.resetWatchdog()',pro:'function resetWatchdog()',cmt:'Resets the watchdog. When the watchdog is running, this function must be called on a regular basis to prevent the watchog to trigger
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_autoStart']={syn:'Changes the watchdog runningsttae at module power up.',lib:'watchdog.set_autoStart()',pro:'function set_autoStart(newval)',cmt:'Changes the watchdog runningsttae at module power up. Remember to call the saveToFlash() method and then to reboot the module to apply this setting.
',par:{newval:'either Y_AUTOSTART_OFF or Y_AUTOSTART_ON, according to the watchdog runningsttae at module power up'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_logicalName']={syn:'Changes the logical name of the watchdog.',lib:'watchdog.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the watchdog. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the watchdog.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_maxTimeOnStateA']={syn:'Sets the maximum time (ms) allowed for $THEFUNCTIONS$ to stay in state A before automatically switching back in to B state.',lib:'watchdog.set_maxTimeOnStateA()',pro:'function set_maxTimeOnStateA(newval)',cmt:'Sets the maximum time (ms) allowed for $THEFUNCTIONS$ to stay in state A before automatically switching back in to B state. Use zero for no maximum time.
',par:{newval:'an integer'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_maxTimeOnStateB']={syn:'Sets the maximum time (ms) allowed for $THEFUNCTIONS$ to stay in state B before automatically switching back in to A state.',lib:'watchdog.set_maxTimeOnStateB()',pro:'function set_maxTimeOnStateB(newval)',cmt:'Sets the maximum time (ms) allowed for $THEFUNCTIONS$ to stay in state B before automatically switching back in to A state. Use zero for no maximum time.
',par:{newval:'an integer'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_output']={syn:'Changes the output state of the watchdog, when used as a simple switch (single throw).',lib:'watchdog.set_output()',pro:'function set_output(newval)',cmt:'Changes the output state of the watchdog, when used as a simple switch (single throw).
',par:{newval:'either Y_OUTPUT_OFF or Y_OUTPUT_ON, according to the output state of the watchdog, when used as a simple switch (single throw)'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_running']={syn:'Changes the running state of the watchdog.',lib:'watchdog.set_running()',pro:'function set_running(newval)',cmt:'Changes the running state of the watchdog.
',par:{newval:'either Y_RUNNING_OFF or Y_RUNNING_ON, according to the running state of the watchdog'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_state']={syn:'Changes the state of the watchdog (A for the idle position, B for the active position).',lib:'watchdog.set_state()',pro:'function set_state(newval)',cmt:'Changes the state of the watchdog (A for the idle position, B for the active position).
',par:{newval:'either Y_STATE_A or Y_STATE_B, according to the state of the watchdog (A for the idle position, B for the active position)'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_stateAtPowerOn']={syn:'Preset the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED for no modification).',lib:'watchdog.set_stateAtPowerOn()',pro:'function set_stateAtPowerOn(newval)',cmt:'Preset the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED for no modification). Remember to call the matching module saveToFlash() method, otherwise this call will have no effect.
',par:{newval:'a value among Y_STATEATPOWERON_UNCHANGED, Y_STATEATPOWERON_A and Y_STATEATPOWERON_B'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_triggerDelay']={syn:'Changes the waiting delay before a reset is triggered by the watchdog, in milliseconds.',lib:'watchdog.set_triggerDelay()',pro:'function set_triggerDelay(newval)',cmt:'Changes the waiting delay before a reset is triggered by the watchdog, in milliseconds.
',par:{newval:'an integer corresponding to the waiting delay before a reset is triggered by the watchdog, in milliseconds'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_triggerDuration']={syn:'Changes the duration of resets caused by the watchdog, in milliseconds.',lib:'watchdog.set_triggerDuration()',pro:'function set_triggerDuration(newval)',cmt:'Changes the duration of resets caused by the watchdog, in milliseconds.
',par:{newval:'an integer corresponding to the duration of resets caused by the watchdog, in milliseconds'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Watchdog']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'watchdog.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['Watchdog']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'watchdog.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: Watchdog) //--- (generated code: Power) doc['Power']={'':{syn:'Power function interface',inc:'<script type='text/javascript' src='yocto_power.js'></script>',cmt:'The Yoctopuce application programming interface allows you to read an instant measure of the sensor, as well as the minimal and maximal values observed.
'}}; doc['Power']['FindPower']={syn:'Retrieves a electrical power sensor for a given identifier.',lib:'YPower.FindPower()',pro:'function FindPower(func)',cmt:'Retrieves a electrical power sensor for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of electrical power sensors currently accessible. Use the method YPower.nextPower() to iterate on next electrical power sensors.
',ret:'a pointer to a YPower object, corresponding to the first electrical power sensor currently online, or a null pointer if there are none.'}; doc['Power']['calibrateFromPoints']={syn:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure.',lib:'power.calibrateFromPoints()',pro:'function calibrateFromPoints(rawValues, refValues)',cmt:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure. It is possible to configure up to five correction points. Correction points must be provided in ascending order, and be in the range of the sensor. The device will automatically perform a linear interpolation of the error correction between specified points. Remember to call the saveToFlash() method of the module if the modification must be kept.
For more information on advanced capabilities to refine the calibration of sensors, please contact support
',par:{rawValues:'array of floating point numbers, corresponding to the raw values returned by the sensor for the correction points.',refValues:'array of floating point numbers, corresponding to the corrected values for the correction points.'}}; doc['Power']['describe']={syn:'Returns a short text that describes the electrical power sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'power.describe()',pro:'function describe()',cmt:'Returns a short text that describes the electrical power sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the electrical power sensor (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['Power']['get_advertisedValue']={syn:'Returns the current value of the electrical power sensor (no more than 6 characters).',lib:'power.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the electrical power sensor (no more than 6 characters).
',ret:'a string corresponding to the current value of the electrical power sensor (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['Power']['get_cosPhi']={syn:'Returns the power factor (the ratio between the real power consumed, measured in W, and the apparent power provided, measured in VA).',lib:'power.get_cosPhi()',pro:'function get_cosPhi()',cmt:'Returns the power factor (the ratio between the real power consumed, measured in W, and the apparent power provided, measured in VA).
',ret:'a floating point number corresponding to the power factor (the ratio between the real power consumed, measured in W, and the apparent power provided, measured in VA)',ext:'On failure, throws an exception or returns Y_COSPHI_INVALID.'}; doc['Power']['get_currentRawValue']={syn:'Returns the uncalibrated, unrounded raw value returned by the sensor.',lib:'power.get_currentRawValue()',pro:'function get_currentRawValue()',cmt:'Returns the uncalibrated, unrounded raw value returned by the sensor.
',ret:'a floating point number corresponding to the uncalibrated, unrounded raw value returned by the sensor',ext:'On failure, throws an exception or returns Y_CURRENTRAWVALUE_INVALID.'}; doc['Power']['get_currentValue']={syn:'Returns the current measured value.',lib:'power.get_currentValue()',pro:'function get_currentValue()',cmt:'Returns the current measured value.
',ret:'a floating point number corresponding to the current measured value',ext:'On failure, throws an exception or returns Y_CURRENTVALUE_INVALID.'}; doc['Power']['get_errorMessage']={syn:'Returns the error message of the latest error with the electrical power sensor.',lib:'power.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the electrical power sensor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the electrical power sensor object'}; doc['Power']['get_errorType']={syn:'Returns the numerical error code of the latest error with the electrical power sensor.',lib:'power.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the electrical power sensor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the electrical power sensor object'}; doc['Power']['get_friendlyName']={syn:'Returns a global identifier of the electrical power sensor in the format MODULE_NAME.FUNCTION_NAME.',lib:'power.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the electrical power sensor in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the electrical power sensor if they are defined, otherwise the serial number of the module and the hardware identifier of the electrical power sensor (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the electrical power sensor using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['Power']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'power.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['Power']['get_functionId']={syn:'Returns the hardware identifier of the electrical power sensor, without reference to the module.',lib:'power.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the electrical power sensor, without reference to the module. For example relay1
',ret:'a string that identifies the electrical power sensor (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['Power']['get_hardwareId']={syn:'Returns the unique hardware identifier of the electrical power sensor in the form SERIAL.FUNCTIONID.',lib:'power.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the electrical power sensor in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the electrical power sensor. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the electrical power sensor (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['Power']['get_highestValue']={syn:'Returns the maximal value observed.',lib:'power.get_highestValue()',pro:'function get_highestValue()',cmt:'Returns the maximal value observed.
',ret:'a floating point number corresponding to the maximal value observed',ext:'On failure, throws an exception or returns Y_HIGHESTVALUE_INVALID.'}; doc['Power']['get_logFrequency']={syn:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.',lib:'power.get_logFrequency()',pro:'function get_logFrequency()',cmt:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.
',ret:'a string corresponding to the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory',ext:'On failure, throws an exception or returns Y_LOGFREQUENCY_INVALID.'}; doc['Power']['get_logicalName']={syn:'Returns the logical name of the electrical power sensor.',lib:'power.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the electrical power sensor.
',ret:'a string corresponding to the logical name of the electrical power sensor. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['Power']['get_lowestValue']={syn:'Returns the minimal value observed.',lib:'power.get_lowestValue()',pro:'function get_lowestValue()',cmt:'Returns the minimal value observed.
',ret:'a floating point number corresponding to the minimal value observed',ext:'On failure, throws an exception or returns Y_LOWESTVALUE_INVALID.'}; doc['Power']['get_meter']={syn:'Returns the energy counter, maintained by the wattmeter by integrating the power consumption over time.',lib:'power.get_meter()',pro:'function get_meter()',cmt:'Returns the energy counter, maintained by the wattmeter by integrating the power consumption over time. Note that this counter is reset at each start of the device.
',ret:'a floating point number corresponding to the energy counter, maintained by the wattmeter by integrating the power consumption over time',ext:'On failure, throws an exception or returns Y_METER_INVALID.'}; doc['Power']['get_meterTimer']={syn:'Returns the elapsed time since last energy counter reset, in seconds.',lib:'power.get_meterTimer()',pro:'function get_meterTimer()',cmt:'Returns the elapsed time since last energy counter reset, in seconds.
',ret:'an integer corresponding to the elapsed time since last energy counter reset, in seconds',ext:'On failure, throws an exception or returns Y_METERTIMER_INVALID.'}; doc['Power']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'power.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['Power']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'power.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Power']['get_recordedData']={syn:'Retrieves a DataSet object holding historical data for this sensor, for a specified time interval.',lib:'power.get_recordedData()',pro:'function get_recordedData(startTime, endTime)',cmt:'Retrieves a DataSet object holding historical data for this sensor, for a specified time interval. The measures will be retrieved from the data logger, which must have been turned on at the desired time. See the documentation of the DataSet class for information on how to get an overview of the recorded data, and how to load progressively a large set of measures from the data logger.
This function only works if the device uses a recent firmware, as DataSet objects are not supported by firmwares older than version 13000.
',par:{startTime:'the start of the desired measure time interval, as a Unix timestamp, i.e. the number of seconds since January 1, 1970 UTC. The special value 0 can be used to include any meaasure, without initial limit.',endTime:'the end of the desired measure time interval, as a Unix timestamp, i.e. the number of seconds since January 1, 1970 UTC. The special value 0 can be used to include any meaasure, without ending limit.'},ret:'an instance of YDataSet, providing access to historical data. Past measures can be loaded progressively using methods from the YDataSet object.'}; doc['Power']['get_reportFrequency']={syn:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.',lib:'power.get_reportFrequency()',pro:'function get_reportFrequency()',cmt:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.
',ret:'a string corresponding to the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function',ext:'On failure, throws an exception or returns Y_REPORTFREQUENCY_INVALID.'}; doc['Power']['get_resolution']={syn:'Returns the resolution of the measured values.',lib:'power.get_resolution()',pro:'function get_resolution()',cmt:'Returns the resolution of the measured values. The resolution corresponds to the numerical precision of the measures, which is not always the same as the actual precision of the sensor.
',ret:'a floating point number corresponding to the resolution of the measured values',ext:'On failure, throws an exception or returns Y_RESOLUTION_INVALID.'}; doc['Power']['get_unit']={syn:'Returns the measuring unit for the measured value.',lib:'power.get_unit()',pro:'function get_unit()',cmt:'Returns the measuring unit for the measured value.
',ret:'a string corresponding to the measuring unit for the measured value',ext:'On failure, throws an exception or returns Y_UNIT_INVALID.'}; doc['Power']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'power.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['Power']['isOnline']={syn:'Checks if the electrical power sensor is currently reachable, without raising any error.',lib:'power.isOnline()',pro:'function isOnline()',cmt:'Checks if the electrical power sensor is currently reachable, without raising any error. If there is a cached value for the electrical power sensor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the electrical power sensor.
',ret:'true if the electrical power sensor can be reached, and false otherwise'}; doc['Power']['isOnline_async']={syn:'Checks if the electrical power sensor is currently reachable, without raising any error (asynchronous version).',lib:'power.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the electrical power sensor is currently reachable, without raising any error (asynchronous version). If there is a cached value for the electrical power sensor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Power']['load']={syn:'Preloads the electrical power sensor cache with a specified validity duration.',lib:'power.load()',pro:'function load(msValidity)',cmt:'Preloads the electrical power sensor cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Power']['loadCalibrationPoints']={syn:'Retrieves error correction data points previously entered using the method calibrateFromPoints.',lib:'power.loadCalibrationPoints()',pro:'function loadCalibrationPoints(rawValues, refValues)',cmt:'Retrieves error correction data points previously entered using the method calibrateFromPoints.
',par:{rawValues:'array of floating point numbers, that will be filled by the function with the raw sensor values for the correction points.',refValues:'array of floating point numbers, that will be filled by the function with the desired values for the correction points.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Power']['load_async']={syn:'Preloads the electrical power sensor cache with a specified validity duration (asynchronous version).',lib:'power.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the electrical power sensor cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Power']['nextPower']={syn:'Continues the enumeration of electrical power sensors started using yFirstPower().',lib:'power.nextPower()',pro:'function nextPower()',cmt:'Continues the enumeration of electrical power sensors started using yFirstPower().
',ret:'a pointer to a YPower object, corresponding to a electrical power sensor currently online, or a null pointer if there are no more electrical power sensors to enumerate.'}; doc['Power']['registerTimedReportCallback']={syn:'Registers the callback function that is invoked on every periodic timed notification.',lib:'power.registerTimedReportCallback()',pro:'function registerTimedReportCallback(callback)',cmt:'Registers the callback function that is invoked on every periodic timed notification. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and an YMeasure object describing the new advertised value.'}}; doc['Power']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'power.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['Power']['set_highestValue']={syn:'Changes the recorded maximal value observed.',lib:'power.set_highestValue()',pro:'function set_highestValue(newval)',cmt:'Changes the recorded maximal value observed.
',par:{newval:'a floating point number corresponding to the recorded maximal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Power']['set_logFrequency']={syn:'Changes the datalogger recording frequency for this function.',lib:'power.set_logFrequency()',pro:'function set_logFrequency(newval)',cmt:'Changes the datalogger recording frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable recording for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the datalogger recording frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Power']['set_logicalName']={syn:'Changes the logical name of the electrical power sensor.',lib:'power.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the electrical power sensor. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the electrical power sensor.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Power']['set_lowestValue']={syn:'Changes the recorded minimal value observed.',lib:'power.set_lowestValue()',pro:'function set_lowestValue(newval)',cmt:'Changes the recorded minimal value observed.
',par:{newval:'a floating point number corresponding to the recorded minimal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Power']['set_reportFrequency']={syn:'Changes the timed value notification frequency for this function.',lib:'power.set_reportFrequency()',pro:'function set_reportFrequency(newval)',cmt:'Changes the timed value notification frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable timed value notifications for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the timed value notification frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Power']['set_resolution']={syn:'Changes the resolution of the measured values.',lib:'power.set_resolution()',pro:'function set_resolution(newval)',cmt:'Changes the resolution of the measured values. The resolution corresponds to the numerical precision when displaying value. It does not change the precision of the measure itself.
',par:{newval:'a floating point number corresponding to the resolution of the measured values'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Power']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'power.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['Power']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'power.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: Power) //--- (generated code: Display) doc['Display']={'':{syn:'Display function interface',inc:'<script type='text/javascript' src='yocto_display.js'></script>',cmt:'Yoctopuce display interface has been designed to easily show information and images. The device provides built-in multi-layer rendering. Layers can be drawn offline, individually, and freely moved on the display. It can also replay recorded sequences (animations).
'}}; doc['Display']['FindDisplay']={syn:'Retrieves a display for a given identifier.',lib:'YDisplay.FindDisplay()',pro:'function FindDisplay(func)',cmt:'Retrieves a display for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of displays currently accessible. Use the method YDisplay.nextDisplay() to iterate on next displays.
',ret:'a pointer to a YDisplay object, corresponding to the first display currently online, or a null pointer if there are none.'}; doc['Display']['copyLayerContent']={syn:'Copies the whole content of a layer to another layer.',lib:'display.copyLayerContent()',pro:'function copyLayerContent(srcLayerId, dstLayerId)',cmt:'Copies the whole content of a layer to another layer. The color and transparency of all the pixels from the destination layer are set to match the source pixels. This method only affects the displayed content, but does not change any property of the layer object. Note that layer 0 has no transparency support (it is always completely opaque).
',par:{srcLayerId:'the identifier of the source layer (a number in range 0..layerCount-1)',dstLayerId:'the identifier of the destination layer (a number in range 0..layerCount-1)'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['describe']={syn:'Returns a short text that describes the display in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'display.describe()',pro:'function describe()',cmt:'Returns a short text that describes the display in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the display (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['Display']['fade']={syn:'Smoothly changes the brightness of the screen to produce a fade-in or fade-out effect.',lib:'display.fade()',pro:'function fade(brightness, duration)',cmt:'Smoothly changes the brightness of the screen to produce a fade-in or fade-out effect.
',par:{brightness:'the new screen brightness',duration:'duration of the brightness transition, in milliseconds.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['get_advertisedValue']={syn:'Returns the current value of the display (no more than 6 characters).',lib:'display.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the display (no more than 6 characters).
',ret:'a string corresponding to the current value of the display (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['Display']['get_brightness']={syn:'Returns the luminosity of the module informative leds (from 0 to 100).',lib:'display.get_brightness()',pro:'function get_brightness()',cmt:'Returns the luminosity of the module informative leds (from 0 to 100).
',ret:'an integer corresponding to the luminosity of the module informative leds (from 0 to 100)',ext:'On failure, throws an exception or returns Y_BRIGHTNESS_INVALID.'}; doc['Display']['get_displayHeight']={syn:'Returns the display height, in pixels.',lib:'display.get_displayHeight()',pro:'function get_displayHeight()',cmt:'Returns the display height, in pixels.
',ret:'an integer corresponding to the display height, in pixels',ext:'On failure, throws an exception or returns Y_DISPLAYHEIGHT_INVALID.'}; doc['Display']['get_displayLayer']={syn:'Returns a YDisplayLayer object that can be used to draw on the specified layer.',lib:'display.get_displayLayer()',pro:'function get_displayLayer(layerId)',cmt:'Returns a YDisplayLayer object that can be used to draw on the specified layer. The content is displayed only when the layer is active on the screen (and not masked by other overlapping layers).
',par:{layerId:'the identifier of the layer (a number in range 0..layerCount-1)'},ret:'an YDisplayLayer object',ext:'On failure, throws an exception or returns null.'}; doc['Display']['get_displayType']={syn:'Returns the display type: monochrome, gray levels or full color.',lib:'display.get_displayType()',pro:'function get_displayType()',cmt:'Returns the display type: monochrome, gray levels or full color.
',ret:'a value among Y_DISPLAYTYPE_MONO, Y_DISPLAYTYPE_GRAY and Y_DISPLAYTYPE_RGB corresponding to the display type: monochrome, gray levels or full color',ext:'On failure, throws an exception or returns Y_DISPLAYTYPE_INVALID.'}; doc['Display']['get_displayWidth']={syn:'Returns the display width, in pixels.',lib:'display.get_displayWidth()',pro:'function get_displayWidth()',cmt:'Returns the display width, in pixels.
',ret:'an integer corresponding to the display width, in pixels',ext:'On failure, throws an exception or returns Y_DISPLAYWIDTH_INVALID.'}; doc['Display']['get_enabled']={syn:'Returns true if the screen is powered, false otherwise.',lib:'display.get_enabled()',pro:'function get_enabled()',cmt:'Returns true if the screen is powered, false otherwise.
',ret:'either Y_ENABLED_FALSE or Y_ENABLED_TRUE, according to true if the screen is powered, false otherwise',ext:'On failure, throws an exception or returns Y_ENABLED_INVALID.'}; doc['Display']['get_errorMessage']={syn:'Returns the error message of the latest error with the display.',lib:'display.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the display. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the display object'}; doc['Display']['get_errorType']={syn:'Returns the numerical error code of the latest error with the display.',lib:'display.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the display. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the display object'}; doc['Display']['get_friendlyName']={syn:'Returns a global identifier of the display in the format MODULE_NAME.FUNCTION_NAME.',lib:'display.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the display in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the display if they are defined, otherwise the serial number of the module and the hardware identifier of the display (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the display using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['Display']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'display.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['Display']['get_functionId']={syn:'Returns the hardware identifier of the display, without reference to the module.',lib:'display.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the display, without reference to the module. For example relay1
',ret:'a string that identifies the display (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['Display']['get_hardwareId']={syn:'Returns the unique hardware identifier of the display in the form SERIAL.FUNCTIONID.',lib:'display.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the display in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the display. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the display (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['Display']['get_layerCount']={syn:'Returns the number of available layers to draw on.',lib:'display.get_layerCount()',pro:'function get_layerCount()',cmt:'Returns the number of available layers to draw on.
',ret:'an integer corresponding to the number of available layers to draw on',ext:'On failure, throws an exception or returns Y_LAYERCOUNT_INVALID.'}; doc['Display']['get_layerHeight']={syn:'Returns the height of the layers to draw on, in pixels.',lib:'display.get_layerHeight()',pro:'function get_layerHeight()',cmt:'Returns the height of the layers to draw on, in pixels.
',ret:'an integer corresponding to the height of the layers to draw on, in pixels',ext:'On failure, throws an exception or returns Y_LAYERHEIGHT_INVALID.'}; doc['Display']['get_layerWidth']={syn:'Returns the width of the layers to draw on, in pixels.',lib:'display.get_layerWidth()',pro:'function get_layerWidth()',cmt:'Returns the width of the layers to draw on, in pixels.
',ret:'an integer corresponding to the width of the layers to draw on, in pixels',ext:'On failure, throws an exception or returns Y_LAYERWIDTH_INVALID.'}; doc['Display']['get_logicalName']={syn:'Returns the logical name of the display.',lib:'display.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the display.
',ret:'a string corresponding to the logical name of the display. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['Display']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'display.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['Display']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'display.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Display']['get_orientation']={syn:'Returns the currently selected display orientation.',lib:'display.get_orientation()',pro:'function get_orientation()',cmt:'Returns the currently selected display orientation.
',ret:'a value among Y_ORIENTATION_LEFT, Y_ORIENTATION_UP, Y_ORIENTATION_RIGHT and Y_ORIENTATION_DOWN corresponding to the currently selected display orientation',ext:'On failure, throws an exception or returns Y_ORIENTATION_INVALID.'}; doc['Display']['get_startupSeq']={syn:'Returns the name of the sequence to play when the displayed is powered on.',lib:'display.get_startupSeq()',pro:'function get_startupSeq()',cmt:'Returns the name of the sequence to play when the displayed is powered on.
',ret:'a string corresponding to the name of the sequence to play when the displayed is powered on',ext:'On failure, throws an exception or returns Y_STARTUPSEQ_INVALID.'}; doc['Display']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'display.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['Display']['isOnline']={syn:'Checks if the display is currently reachable, without raising any error.',lib:'display.isOnline()',pro:'function isOnline()',cmt:'Checks if the display is currently reachable, without raising any error. If there is a cached value for the display in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the display.
',ret:'true if the display can be reached, and false otherwise'}; doc['Display']['isOnline_async']={syn:'Checks if the display is currently reachable, without raising any error (asynchronous version).',lib:'display.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the display is currently reachable, without raising any error (asynchronous version). If there is a cached value for the display in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Display']['load']={syn:'Preloads the display cache with a specified validity duration.',lib:'display.load()',pro:'function load(msValidity)',cmt:'Preloads the display cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Display']['load_async']={syn:'Preloads the display cache with a specified validity duration (asynchronous version).',lib:'display.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the display cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Display']['newSequence']={syn:'Starts to record all display commands into a sequence, for later replay.',lib:'display.newSequence()',pro:'function newSequence()',cmt:'Starts to record all display commands into a sequence, for later replay. The name used to store the sequence is specified when calling saveSequence(), once the recording is complete.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['nextDisplay']={syn:'Continues the enumeration of displays started using yFirstDisplay().',lib:'display.nextDisplay()',pro:'function nextDisplay()',cmt:'Continues the enumeration of displays started using yFirstDisplay().
',ret:'a pointer to a YDisplay object, corresponding to a display currently online, or a null pointer if there are no more displays to enumerate.'}; doc['Display']['pauseSequence']={syn:'Waits for a specified delay (in milliseconds) before playing next commands in current sequence.',lib:'display.pauseSequence()',pro:'function pauseSequence(delay_ms)',cmt:'Waits for a specified delay (in milliseconds) before playing next commands in current sequence. This method can be used while recording a display sequence, to insert a timed wait in the sequence (without any immediate effect). It can also be used dynamically while playing a pre-recorded sequence, to suspend or resume the execution of the sequence. To cancel a delay, call the same method with a zero delay.
',par:{delay_ms:'the duration to wait, in milliseconds'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['playSequence']={syn:'Replays a display sequence previously recorded using newSequence() and saveSequence().',lib:'display.playSequence()',pro:'function playSequence(sequenceName)',cmt:'Replays a display sequence previously recorded using newSequence() and saveSequence().
',par:{sequenceName:'the name of the newly created sequence'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'display.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['Display']['resetAll']={syn:'Clears the display screen and resets all display layers to their default state.',lib:'display.resetAll()',pro:'function resetAll()',cmt:'Clears the display screen and resets all display layers to their default state.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['saveSequence']={syn:'Stops recording display commands and saves the sequence into the specified file on the display internal memory.',lib:'display.saveSequence()',pro:'function saveSequence(sequenceName)',cmt:'Stops recording display commands and saves the sequence into the specified file on the display internal memory. The sequence can be later replayed using playSequence().
',par:{sequenceName:'the name of the newly created sequence'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['set_brightness']={syn:'Changes the brightness of the display.',lib:'display.set_brightness()',pro:'function set_brightness(newval)',cmt:'Changes the brightness of the display. The parameter is a value between 0 and 100. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'an integer corresponding to the brightness of the display'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['set_enabled']={syn:'Changes the power state of the display.',lib:'display.set_enabled()',pro:'function set_enabled(newval)',cmt:'Changes the power state of the display.
',par:{newval:'either Y_ENABLED_FALSE or Y_ENABLED_TRUE, according to the power state of the display'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['set_logicalName']={syn:'Changes the logical name of the display.',lib:'display.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the display. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the display.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Display']['set_orientation']={syn:'Changes the display orientation.',lib:'display.set_orientation()',pro:'function set_orientation(newval)',cmt:'Changes the display orientation. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a value among Y_ORIENTATION_LEFT, Y_ORIENTATION_UP, Y_ORIENTATION_RIGHT and Y_ORIENTATION_DOWN corresponding to the display orientation'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['set_startupSeq']={syn:'Changes the name of the sequence to play when the displayed is powered on.',lib:'display.set_startupSeq()',pro:'function set_startupSeq(newval)',cmt:'Changes the name of the sequence to play when the displayed is powered on. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the name of the sequence to play when the displayed is powered on'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'display.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['Display']['stopSequence']={syn:'Stops immediately any ongoing sequence replay.',lib:'display.stopSequence()',pro:'function stopSequence()',cmt:'Stops immediately any ongoing sequence replay. The display is left as is.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['swapLayerContent']={syn:'Swaps the whole content of two layers.',lib:'display.swapLayerContent()',pro:'function swapLayerContent(layerIdA, layerIdB)',cmt:'Swaps the whole content of two layers. The color and transparency of all the pixels from the two layers are swapped. This method only affects the displayed content, but does not change any property of the layer objects. In particular, the visibility of each layer stays unchanged. When used between onae hidden layer and a visible layer, this method makes it possible to easily implement double-buffering. Note that layer 0 has no transparency support (it is always completely opaque).
',par:{layerIdA:'the first layer (a number in range 0..layerCount-1)',layerIdB:'the second layer (a number in range 0..layerCount-1)'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['upload']={syn:'Uploads an arbitrary file (for instance a GIF file) to the display, to the specified full path name.',lib:'display.upload()',pro:'function upload(pathname, content)',cmt:'Uploads an arbitrary file (for instance a GIF file) to the display, to the specified full path name. If a file already exists with the same path name, its content is overwritten.
',par:{pathname:'path and name of the new file to create',content:'binary buffer with the content to set'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Display']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'display.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: Display) //--- (generated code: DisplayLayer) doc['DisplayLayer']={'':{syn:'DisplayLayer object interface',inc:'<script type='text/javascript' src='yocto_display.js'></script>',cmt:'A DisplayLayer is an image layer containing objects to display (bitmaps, text, etc.). The content is displayed only when the layer is active on the screen (and not masked by other overlapping layers).
'}}; doc['DisplayLayer']['clear']={syn:'Erases the whole content of the layer (makes it fully transparent).',lib:'displaylayer.clear()',pro:'function clear()',cmt:'Erases the whole content of the layer (makes it fully transparent). This method does not change any other attribute of the layer. To reinitialize the layer attributes to defaults settings, use the method reset() instead.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['clearConsole']={syn:'Blanks the console area within console margins, and resets the console pointer to the upper left corner of the console.',lib:'displaylayer.clearConsole()',pro:'function clearConsole()',cmt:'Blanks the console area within console margins, and resets the console pointer to the upper left corner of the console.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['consoleOut']={syn:'Outputs a message in the console area, and advances the console pointer accordingly.',lib:'displaylayer.consoleOut()',pro:'function consoleOut(text)',cmt:'Outputs a message in the console area, and advances the console pointer accordingly. The console pointer position is automatically moved to the beginning of the next line when a newline character is met, or when the right margin is hit. When the new text to display extends below the lower margin, the console area is automatically scrolled up.
',par:{text:'the message to display'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['drawBar']={syn:'Draws a filled rectangular bar at a specified position.',lib:'displaylayer.drawBar()',pro:'function drawBar(x1, y1, x2, y2)',cmt:'Draws a filled rectangular bar at a specified position.
',par:{x1:'the distance from left of layer to the left border of the rectangle, in pixels',y1:'the distance from top of layer to the top border of the rectangle, in pixels',x2:'the distance from left of layer to the right border of the rectangle, in pixels',y2:'the distance from top of layer to the bottom border of the rectangle, in pixels'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['drawBitmap']={syn:'Draws a bitmap at the specified position.',lib:'displaylayer.drawBitmap()',pro:'function drawBitmap(x, y, w, bitmap, bgcol)',cmt:'Draws a bitmap at the specified position. 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 maps to the leftmost pixel, and the least significant bit maps to the rightmost pixel. Bits set to 1 are drawn using the layer selected pen color. Bits set to 0 are drawn using the specified background gray level, unless -1 is specified, in which case they are not drawn at all (as if transparent).
',par:{x:'the distance from left of layer to the left of the bitmap, in pixels',y:'the distance from top of layer to the top of the bitmap, in pixels',w:'the width of the bitmap, in pixels',bitmap:'a binary object',bgcol:'the background gray level to use for zero bits (0 = black, 255 = white), or -1 to leave the pixels unchanged'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['drawCircle']={syn:'Draws an empty circle at a specified position.',lib:'displaylayer.drawCircle()',pro:'function drawCircle(x, y, r)',cmt:'Draws an empty circle at a specified position.
',par:{x:'the distance from left of layer to the center of the circle, in pixels',y:'the distance from top of layer to the center of the circle, in pixels',r:'the radius of the circle, in pixels'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['drawDisc']={syn:'Draws a filled disc at a given position.',lib:'displaylayer.drawDisc()',pro:'function drawDisc(x, y, r)',cmt:'Draws a filled disc at a given position.
',par:{x:'the distance from left of layer to the center of the disc, in pixels',y:'the distance from top of layer to the center of the disc, in pixels',r:'the radius of the disc, in pixels'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['drawImage']={syn:'Draws a GIF image at the specified position.',lib:'displaylayer.drawImage()',pro:'function drawImage(x, y, imagename)',cmt:'Draws a GIF image at the specified position. The GIF image must have been previously uploaded to the device built-in memory. If you experience problems using an image file, check the device logs for any error message such as missing image file or bad image file format.
',par:{x:'the distance from left of layer to the left of the image, in pixels',y:'the distance from top of layer to the top of the image, in pixels',imagename:'the GIF file name'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['drawPixel']={syn:'Draws a single pixel at the specified position.',lib:'displaylayer.drawPixel()',pro:'function drawPixel(x, y)',cmt:'Draws a single pixel at the specified position.
',par:{x:'the distance from left of layer, in pixels',y:'the distance from top of layer, in pixels'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['drawRect']={syn:'Draws an empty rectangle at a specified position.',lib:'displaylayer.drawRect()',pro:'function drawRect(x1, y1, x2, y2)',cmt:'Draws an empty rectangle at a specified position.
',par:{x1:'the distance from left of layer to the left border of the rectangle, in pixels',y1:'the distance from top of layer to the top border of the rectangle, in pixels',x2:'the distance from left of layer to the right border of the rectangle, in pixels',y2:'the distance from top of layer to the bottom border of the rectangle, in pixels'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['drawText']={syn:'Draws a text string at the specified position.',lib:'displaylayer.drawText()',pro:'function drawText(x, y, anchor, text)',cmt:'Draws a text string at the specified position. 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.
',par:{x:'the distance from left of layer to the text ancor point, in pixels',y:'the distance from top of layer to the text ancor point, in pixels',anchor:'the text anchor point, chosen among the Y_ALIGN enumeration: Y_ALIGN_TOP_LEFT, Y_ALIGN_CENTER_LEFT, Y_ALIGN_BASELINE_LEFT, Y_ALIGN_BOTTOM_LEFT, Y_ALIGN_TOP_CENTER, Y_ALIGN_CENTER, Y_ALIGN_BASELINE_CENTER, Y_ALIGN_BOTTOM_CENTER, Y_ALIGN_TOP_DECIMAL, Y_ALIGN_CENTER_DECIMAL, Y_ALIGN_BASELINE_DECIMAL, Y_ALIGN_BOTTOM_DECIMAL, Y_ALIGN_TOP_RIGHT, Y_ALIGN_CENTER_RIGHT, Y_ALIGN_BASELINE_RIGHT, Y_ALIGN_BOTTOM_RIGHT.',text:'the text string to draw'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['get_display']={syn:'Gets parent YDisplay.',lib:'displaylayer.get_display()',pro:'function get_display()',cmt:'Gets parent YDisplay. Returns the parent YDisplay object of the current YDisplayLayer.
',ret:'an YDisplay object'}; doc['DisplayLayer']['get_displayHeight']={syn:'Returns the display height, in pixels.',lib:'displaylayer.get_displayHeight()',pro:'function get_displayHeight()',cmt:'Returns the display height, in pixels.
',ret:'an integer corresponding to the display height, in pixels On failure, throws an exception or returns Y_DISPLAYHEIGHT_INVALID.'}; doc['DisplayLayer']['get_displayWidth']={syn:'Returns the display width, in pixels.',lib:'displaylayer.get_displayWidth()',pro:'function get_displayWidth()',cmt:'Returns the display width, in pixels.
',ret:'an integer corresponding to the display width, in pixels On failure, throws an exception or returns Y_DISPLAYWIDTH_INVALID.'}; doc['DisplayLayer']['get_layerHeight']={syn:'Returns the height of the layers to draw on, in pixels.',lib:'displaylayer.get_layerHeight()',pro:'function get_layerHeight()',cmt:'Returns the height of the layers to draw on, in pixels.
',ret:'an integer corresponding to the height of the layers to draw on, in pixels',ext:'On failure, throws an exception or returns Y_LAYERHEIGHT_INVALID.'}; doc['DisplayLayer']['get_layerWidth']={syn:'Returns the width of the layers to draw on, in pixels.',lib:'displaylayer.get_layerWidth()',pro:'function get_layerWidth()',cmt:'Returns the width of the layers to draw on, in pixels.
',ret:'an integer corresponding to the width of the layers to draw on, in pixels',ext:'On failure, throws an exception or returns Y_LAYERWIDTH_INVALID.'}; doc['DisplayLayer']['hide']={syn:'Hides the layer.',lib:'displaylayer.hide()',pro:'function hide()',cmt:'Hides the layer. The state of the layer is perserved but the layer is not displayed on the screen until the next call to unhide(). Hiding the layer can positively affect the drawing speed, since it postpones the rendering until all operations are completed (double-buffering).
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['lineTo']={syn:'Draws a line from current drawing pointer position to the specified position.',lib:'displaylayer.lineTo()',pro:'function lineTo(x, y)',cmt:'Draws a line from current drawing pointer position to the specified position. The specified destination pixel is included in the line. The pointer position is then moved to the end point of the line.
',par:{x:'the distance from left of layer to the end point of the line, in pixels',y:'the distance from top of layer to the end point of the line, in pixels'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['moveTo']={syn:'Moves the drawing pointer of this layer to the specified position.',lib:'displaylayer.moveTo()',pro:'function moveTo(x, y)',cmt:'Moves the drawing pointer of this layer to the specified position.
',par:{x:'the distance from left of layer, in pixels',y:'the distance from top of layer, in pixels'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['reset']={syn:'Reverts the layer to its initial state (fully transparent, default settings).',lib:'displaylayer.reset()',pro:'function reset()',cmt:'Reverts the layer to its initial state (fully transparent, default settings). Reinitializes the drawing pointer to the upper left position, and selects the most visible pen color. If you only want to erase the layer content, use the method clear() instead.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['selectColorPen']={syn:'Selects the pen color for all subsequent drawing functions, including text drawing.',lib:'displaylayer.selectColorPen()',pro:'function selectColorPen(color)',cmt:'Selects the pen color for all subsequent drawing functions, including text drawing. The pen color is provided as an RGB value. For grayscale or monochrome displays, the value is automatically converted to the proper range.
',par:{color:'the desired pen color, as a 24-bit RGB value'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['selectEraser']={syn:'Selects an eraser instead of a pen for all subsequent drawing functions, except for text drawing and bitmap copy functions.',lib:'displaylayer.selectEraser()',pro:'function selectEraser()',cmt:'Selects an eraser instead of a pen for all subsequent drawing functions, except for text drawing and bitmap copy functions. Any point drawn using the eraser becomes transparent (as when the layer is empty), showing the other layers beneath it.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['selectFont']={syn:'Selects a font to use for the next text drawing functions, by providing the name of the font file.',lib:'displaylayer.selectFont()',pro:'function selectFont(fontname)',cmt:'Selects a font to use for the next text drawing functions, by providing the name of the font file. You can use a built-in font as well as a font file that you have previously uploaded to the device built-in memory. If you experience problems selecting a font file, check the device logs for any error message such as missing font file or bad font file format.
',par:{fontname:'the font file name'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['selectGrayPen']={syn:'Selects the pen gray level for all subsequent drawing functions, including text drawing.',lib:'displaylayer.selectGrayPen()',pro:'function selectGrayPen(graylevel)',cmt:'Selects the pen gray level for all subsequent drawing functions, including text drawing. The gray level is provided as a number between 0 (black) and 255 (white, or whichever the lighest color is). For monochrome displays (without gray levels), any value lower than 128 is rendered as black, and any value equal or above to 128 is non-black.
',par:{graylevel:'the desired gray level, from 0 to 255'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['setAntialiasingMode']={syn:'Enables or disables anti-aliasing for drawing oblique lines and circles.',lib:'displaylayer.setAntialiasingMode()',pro:'function setAntialiasingMode(mode)',cmt:'Enables or disables anti-aliasing for drawing oblique lines and circles. Anti-aliasing provides a smoother aspect when looked from far enough, but it can add fuzzyness when the display is looked from very close. At the end of the day, it is your personal choice. Anti-aliasing is enabled by default on grayscale and color displays, but you can disable it if you prefer. This setting has no effect on monochrome displays.
',par:{mode:'Sets up the background color used by the clearConsole function and by the console scrolling feature.
',par:{bgcol:'the background gray level to use when scrolling (0 = black, 255 = white), or -1 for transparent'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['setConsoleMargins']={syn:'Sets up display margins for the consoleOut function.',lib:'displaylayer.setConsoleMargins()',pro:'function setConsoleMargins(x1, y1, x2, y2)',cmt:'Sets up display margins for the consoleOut function.
',par:{x1:'the distance from left of layer to the left margin, in pixels',y1:'the distance from top of layer to the top margin, in pixels',x2:'the distance from left of layer to the right margin, in pixels',y2:'the distance from top of layer to the bottom margin, in pixels'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['setConsoleWordWrap']={syn:'Sets up the wrapping behaviour used by the consoleOut function.',lib:'displaylayer.setConsoleWordWrap()',pro:'function setConsoleWordWrap(wordwrap)',cmt:'Sets up the wrapping behaviour used by the consoleOut function.
',par:{wordwrap:'true to wrap only between words, false to wrap on the last column anyway.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['setLayerPosition']={syn:'Sets the position of the layer relative to the display upper left corner.',lib:'displaylayer.setLayerPosition()',pro:'function setLayerPosition(x, y, scrollTime)',cmt:'Sets the position of the layer relative to the display upper left corner. When smooth scrolling is used, the display offset of the layer is automatically updated during the next milliseconds to animate the move of the layer.
',par:{x:'the distance from left of display to the upper left corner of the layer',y:'the distance from top of display to the upper left corner of the layer',scrollTime:'number of milliseconds to use for smooth scrolling, or 0 if the scrolling should be immediate.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DisplayLayer']['unhide']={syn:'Shows the layer.',lib:'displaylayer.unhide()',pro:'function unhide()',cmt:'Shows the layer. Shows the layer again after a hide command.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; //--- (end of generated code: DisplayLayer) //--- (generated code: Files) doc['Files']={'':{syn:'Files function interface',inc:'<script type='text/javascript' src='yocto_files.js'></script>',cmt:'The filesystem interface makes it possible to store files on some devices, for instance to design a custom web UI (for networked devices) or to add fonts (on display devices).
'}}; doc['Files']['FindFiles']={syn:'Retrieves a filesystem for a given identifier.',lib:'YFiles.FindFiles()',pro:'function FindFiles(func)',cmt:'Retrieves a filesystem for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of filesystems currently accessible. Use the method YFiles.nextFiles() to iterate on next filesystems.
',ret:'a pointer to a YFiles object, corresponding to the first filesystem currently online, or a null pointer if there are none.'}; doc['Files']['describe']={syn:'Returns a short text that describes the filesystem in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'files.describe()',pro:'function describe()',cmt:'Returns a short text that describes the filesystem in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the filesystem (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['Files']['download']={syn:'Downloads the requested file and returns a binary buffer with its content.',lib:'files.download()',pro:'function download(pathname)',cmt:'Downloads the requested file and returns a binary buffer with its content.
',par:{pathname:'path and name of the file to download'},ret:'a binary buffer with the file content',ext:'On failure, throws an exception or returns an empty content.'}; doc['Files']['download_async']={syn:'Downloads the requested file and returns a binary buffer with its content.',lib:'files.download_async()',pro:'function download_async(pathname, callback, context)',cmt:'Downloads the requested file and returns a binary buffer with its content. This is the asynchronous version that uses a callback to pass the result when the donwload is completed.
',par:{pathname:'path and name of the new file to load',callback:'callback function that is invoked when the w The callback function receives three arguments: - the user-specific context object - the YFiles object whose download_async was invoked - a binary buffer with the file content',context:'user-specific object that is passed as-is to the callback function'},ret:'nothing.'}; doc['Files']['format_fs']={syn:'Reinitializes the filesystem to its clean, unfragmented, empty state.',lib:'files.format_fs()',pro:'function format_fs()',cmt:'Reinitializes the filesystem to its clean, unfragmented, empty state. All files previously uploaded are permanently lost.
',ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Files']['get_advertisedValue']={syn:'Returns the current value of the filesystem (no more than 6 characters).',lib:'files.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the filesystem (no more than 6 characters).
',ret:'a string corresponding to the current value of the filesystem (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['Files']['get_errorMessage']={syn:'Returns the error message of the latest error with the filesystem.',lib:'files.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the filesystem. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the filesystem object'}; doc['Files']['get_errorType']={syn:'Returns the numerical error code of the latest error with the filesystem.',lib:'files.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the filesystem. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the filesystem object'}; doc['Files']['get_filesCount']={syn:'Returns the number of files currently loaded in the filesystem.',lib:'files.get_filesCount()',pro:'function get_filesCount()',cmt:'Returns the number of files currently loaded in the filesystem.
',ret:'an integer corresponding to the number of files currently loaded in the filesystem',ext:'On failure, throws an exception or returns Y_FILESCOUNT_INVALID.'}; doc['Files']['get_freeSpace']={syn:'Returns the free space for uploading new files to the filesystem, in bytes.',lib:'files.get_freeSpace()',pro:'function get_freeSpace()',cmt:'Returns the free space for uploading new files to the filesystem, in bytes.
',ret:'an integer corresponding to the free space for uploading new files to the filesystem, in bytes',ext:'On failure, throws an exception or returns Y_FREESPACE_INVALID.'}; doc['Files']['get_friendlyName']={syn:'Returns a global identifier of the filesystem in the format MODULE_NAME.FUNCTION_NAME.',lib:'files.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the filesystem in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the filesystem if they are defined, otherwise the serial number of the module and the hardware identifier of the filesystem (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the filesystem using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['Files']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'files.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['Files']['get_functionId']={syn:'Returns the hardware identifier of the filesystem, without reference to the module.',lib:'files.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the filesystem, without reference to the module. For example relay1
',ret:'a string that identifies the filesystem (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['Files']['get_hardwareId']={syn:'Returns the unique hardware identifier of the filesystem in the form SERIAL.FUNCTIONID.',lib:'files.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the filesystem in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the filesystem. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the filesystem (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['Files']['get_list']={syn:'Returns a list of YFileRecord objects that describe files currently loaded in the filesystem.',lib:'files.get_list()',pro:'function get_list(pattern)',cmt:'Returns a list of YFileRecord objects that describe files currently loaded in the filesystem.
',par:{pattern:'an optional filter pattern, using star and question marks as wildcards. When an empty pattern is provided, all file records are returned.'},ret:'a list of YFileRecord objects, containing the file path and name, byte size and 32-bit CRC of the file content.',ext:'On failure, throws an exception or returns an empty list.'}; doc['Files']['get_logicalName']={syn:'Returns the logical name of the filesystem.',lib:'files.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the filesystem.
',ret:'a string corresponding to the logical name of the filesystem. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['Files']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'files.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['Files']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'files.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Files']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'files.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['Files']['isOnline']={syn:'Checks if the filesystem is currently reachable, without raising any error.',lib:'files.isOnline()',pro:'function isOnline()',cmt:'Checks if the filesystem is currently reachable, without raising any error. If there is a cached value for the filesystem in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the filesystem.
',ret:'true if the filesystem can be reached, and false otherwise'}; doc['Files']['isOnline_async']={syn:'Checks if the filesystem is currently reachable, without raising any error (asynchronous version).',lib:'files.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the filesystem is currently reachable, without raising any error (asynchronous version). If there is a cached value for the filesystem in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Files']['load']={syn:'Preloads the filesystem cache with a specified validity duration.',lib:'files.load()',pro:'function load(msValidity)',cmt:'Preloads the filesystem cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Files']['load_async']={syn:'Preloads the filesystem cache with a specified validity duration (asynchronous version).',lib:'files.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the filesystem cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Files']['nextFiles']={syn:'Continues the enumeration of filesystems started using yFirstFiles().',lib:'files.nextFiles()',pro:'function nextFiles()',cmt:'Continues the enumeration of filesystems started using yFirstFiles().
',ret:'a pointer to a YFiles object, corresponding to a filesystem currently online, or a null pointer if there are no more filesystems to enumerate.'}; doc['Files']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'files.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['Files']['remove']={syn:'Deletes a file, given by its full path name, from the filesystem.',lib:'files.remove()',pro:'function remove(pathname)',cmt:'Deletes a file, given by its full path name, from the filesystem. Because of filesystem fragmentation, deleting a file may not always free up the whole space used by the file. However, rewriting a file with the same path name will always reuse any space not freed previously. If you need to ensure that no space is taken by previously deleted files, you can use format_fs to fully reinitialize the filesystem.
',par:{pathname:'path and name of the file to remove.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Files']['set_logicalName']={syn:'Changes the logical name of the filesystem.',lib:'files.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the filesystem. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the filesystem.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Files']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'files.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['Files']['upload']={syn:'Uploads a file to the filesystem, to the specified full path name.',lib:'files.upload()',pro:'function upload(pathname, content)',cmt:'Uploads a file to the filesystem, to the specified full path name. If a file already exists with the same path name, its content is overwritten.
',par:{pathname:'path and name of the new file to create',content:'binary buffer with the content to set'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Files']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'files.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: Files) //--- (generated code: RealTimeClock) doc['RealTimeClock']={'':{syn:'Real Time Clock function interface',inc:'<script type='text/javascript' src='yocto_realtimeclock.js'></script>',cmt:'The RealTimeClock function maintains and provides current date and time, even accross power cut lasting several days. It is the base for automated wake-up functions provided by the WakeUpScheduler. The current time may represent a local time as well as an UTC time, but no automatic time change will occur to account for daylight saving time.
'}}; doc['RealTimeClock']['FindRealTimeClock']={syn:'Retrieves a clock for a given identifier.',lib:'YRealTimeClock.FindRealTimeClock()',pro:'function FindRealTimeClock(func)',cmt:'Retrieves a clock for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of clocks currently accessible. Use the method YRealTimeClock.nextRealTimeClock() to iterate on next clocks.
',ret:'a pointer to a YRealTimeClock object, corresponding to the first clock currently online, or a null pointer if there are none.'}; doc['RealTimeClock']['describe']={syn:'Returns a short text that describes the clock in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'realtimeclock.describe()',pro:'function describe()',cmt:'Returns a short text that describes the clock in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the clock (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['RealTimeClock']['get_advertisedValue']={syn:'Returns the current value of the clock (no more than 6 characters).',lib:'realtimeclock.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the clock (no more than 6 characters).
',ret:'a string corresponding to the current value of the clock (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['RealTimeClock']['get_dateTime']={syn:'Returns the current time in the form \x22YYYY/MM/DD hh:mm:ss\x22 ',lib:'realtimeclock.get_dateTime()',pro:'function get_dateTime()',cmt:'Returns the current time in the form \x22YYYY/MM/DD hh:mm:ss\x22
',ret:'a string corresponding to the current time in the form \x22YYYY/MM/DD hh:mm:ss\x22',ext:'On failure, throws an exception or returns Y_DATETIME_INVALID.'}; doc['RealTimeClock']['get_errorMessage']={syn:'Returns the error message of the latest error with the clock.',lib:'realtimeclock.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the clock. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the clock object'}; doc['RealTimeClock']['get_errorType']={syn:'Returns the numerical error code of the latest error with the clock.',lib:'realtimeclock.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the clock. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the clock object'}; doc['RealTimeClock']['get_friendlyName']={syn:'Returns a global identifier of the clock in the format MODULE_NAME.FUNCTION_NAME.',lib:'realtimeclock.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the clock in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the clock if they are defined, otherwise the serial number of the module and the hardware identifier of the clock (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the clock using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['RealTimeClock']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'realtimeclock.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['RealTimeClock']['get_functionId']={syn:'Returns the hardware identifier of the clock, without reference to the module.',lib:'realtimeclock.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the clock, without reference to the module. For example relay1
',ret:'a string that identifies the clock (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['RealTimeClock']['get_hardwareId']={syn:'Returns the unique hardware identifier of the clock in the form SERIAL.FUNCTIONID.',lib:'realtimeclock.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the clock in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the clock. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the clock (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['RealTimeClock']['get_logicalName']={syn:'Returns the logical name of the clock.',lib:'realtimeclock.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the clock.
',ret:'a string corresponding to the logical name of the clock. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['RealTimeClock']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'realtimeclock.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['RealTimeClock']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'realtimeclock.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['RealTimeClock']['get_timeSet']={syn:'Returns true if the clock has been set, and false otherwise.',lib:'realtimeclock.get_timeSet()',pro:'function get_timeSet()',cmt:'Returns true if the clock has been set, and false otherwise.
',ret:'either Y_TIMESET_FALSE or Y_TIMESET_TRUE, according to true if the clock has been set, and false otherwise',ext:'On failure, throws an exception or returns Y_TIMESET_INVALID.'}; doc['RealTimeClock']['get_unixTime']={syn:'Returns the current time in Unix format (number of elapsed seconds since Jan 1st, 1970).',lib:'realtimeclock.get_unixTime()',pro:'function get_unixTime()',cmt:'Returns the current time in Unix format (number of elapsed seconds since Jan 1st, 1970).
',ret:'an integer corresponding to the current time in Unix format (number of elapsed seconds since Jan 1st, 1970)',ext:'On failure, throws an exception or returns Y_UNIXTIME_INVALID.'}; doc['RealTimeClock']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'realtimeclock.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['RealTimeClock']['get_utcOffset']={syn:'Returns the number of seconds between current time and UTC time (time zone).',lib:'realtimeclock.get_utcOffset()',pro:'function get_utcOffset()',cmt:'Returns the number of seconds between current time and UTC time (time zone).
',ret:'an integer corresponding to the number of seconds between current time and UTC time (time zone)',ext:'On failure, throws an exception or returns Y_UTCOFFSET_INVALID.'}; doc['RealTimeClock']['isOnline']={syn:'Checks if the clock is currently reachable, without raising any error.',lib:'realtimeclock.isOnline()',pro:'function isOnline()',cmt:'Checks if the clock is currently reachable, without raising any error. If there is a cached value for the clock in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the clock.
',ret:'true if the clock can be reached, and false otherwise'}; doc['RealTimeClock']['isOnline_async']={syn:'Checks if the clock is currently reachable, without raising any error (asynchronous version).',lib:'realtimeclock.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the clock is currently reachable, without raising any error (asynchronous version). If there is a cached value for the clock in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['RealTimeClock']['load']={syn:'Preloads the clock cache with a specified validity duration.',lib:'realtimeclock.load()',pro:'function load(msValidity)',cmt:'Preloads the clock cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['RealTimeClock']['load_async']={syn:'Preloads the clock cache with a specified validity duration (asynchronous version).',lib:'realtimeclock.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the clock cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['RealTimeClock']['nextRealTimeClock']={syn:'Continues the enumeration of clocks started using yFirstRealTimeClock().',lib:'realtimeclock.nextRealTimeClock()',pro:'function nextRealTimeClock()',cmt:'Continues the enumeration of clocks started using yFirstRealTimeClock().
',ret:'a pointer to a YRealTimeClock object, corresponding to a clock currently online, or a null pointer if there are no more clocks to enumerate.'}; doc['RealTimeClock']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'realtimeclock.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['RealTimeClock']['set_logicalName']={syn:'Changes the logical name of the clock.',lib:'realtimeclock.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the clock. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the clock.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['RealTimeClock']['set_unixTime']={syn:'Changes the current time.',lib:'realtimeclock.set_unixTime()',pro:'function set_unixTime(newval)',cmt:'Changes the current time. Time is specifid in Unix format (number of elapsed seconds since Jan 1st, 1970). If current UTC time is known, utcOffset will be automatically adjusted for the new specified time.
',par:{newval:'an integer corresponding to the current time'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['RealTimeClock']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'realtimeclock.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['RealTimeClock']['set_utcOffset']={syn:'Changes the number of seconds between current time and UTC time (time zone).',lib:'realtimeclock.set_utcOffset()',pro:'function set_utcOffset(newval)',cmt:'Changes the number of seconds between current time and UTC time (time zone). The timezone is automatically rounded to the nearest multiple of 15 minutes. If current UTC time is known, the current time will automatically be updated according to the selected time zone.
',par:{newval:'an integer corresponding to the number of seconds between current time and UTC time (time zone)'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['RealTimeClock']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'realtimeclock.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: RealTimeClock) //--- (generated code: WakeUpMonitor) doc['WakeUpMonitor']={'':{syn:'WakeUpMonitor function interface',inc:'<script type='text/javascript' src='yocto_wakeupmonitor.js'></script>',cmt:'The WakeUpMonitor function handles globally all wake-up sources, as well as automated sleep mode.
'}}; doc['WakeUpMonitor']['FindWakeUpMonitor']={syn:'Retrieves a monitor for a given identifier.',lib:'YWakeUpMonitor.FindWakeUpMonitor()',pro:'function FindWakeUpMonitor(func)',cmt:'Retrieves a monitor for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of monitors currently accessible. Use the method YWakeUpMonitor.nextWakeUpMonitor() to iterate on next monitors.
',ret:'a pointer to a YWakeUpMonitor object, corresponding to the first monitor currently online, or a null pointer if there are none.'}; doc['WakeUpMonitor']['describe']={syn:'Returns a short text that describes the monitor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'wakeupmonitor.describe()',pro:'function describe()',cmt:'Returns a short text that describes the monitor in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the monitor (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['WakeUpMonitor']['get_advertisedValue']={syn:'Returns the current value of the monitor (no more than 6 characters).',lib:'wakeupmonitor.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the monitor (no more than 6 characters).
',ret:'a string corresponding to the current value of the monitor (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['WakeUpMonitor']['get_errorMessage']={syn:'Returns the error message of the latest error with the monitor.',lib:'wakeupmonitor.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the monitor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the monitor object'}; doc['WakeUpMonitor']['get_errorType']={syn:'Returns the numerical error code of the latest error with the monitor.',lib:'wakeupmonitor.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the monitor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the monitor object'}; doc['WakeUpMonitor']['get_friendlyName']={syn:'Returns a global identifier of the monitor in the format MODULE_NAME.FUNCTION_NAME.',lib:'wakeupmonitor.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the monitor in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the monitor if they are defined, otherwise the serial number of the module and the hardware identifier of the monitor (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the monitor using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['WakeUpMonitor']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'wakeupmonitor.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['WakeUpMonitor']['get_functionId']={syn:'Returns the hardware identifier of the monitor, without reference to the module.',lib:'wakeupmonitor.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the monitor, without reference to the module. For example relay1
',ret:'a string that identifies the monitor (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['WakeUpMonitor']['get_hardwareId']={syn:'Returns the unique hardware identifier of the monitor in the form SERIAL.FUNCTIONID.',lib:'wakeupmonitor.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the monitor in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the monitor. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the monitor (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['WakeUpMonitor']['get_logicalName']={syn:'Returns the logical name of the monitor.',lib:'wakeupmonitor.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the monitor.
',ret:'a string corresponding to the logical name of the monitor. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['WakeUpMonitor']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'wakeupmonitor.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['WakeUpMonitor']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'wakeupmonitor.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['WakeUpMonitor']['get_nextWakeUp']={syn:'Returns the next scheduled wake up date/time (UNIX format) ',lib:'wakeupmonitor.get_nextWakeUp()',pro:'function get_nextWakeUp()',cmt:'Returns the next scheduled wake up date/time (UNIX format)
',ret:'an integer corresponding to the next scheduled wake up date/time (UNIX format)',ext:'On failure, throws an exception or returns Y_NEXTWAKEUP_INVALID.'}; doc['WakeUpMonitor']['get_powerDuration']={syn:'Returns the maximal wake up time (in seconds) before automatically going to sleep.',lib:'wakeupmonitor.get_powerDuration()',pro:'function get_powerDuration()',cmt:'Returns the maximal wake up time (in seconds) before automatically going to sleep.
',ret:'an integer corresponding to the maximal wake up time (in seconds) before automatically going to sleep',ext:'On failure, throws an exception or returns Y_POWERDURATION_INVALID.'}; doc['WakeUpMonitor']['get_sleepCountdown']={syn:'Returns the delay before the next sleep period.',lib:'wakeupmonitor.get_sleepCountdown()',pro:'function get_sleepCountdown()',cmt:'Returns the delay before the next sleep period.
',ret:'an integer corresponding to the delay before the next sleep period',ext:'On failure, throws an exception or returns Y_SLEEPCOUNTDOWN_INVALID.'}; doc['WakeUpMonitor']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'wakeupmonitor.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['WakeUpMonitor']['get_wakeUpReason']={syn:'Returns the latest wake up reason.',lib:'wakeupmonitor.get_wakeUpReason()',pro:'function get_wakeUpReason()',cmt:'Returns the latest wake up reason.
',ret:'a value among Y_WAKEUPREASON_USBPOWER, Y_WAKEUPREASON_EXTPOWER, Y_WAKEUPREASON_ENDOFSLEEP, Y_WAKEUPREASON_EXTSIG1, Y_WAKEUPREASON_EXTSIG2, Y_WAKEUPREASON_EXTSIG3, Y_WAKEUPREASON_EXTSIG4, Y_WAKEUPREASON_SCHEDULE1, Y_WAKEUPREASON_SCHEDULE2, Y_WAKEUPREASON_SCHEDULE3, Y_WAKEUPREASON_SCHEDULE4, Y_WAKEUPREASON_SCHEDULE5 and Y_WAKEUPREASON_SCHEDULE6 corresponding to the latest wake up reason',ext:'On failure, throws an exception or returns Y_WAKEUPREASON_INVALID.'}; doc['WakeUpMonitor']['get_wakeUpState']={syn:'Returns the current state of the monitor ',lib:'wakeupmonitor.get_wakeUpState()',pro:'function get_wakeUpState()',cmt:'Returns the current state of the monitor
',ret:'either Y_WAKEUPSTATE_SLEEPING or Y_WAKEUPSTATE_AWAKE, according to the current state of the monitor',ext:'On failure, throws an exception or returns Y_WAKEUPSTATE_INVALID.'}; doc['WakeUpMonitor']['isOnline']={syn:'Checks if the monitor is currently reachable, without raising any error.',lib:'wakeupmonitor.isOnline()',pro:'function isOnline()',cmt:'Checks if the monitor is currently reachable, without raising any error. If there is a cached value for the monitor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the monitor.
',ret:'true if the monitor can be reached, and false otherwise'}; doc['WakeUpMonitor']['isOnline_async']={syn:'Checks if the monitor is currently reachable, without raising any error (asynchronous version).',lib:'wakeupmonitor.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the monitor is currently reachable, without raising any error (asynchronous version). If there is a cached value for the monitor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['WakeUpMonitor']['load']={syn:'Preloads the monitor cache with a specified validity duration.',lib:'wakeupmonitor.load()',pro:'function load(msValidity)',cmt:'Preloads the monitor cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['load_async']={syn:'Preloads the monitor cache with a specified validity duration (asynchronous version).',lib:'wakeupmonitor.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the monitor cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['WakeUpMonitor']['nextWakeUpMonitor']={syn:'Continues the enumeration of monitors started using yFirstWakeUpMonitor().',lib:'wakeupmonitor.nextWakeUpMonitor()',pro:'function nextWakeUpMonitor()',cmt:'Continues the enumeration of monitors started using yFirstWakeUpMonitor().
',ret:'a pointer to a YWakeUpMonitor object, corresponding to a monitor currently online, or a null pointer if there are no more monitors to enumerate.'}; doc['WakeUpMonitor']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'wakeupmonitor.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['WakeUpMonitor']['resetSleepCountDown']={syn:'Resets the sleep countdown.',lib:'wakeupmonitor.resetSleepCountDown()',pro:'function resetSleepCountDown()',cmt:'Resets the sleep countdown.
',ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['set_logicalName']={syn:'Changes the logical name of the monitor.',lib:'wakeupmonitor.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the monitor. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the monitor.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['set_nextWakeUp']={syn:'Changes the days of the week when a wake up must take place.',lib:'wakeupmonitor.set_nextWakeUp()',pro:'function set_nextWakeUp(newval)',cmt:'Changes the days of the week when a wake up must take place.
',par:{newval:'an integer corresponding to the days of the week when a wake up must take place'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['set_powerDuration']={syn:'Changes the maximal wake up time (seconds) before automatically going to sleep.',lib:'wakeupmonitor.set_powerDuration()',pro:'function set_powerDuration(newval)',cmt:'Changes the maximal wake up time (seconds) before automatically going to sleep.
',par:{newval:'an integer corresponding to the maximal wake up time (seconds) before automatically going to sleep'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['set_sleepCountdown']={syn:'Changes the delay before the next sleep period.',lib:'wakeupmonitor.set_sleepCountdown()',pro:'function set_sleepCountdown(newval)',cmt:'Changes the delay before the next sleep period.
',par:{newval:'an integer corresponding to the delay before the next sleep period'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'wakeupmonitor.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['WakeUpMonitor']['sleep']={syn:'Goes to sleep until the next wake up condition is met, the RTC time must have been set before calling this function.',lib:'wakeupmonitor.sleep()',pro:'function sleep(secBeforeSleep)',cmt:'Goes to sleep until the next wake up condition is met, the RTC time must have been set before calling this function.
',par:{secBeforeSleep:'number of seconds before going into sleep mode,'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['sleepFor']={syn:'Goes to sleep for a specific duration or until the next wake up condition is met, the RTC time must have been set before calling this function.',lib:'wakeupmonitor.sleepFor()',pro:'function sleepFor(secUntilWakeUp, secBeforeSleep)',cmt:'Goes to sleep for a specific duration or until the next wake up condition is met, the RTC time must have been set before calling this function. The count down before sleep can be canceled with resetSleepCountDown.
',par:{secUntilWakeUp:'sleep duration, in secondes',secBeforeSleep:'number of seconds before going into sleep mode'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['sleepUntil']={syn:'Go to sleep until a specific date is reached or until the next wake up condition is met, the RTC time must have been set before calling this function.',lib:'wakeupmonitor.sleepUntil()',pro:'function sleepUntil(wakeUpTime, secBeforeSleep)',cmt:'Go to sleep until a specific date is reached or until the next wake up condition is met, the RTC time must have been set before calling this function. The count down before sleep can be canceled with resetSleepCountDown.
',par:{wakeUpTime:'wake-up datetime (UNIX format)',secBeforeSleep:'number of seconds before going into sleep mode'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpMonitor']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'wakeupmonitor.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; doc['WakeUpMonitor']['wakeUp']={syn:'Forces a wake up.',lib:'wakeupmonitor.wakeUp()',pro:'function wakeUp()',cmt:'Forces a wake up.
'}; //--- (end of generated code: WakeUpMonitor) //--- (generated code: WakeUpSchedule) doc['WakeUpSchedule']={'':{syn:'WakeUpSchedule function interface',inc:'<script type='text/javascript' src='yocto_wakeupschedule.js'></script>',cmt:'The WakeUpSchedule function implements a wake up condition. The wake up time is specified as a set of months and/or days and/or hours and/or minutes when the wake up should happen.
'}}; doc['WakeUpSchedule']['FindWakeUpSchedule']={syn:'Retrieves a wake up schedule for a given identifier.',lib:'YWakeUpSchedule.FindWakeUpSchedule()',pro:'function FindWakeUpSchedule(func)',cmt:'Retrieves a wake up schedule for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of wake up schedules currently accessible. Use the method YWakeUpSchedule.nextWakeUpSchedule() to iterate on next wake up schedules.
',ret:'a pointer to a YWakeUpSchedule object, corresponding to the first wake up schedule currently online, or a null pointer if there are none.'}; doc['WakeUpSchedule']['describe']={syn:'Returns a short text that describes the wake up schedule in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'wakeupschedule.describe()',pro:'function describe()',cmt:'Returns a short text that describes the wake up schedule in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the wake up schedule (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['WakeUpSchedule']['get_advertisedValue']={syn:'Returns the current value of the wake up schedule (no more than 6 characters).',lib:'wakeupschedule.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the wake up schedule (no more than 6 characters).
',ret:'a string corresponding to the current value of the wake up schedule (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['WakeUpSchedule']['get_errorMessage']={syn:'Returns the error message of the latest error with the wake up schedule.',lib:'wakeupschedule.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the wake up schedule. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the wake up schedule object'}; doc['WakeUpSchedule']['get_errorType']={syn:'Returns the numerical error code of the latest error with the wake up schedule.',lib:'wakeupschedule.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the wake up schedule. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the wake up schedule object'}; doc['WakeUpSchedule']['get_friendlyName']={syn:'Returns a global identifier of the wake up schedule in the format MODULE_NAME.FUNCTION_NAME.',lib:'wakeupschedule.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the wake up schedule in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the wake up schedule if they are defined, otherwise the serial number of the module and the hardware identifier of the wake up schedule (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the wake up schedule using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['WakeUpSchedule']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'wakeupschedule.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['WakeUpSchedule']['get_functionId']={syn:'Returns the hardware identifier of the wake up schedule, without reference to the module.',lib:'wakeupschedule.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the wake up schedule, without reference to the module. For example relay1
',ret:'a string that identifies the wake up schedule (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['WakeUpSchedule']['get_hardwareId']={syn:'Returns the unique hardware identifier of the wake up schedule in the form SERIAL.FUNCTIONID.',lib:'wakeupschedule.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the wake up schedule in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the wake up schedule. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the wake up schedule (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['WakeUpSchedule']['get_hours']={syn:'Returns the hours scheduled for wake up.',lib:'wakeupschedule.get_hours()',pro:'function get_hours()',cmt:'Returns the hours scheduled for wake up.
',ret:'an integer corresponding to the hours scheduled for wake up',ext:'On failure, throws an exception or returns Y_HOURS_INVALID.'}; doc['WakeUpSchedule']['get_logicalName']={syn:'Returns the logical name of the wake up schedule.',lib:'wakeupschedule.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the wake up schedule.
',ret:'a string corresponding to the logical name of the wake up schedule. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['WakeUpSchedule']['get_minutes']={syn:'Returns all the minutes of each hour that are scheduled for wake up.',lib:'wakeupschedule.get_minutes()',pro:'function get_minutes()',cmt:'Returns all the minutes of each hour that are scheduled for wake up.
'}; doc['WakeUpSchedule']['get_minutesA']={syn:'Returns the minutes in the 00-29 interval of each hour scheduled for wake up.',lib:'wakeupschedule.get_minutesA()',pro:'function get_minutesA()',cmt:'Returns the minutes in the 00-29 interval of each hour scheduled for wake up.
',ret:'an integer corresponding to the minutes in the 00-29 interval of each hour scheduled for wake up',ext:'On failure, throws an exception or returns Y_MINUTESA_INVALID.'}; doc['WakeUpSchedule']['get_minutesB']={syn:'Returns the minutes in the 30-59 intervalof each hour scheduled for wake up.',lib:'wakeupschedule.get_minutesB()',pro:'function get_minutesB()',cmt:'Returns the minutes in the 30-59 intervalof each hour scheduled for wake up.
',ret:'an integer corresponding to the minutes in the 30-59 intervalof each hour scheduled for wake up',ext:'On failure, throws an exception or returns Y_MINUTESB_INVALID.'}; doc['WakeUpSchedule']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'wakeupschedule.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['WakeUpSchedule']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'wakeupschedule.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['WakeUpSchedule']['get_monthDays']={syn:'Returns the days of the month scheduled for wake up.',lib:'wakeupschedule.get_monthDays()',pro:'function get_monthDays()',cmt:'Returns the days of the month scheduled for wake up.
',ret:'an integer corresponding to the days of the month scheduled for wake up',ext:'On failure, throws an exception or returns Y_MONTHDAYS_INVALID.'}; doc['WakeUpSchedule']['get_months']={syn:'Returns the months scheduled for wake up.',lib:'wakeupschedule.get_months()',pro:'function get_months()',cmt:'Returns the months scheduled for wake up.
',ret:'an integer corresponding to the months scheduled for wake up',ext:'On failure, throws an exception or returns Y_MONTHS_INVALID.'}; doc['WakeUpSchedule']['get_nextOccurence']={syn:'Returns the date/time (seconds) of the next wake up occurence ',lib:'wakeupschedule.get_nextOccurence()',pro:'function get_nextOccurence()',cmt:'Returns the date/time (seconds) of the next wake up occurence
',ret:'an integer corresponding to the date/time (seconds) of the next wake up occurence',ext:'On failure, throws an exception or returns Y_NEXTOCCURENCE_INVALID.'}; doc['WakeUpSchedule']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'wakeupschedule.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['WakeUpSchedule']['get_weekDays']={syn:'Returns the days of the week scheduled for wake up.',lib:'wakeupschedule.get_weekDays()',pro:'function get_weekDays()',cmt:'Returns the days of the week scheduled for wake up.
',ret:'an integer corresponding to the days of the week scheduled for wake up',ext:'On failure, throws an exception or returns Y_WEEKDAYS_INVALID.'}; doc['WakeUpSchedule']['isOnline']={syn:'Checks if the wake up schedule is currently reachable, without raising any error.',lib:'wakeupschedule.isOnline()',pro:'function isOnline()',cmt:'Checks if the wake up schedule is currently reachable, without raising any error. If there is a cached value for the wake up schedule in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the wake up schedule.
',ret:'true if the wake up schedule can be reached, and false otherwise'}; doc['WakeUpSchedule']['isOnline_async']={syn:'Checks if the wake up schedule is currently reachable, without raising any error (asynchronous version).',lib:'wakeupschedule.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the wake up schedule is currently reachable, without raising any error (asynchronous version). If there is a cached value for the wake up schedule in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['WakeUpSchedule']['load']={syn:'Preloads the wake up schedule cache with a specified validity duration.',lib:'wakeupschedule.load()',pro:'function load(msValidity)',cmt:'Preloads the wake up schedule cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['load_async']={syn:'Preloads the wake up schedule cache with a specified validity duration (asynchronous version).',lib:'wakeupschedule.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the wake up schedule cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['WakeUpSchedule']['nextWakeUpSchedule']={syn:'Continues the enumeration of wake up schedules started using yFirstWakeUpSchedule().',lib:'wakeupschedule.nextWakeUpSchedule()',pro:'function nextWakeUpSchedule()',cmt:'Continues the enumeration of wake up schedules started using yFirstWakeUpSchedule().
',ret:'a pointer to a YWakeUpSchedule object, corresponding to a wake up schedule currently online, or a null pointer if there are no more wake up schedules to enumerate.'}; doc['WakeUpSchedule']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'wakeupschedule.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['WakeUpSchedule']['set_hours']={syn:'Changes the hours when a wake up must take place.',lib:'wakeupschedule.set_hours()',pro:'function set_hours(newval)',cmt:'Changes the hours when a wake up must take place.
',par:{newval:'an integer corresponding to the hours when a wake up must take place'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['set_logicalName']={syn:'Changes the logical name of the wake up schedule.',lib:'wakeupschedule.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the wake up schedule. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the wake up schedule.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['set_minutes']={syn:'Changes all the minutes where a wake up must take place.',lib:'wakeupschedule.set_minutes()',pro:'function set_minutes(bitmap)',cmt:'Changes all the minutes where a wake up must take place.
',par:{bitmap:'Minutes 00-59 of each hour scheduled for wake up.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['set_minutesA']={syn:'Changes the minutes in the 00-29 interval when a wake up must take place.',lib:'wakeupschedule.set_minutesA()',pro:'function set_minutesA(newval)',cmt:'Changes the minutes in the 00-29 interval when a wake up must take place.
',par:{newval:'an integer corresponding to the minutes in the 00-29 interval when a wake up must take place'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['set_minutesB']={syn:'Changes the minutes in the 30-59 interval when a wake up must take place.',lib:'wakeupschedule.set_minutesB()',pro:'function set_minutesB(newval)',cmt:'Changes the minutes in the 30-59 interval when a wake up must take place.
',par:{newval:'an integer corresponding to the minutes in the 30-59 interval when a wake up must take place'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['set_monthDays']={syn:'Changes the days of the month when a wake up must take place.',lib:'wakeupschedule.set_monthDays()',pro:'function set_monthDays(newval)',cmt:'Changes the days of the month when a wake up must take place.
',par:{newval:'an integer corresponding to the days of the month when a wake up must take place'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['set_months']={syn:'Changes the months when a wake up must take place.',lib:'wakeupschedule.set_months()',pro:'function set_months(newval)',cmt:'Changes the months when a wake up must take place.
',par:{newval:'an integer corresponding to the months when a wake up must take place'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'wakeupschedule.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['WakeUpSchedule']['set_weekDays']={syn:'Changes the days of the week when a wake up must take place.',lib:'wakeupschedule.set_weekDays()',pro:'function set_weekDays(newval)',cmt:'Changes the days of the week when a wake up must take place.
',par:{newval:'an integer corresponding to the days of the week when a wake up must take place'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['WakeUpSchedule']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'wakeupschedule.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: WakeUpSchedule) //--- (generated code: GenericSensor) doc['GenericSensor']={'':{syn:'GenericSensor function interface',inc:'<script type='text/javascript' src='yocto_genericsensor.js'></script>',cmt:'The Yoctopuce application programming interface allows you to read an instant measure of the sensor, as well as the minimal and maximal values observed.
'}}; doc['GenericSensor']['FindGenericSensor']={syn:'Retrieves a generic sensor for a given identifier.',lib:'YGenericSensor.FindGenericSensor()',pro:'function FindGenericSensor(func)',cmt:'Retrieves a generic sensor for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of generic sensors currently accessible. Use the method YGenericSensor.nextGenericSensor() to iterate on next generic sensors.
',ret:'a pointer to a YGenericSensor object, corresponding to the first generic sensor currently online, or a null pointer if there are none.'}; doc['GenericSensor']['calibrateFromPoints']={syn:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure.',lib:'genericsensor.calibrateFromPoints()',pro:'function calibrateFromPoints(rawValues, refValues)',cmt:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure. It is possible to configure up to five correction points. Correction points must be provided in ascending order, and be in the range of the sensor. The device will automatically perform a linear interpolation of the error correction between specified points. Remember to call the saveToFlash() method of the module if the modification must be kept.
For more information on advanced capabilities to refine the calibration of sensors, please contact support
',par:{rawValues:'array of floating point numbers, corresponding to the raw values returned by the sensor for the correction points.',refValues:'array of floating point numbers, corresponding to the corrected values for the correction points.'}}; doc['GenericSensor']['describe']={syn:'Returns a short text that describes the generic sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'genericsensor.describe()',pro:'function describe()',cmt:'Returns a short text that describes the generic sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the generic sensor (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['GenericSensor']['get_advertisedValue']={syn:'Returns the current value of the generic sensor (no more than 6 characters).',lib:'genericsensor.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the generic sensor (no more than 6 characters).
',ret:'a string corresponding to the current value of the generic sensor (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['GenericSensor']['get_currentRawValue']={syn:'Returns the uncalibrated, unrounded raw value returned by the sensor.',lib:'genericsensor.get_currentRawValue()',pro:'function get_currentRawValue()',cmt:'Returns the uncalibrated, unrounded raw value returned by the sensor.
',ret:'a floating point number corresponding to the uncalibrated, unrounded raw value returned by the sensor',ext:'On failure, throws an exception or returns Y_CURRENTRAWVALUE_INVALID.'}; doc['GenericSensor']['get_currentValue']={syn:'Returns the current measured value.',lib:'genericsensor.get_currentValue()',pro:'function get_currentValue()',cmt:'Returns the current measured value.
',ret:'a floating point number corresponding to the current measured value',ext:'On failure, throws an exception or returns Y_CURRENTVALUE_INVALID.'}; doc['GenericSensor']['get_errorMessage']={syn:'Returns the error message of the latest error with the generic sensor.',lib:'genericsensor.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the generic sensor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the generic sensor object'}; doc['GenericSensor']['get_errorType']={syn:'Returns the numerical error code of the latest error with the generic sensor.',lib:'genericsensor.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the generic sensor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the generic sensor object'}; doc['GenericSensor']['get_friendlyName']={syn:'Returns a global identifier of the generic sensor in the format MODULE_NAME.FUNCTION_NAME.',lib:'genericsensor.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the generic sensor in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the generic sensor if they are defined, otherwise the serial number of the module and the hardware identifier of the generic sensor (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the generic sensor using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['GenericSensor']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'genericsensor.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['GenericSensor']['get_functionId']={syn:'Returns the hardware identifier of the generic sensor, without reference to the module.',lib:'genericsensor.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the generic sensor, without reference to the module. For example relay1
',ret:'a string that identifies the generic sensor (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['GenericSensor']['get_hardwareId']={syn:'Returns the unique hardware identifier of the generic sensor in the form SERIAL.FUNCTIONID.',lib:'genericsensor.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the generic sensor in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the generic sensor. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the generic sensor (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['GenericSensor']['get_highestValue']={syn:'Returns the maximal value observed.',lib:'genericsensor.get_highestValue()',pro:'function get_highestValue()',cmt:'Returns the maximal value observed.
',ret:'a floating point number corresponding to the maximal value observed',ext:'On failure, throws an exception or returns Y_HIGHESTVALUE_INVALID.'}; doc['GenericSensor']['get_logFrequency']={syn:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.',lib:'genericsensor.get_logFrequency()',pro:'function get_logFrequency()',cmt:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.
',ret:'a string corresponding to the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory',ext:'On failure, throws an exception or returns Y_LOGFREQUENCY_INVALID.'}; doc['GenericSensor']['get_logicalName']={syn:'Returns the logical name of the generic sensor.',lib:'genericsensor.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the generic sensor.
',ret:'a string corresponding to the logical name of the generic sensor. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['GenericSensor']['get_lowestValue']={syn:'Returns the minimal value observed.',lib:'genericsensor.get_lowestValue()',pro:'function get_lowestValue()',cmt:'Returns the minimal value observed.
',ret:'a floating point number corresponding to the minimal value observed',ext:'On failure, throws an exception or returns Y_LOWESTVALUE_INVALID.'}; doc['GenericSensor']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'genericsensor.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['GenericSensor']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'genericsensor.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['GenericSensor']['get_recordedData']={syn:'Retrieves a DataSet object holding historical data for this sensor, for a specified time interval.',lib:'genericsensor.get_recordedData()',pro:'function get_recordedData(startTime, endTime)',cmt:'Retrieves a DataSet object holding historical data for this sensor, for a specified time interval. The measures will be retrieved from the data logger, which must have been turned on at the desired time. See the documentation of the DataSet class for information on how to get an overview of the recorded data, and how to load progressively a large set of measures from the data logger.
This function only works if the device uses a recent firmware, as DataSet objects are not supported by firmwares older than version 13000.
',par:{startTime:'the start of the desired measure time interval, as a Unix timestamp, i.e. the number of seconds since January 1, 1970 UTC. The special value 0 can be used to include any meaasure, without initial limit.',endTime:'the end of the desired measure time interval, as a Unix timestamp, i.e. the number of seconds since January 1, 1970 UTC. The special value 0 can be used to include any meaasure, without ending limit.'},ret:'an instance of YDataSet, providing access to historical data. Past measures can be loaded progressively using methods from the YDataSet object.'}; doc['GenericSensor']['get_reportFrequency']={syn:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.',lib:'genericsensor.get_reportFrequency()',pro:'function get_reportFrequency()',cmt:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.
',ret:'a string corresponding to the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function',ext:'On failure, throws an exception or returns Y_REPORTFREQUENCY_INVALID.'}; doc['GenericSensor']['get_resolution']={syn:'Returns the resolution of the measured values.',lib:'genericsensor.get_resolution()',pro:'function get_resolution()',cmt:'Returns the resolution of the measured values. The resolution corresponds to the numerical precision of the measures, which is not always the same as the actual precision of the sensor.
',ret:'a floating point number corresponding to the resolution of the measured values',ext:'On failure, throws an exception or returns Y_RESOLUTION_INVALID.'}; doc['GenericSensor']['get_signalRange']={syn:'Returns the electric signal range used by the sensor.',lib:'genericsensor.get_signalRange()',pro:'function get_signalRange()',cmt:'Returns the electric signal range used by the sensor.
',ret:'a string corresponding to the electric signal range used by the sensor',ext:'On failure, throws an exception or returns Y_SIGNALRANGE_INVALID.'}; doc['GenericSensor']['get_signalUnit']={syn:'Returns the measuring unit of the electrical signal used by the sensor.',lib:'genericsensor.get_signalUnit()',pro:'function get_signalUnit()',cmt:'Returns the measuring unit of the electrical signal used by the sensor.
',ret:'a string corresponding to the measuring unit of the electrical signal used by the sensor',ext:'On failure, throws an exception or returns Y_SIGNALUNIT_INVALID.'}; doc['GenericSensor']['get_signalValue']={syn:'Returns the measured value of the electrical signal used by the sensor.',lib:'genericsensor.get_signalValue()',pro:'function get_signalValue()',cmt:'Returns the measured value of the electrical signal used by the sensor.
',ret:'a floating point number corresponding to the measured value of the electrical signal used by the sensor',ext:'On failure, throws an exception or returns Y_SIGNALVALUE_INVALID.'}; doc['GenericSensor']['get_unit']={syn:'Returns the measuring unit for the measured value.',lib:'genericsensor.get_unit()',pro:'function get_unit()',cmt:'Returns the measuring unit for the measured value.
',ret:'a string corresponding to the measuring unit for the measured value',ext:'On failure, throws an exception or returns Y_UNIT_INVALID.'}; doc['GenericSensor']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'genericsensor.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['GenericSensor']['get_valueRange']={syn:'Returns the physical value range measured by the sensor.',lib:'genericsensor.get_valueRange()',pro:'function get_valueRange()',cmt:'Returns the physical value range measured by the sensor.
',ret:'a string corresponding to the physical value range measured by the sensor',ext:'On failure, throws an exception or returns Y_VALUERANGE_INVALID.'}; doc['GenericSensor']['isOnline']={syn:'Checks if the generic sensor is currently reachable, without raising any error.',lib:'genericsensor.isOnline()',pro:'function isOnline()',cmt:'Checks if the generic sensor is currently reachable, without raising any error. If there is a cached value for the generic sensor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the generic sensor.
',ret:'true if the generic sensor can be reached, and false otherwise'}; doc['GenericSensor']['isOnline_async']={syn:'Checks if the generic sensor is currently reachable, without raising any error (asynchronous version).',lib:'genericsensor.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the generic sensor is currently reachable, without raising any error (asynchronous version). If there is a cached value for the generic sensor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['GenericSensor']['load']={syn:'Preloads the generic sensor cache with a specified validity duration.',lib:'genericsensor.load()',pro:'function load(msValidity)',cmt:'Preloads the generic sensor cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['loadCalibrationPoints']={syn:'Retrieves error correction data points previously entered using the method calibrateFromPoints.',lib:'genericsensor.loadCalibrationPoints()',pro:'function loadCalibrationPoints(rawValues, refValues)',cmt:'Retrieves error correction data points previously entered using the method calibrateFromPoints.
',par:{rawValues:'array of floating point numbers, that will be filled by the function with the raw sensor values for the correction points.',refValues:'array of floating point numbers, that will be filled by the function with the desired values for the correction points.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['load_async']={syn:'Preloads the generic sensor cache with a specified validity duration (asynchronous version).',lib:'genericsensor.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the generic sensor cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['GenericSensor']['nextGenericSensor']={syn:'Continues the enumeration of generic sensors started using yFirstGenericSensor().',lib:'genericsensor.nextGenericSensor()',pro:'function nextGenericSensor()',cmt:'Continues the enumeration of generic sensors started using yFirstGenericSensor().
',ret:'a pointer to a YGenericSensor object, corresponding to a generic sensor currently online, or a null pointer if there are no more generic sensors to enumerate.'}; doc['GenericSensor']['registerTimedReportCallback']={syn:'Registers the callback function that is invoked on every periodic timed notification.',lib:'genericsensor.registerTimedReportCallback()',pro:'function registerTimedReportCallback(callback)',cmt:'Registers the callback function that is invoked on every periodic timed notification. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and an YMeasure object describing the new advertised value.'}}; doc['GenericSensor']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'genericsensor.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['GenericSensor']['set_highestValue']={syn:'Changes the recorded maximal value observed.',lib:'genericsensor.set_highestValue()',pro:'function set_highestValue(newval)',cmt:'Changes the recorded maximal value observed.
',par:{newval:'a floating point number corresponding to the recorded maximal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['set_logFrequency']={syn:'Changes the datalogger recording frequency for this function.',lib:'genericsensor.set_logFrequency()',pro:'function set_logFrequency(newval)',cmt:'Changes the datalogger recording frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable recording for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the datalogger recording frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['set_logicalName']={syn:'Changes the logical name of the generic sensor.',lib:'genericsensor.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the generic sensor. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the generic sensor.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['set_lowestValue']={syn:'Changes the recorded minimal value observed.',lib:'genericsensor.set_lowestValue()',pro:'function set_lowestValue(newval)',cmt:'Changes the recorded minimal value observed.
',par:{newval:'a floating point number corresponding to the recorded minimal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['set_reportFrequency']={syn:'Changes the timed value notification frequency for this function.',lib:'genericsensor.set_reportFrequency()',pro:'function set_reportFrequency(newval)',cmt:'Changes the timed value notification frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable timed value notifications for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the timed value notification frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['set_resolution']={syn:'Changes the resolution of the measured physical values.',lib:'genericsensor.set_resolution()',pro:'function set_resolution(newval)',cmt:'Changes the resolution of the measured physical values. The resolution corresponds to the numerical precision when displaying value. It does not change the precision of the measure itself.
',par:{newval:'a floating point number corresponding to the resolution of the measured physical values'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['set_signalRange']={syn:'Changes the electric signal range used by the sensor.',lib:'genericsensor.set_signalRange()',pro:'function set_signalRange(newval)',cmt:'Changes the electric signal range used by the sensor.
',par:{newval:'a string corresponding to the electric signal range used by the sensor'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['set_unit']={syn:'Changes the measuring unit for the measured value.',lib:'genericsensor.set_unit()',pro:'function set_unit(newval)',cmt:'Changes the measuring unit for the measured value. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the measuring unit for the measured value'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'genericsensor.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['GenericSensor']['set_valueRange']={syn:'Changes the physical value range measured by the sensor.',lib:'genericsensor.set_valueRange()',pro:'function set_valueRange(newval)',cmt:'Changes the physical value range measured by the sensor. The range change may have a side effect on the display resolution, as it may be adapted automatically.
',par:{newval:'a string corresponding to the physical value range measured by the sensor'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['GenericSensor']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'genericsensor.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: GenericSensor) //--- (generated code: DigitalIO) doc['DigitalIO']={'':{syn:'Digital IO function interface',inc:'<script type='text/javascript' src='yocto_digitalio.js'></script>',cmt:'The Yoctopuce application programming interface allows you to switch the state of each bit of the I/O port. You can switch all bits at once, or one by one. The library can also automatically generate short pulses of a determined duration. Electrical behavior of each I/O can be modified (open drain and reverse polarity).
'}}; doc['DigitalIO']['FindDigitalIO']={syn:'Retrieves a digital IO port for a given identifier.',lib:'YDigitalIO.FindDigitalIO()',pro:'function FindDigitalIO(func)',cmt:'Retrieves a digital IO port for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of digital IO ports currently accessible. Use the method YDigitalIO.nextDigitalIO() to iterate on next digital IO ports.
',ret:'a pointer to a YDigitalIO object, corresponding to the first digital IO port currently online, or a null pointer if there are none.'}; doc['DigitalIO']['delayedPulse']={syn:'Schedules a pulse on a single bit for a specified duration.',lib:'digitalio.delayedPulse()',pro:'function delayedPulse(bitno, ms_delay, ms_duration)',cmt:'Schedules a pulse on a single bit for a specified duration. The specified bit will be turned to 1, and then back to 0 after the given duration.
',par:{bitno:'the bit number; lowest bit has index 0',ms_delay:'waiting time before the pulse, in milliseconds',ms_duration:'desired pulse duration in milliseconds. Be aware that the device time resolution is not guaranteed up to the millisecond.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['describe']={syn:'Returns a short text that describes the digital IO port in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'digitalio.describe()',pro:'function describe()',cmt:'Returns a short text that describes the digital IO port in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the digital IO port (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['DigitalIO']['get_advertisedValue']={syn:'Returns the current value of the digital IO port (no more than 6 characters).',lib:'digitalio.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the digital IO port (no more than 6 characters).
',ret:'a string corresponding to the current value of the digital IO port (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['DigitalIO']['get_bitDirection']={syn:'Returns the direction of a single bit from the I/O port (0 means the bit is an input, 1 an output).',lib:'digitalio.get_bitDirection()',pro:'function get_bitDirection(bitno)',cmt:'Returns the direction of a single bit from the I/O port (0 means the bit is an input, 1 an output).
',par:{bitno:'the bit number; lowest bit has index 0'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['get_bitOpenDrain']={syn:'Returns the type of electrical interface of a single bit from the I/O port.',lib:'digitalio.get_bitOpenDrain()',pro:'function get_bitOpenDrain(bitno)',cmt:'Returns the type of electrical interface of a single bit from the I/O port. (0 means the bit is an input, 1 an output).
',par:{bitno:'the bit number; lowest bit has index 0'},ret:'0 means the a bit is a regular input/output, 1 means the bit is an open-drain (open-collector) input/output.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['get_bitPolarity']={syn:'Returns the polarity of a single bit from the I/O port (0 means the I/O works in regular mode, 1 means the I/O works in reverse mode).',lib:'digitalio.get_bitPolarity()',pro:'function get_bitPolarity(bitno)',cmt:'Returns the polarity of a single bit from the I/O port (0 means the I/O works in regular mode, 1 means the I/O works in reverse mode).
',par:{bitno:'the bit number; lowest bit has index 0'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['get_bitState']={syn:'Returns the state of a single bit of the I/O port.',lib:'digitalio.get_bitState()',pro:'function get_bitState(bitno)',cmt:'Returns the state of a single bit of the I/O port.
',par:{bitno:'the bit number; lowest bit has index 0'},ret:'the bit state (0 or 1)',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['get_errorMessage']={syn:'Returns the error message of the latest error with the digital IO port.',lib:'digitalio.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the digital IO port. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the digital IO port object'}; doc['DigitalIO']['get_errorType']={syn:'Returns the numerical error code of the latest error with the digital IO port.',lib:'digitalio.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the digital IO port. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the digital IO port object'}; doc['DigitalIO']['get_friendlyName']={syn:'Returns a global identifier of the digital IO port in the format MODULE_NAME.FUNCTION_NAME.',lib:'digitalio.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the digital IO port in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the digital IO port if they are defined, otherwise the serial number of the module and the hardware identifier of the digital IO port (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the digital IO port using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['DigitalIO']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'digitalio.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['DigitalIO']['get_functionId']={syn:'Returns the hardware identifier of the digital IO port, without reference to the module.',lib:'digitalio.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the digital IO port, without reference to the module. For example relay1
',ret:'a string that identifies the digital IO port (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['DigitalIO']['get_hardwareId']={syn:'Returns the unique hardware identifier of the digital IO port in the form SERIAL.FUNCTIONID.',lib:'digitalio.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the digital IO port in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the digital IO port. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the digital IO port (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['DigitalIO']['get_logicalName']={syn:'Returns the logical name of the digital IO port.',lib:'digitalio.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the digital IO port.
',ret:'a string corresponding to the logical name of the digital IO port. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['DigitalIO']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'digitalio.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['DigitalIO']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'digitalio.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['DigitalIO']['get_outputVoltage']={syn:'Returns the voltage source used to drive output bits.',lib:'digitalio.get_outputVoltage()',pro:'function get_outputVoltage()',cmt:'Returns the voltage source used to drive output bits.
',ret:'a value among Y_OUTPUTVOLTAGE_USB_5V, Y_OUTPUTVOLTAGE_USB_3V and Y_OUTPUTVOLTAGE_EXT_V corresponding to the voltage source used to drive output bits',ext:'On failure, throws an exception or returns Y_OUTPUTVOLTAGE_INVALID.'}; doc['DigitalIO']['get_portDirection']={syn:'Returns the IO direction of all bits of the port: 0 makes a bit an input, 1 makes it an output.',lib:'digitalio.get_portDirection()',pro:'function get_portDirection()',cmt:'Returns the IO direction of all bits of the port: 0 makes a bit an input, 1 makes it an output.
',ret:'an integer corresponding to the IO direction of all bits of the port: 0 makes a bit an input, 1 makes it an output',ext:'On failure, throws an exception or returns Y_PORTDIRECTION_INVALID.'}; doc['DigitalIO']['get_portOpenDrain']={syn:'Returns the electrical interface for each bit of the port.',lib:'digitalio.get_portOpenDrain()',pro:'function get_portOpenDrain()',cmt:'Returns the electrical interface for each bit of the port. For each bit set to 0 the matching I/O works in the regular, intuitive way, for each bit set to 1, the I/O works in reverse mode.
',ret:'an integer corresponding to the electrical interface for each bit of the port',ext:'On failure, throws an exception or returns Y_PORTOPENDRAIN_INVALID.'}; doc['DigitalIO']['get_portPolarity']={syn:'Returns the polarity of all the bits of the port.',lib:'digitalio.get_portPolarity()',pro:'function get_portPolarity()',cmt:'Returns the polarity of all the bits of the port. For each bit set to 0, the matching I/O works the regular, intuitive way; for each bit set to 1, the I/O works in reverse mode.
',ret:'an integer corresponding to the polarity of all the bits of the port',ext:'On failure, throws an exception or returns Y_PORTPOLARITY_INVALID.'}; doc['DigitalIO']['get_portSize']={syn:'Returns the number of bits implemented in the I/O port.',lib:'digitalio.get_portSize()',pro:'function get_portSize()',cmt:'Returns the number of bits implemented in the I/O port.
',ret:'an integer corresponding to the number of bits implemented in the I/O port',ext:'On failure, throws an exception or returns Y_PORTSIZE_INVALID.'}; doc['DigitalIO']['get_portState']={syn:'Returns the digital IO port state: bit 0 represents input 0, and so on.',lib:'digitalio.get_portState()',pro:'function get_portState()',cmt:'Returns the digital IO port state: bit 0 represents input 0, and so on.
',ret:'an integer corresponding to the digital IO port state: bit 0 represents input 0, and so on',ext:'On failure, throws an exception or returns Y_PORTSTATE_INVALID.'}; doc['DigitalIO']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'digitalio.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['DigitalIO']['isOnline']={syn:'Checks if the digital IO port is currently reachable, without raising any error.',lib:'digitalio.isOnline()',pro:'function isOnline()',cmt:'Checks if the digital IO port is currently reachable, without raising any error. If there is a cached value for the digital IO port in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the digital IO port.
',ret:'true if the digital IO port can be reached, and false otherwise'}; doc['DigitalIO']['isOnline_async']={syn:'Checks if the digital IO port is currently reachable, without raising any error (asynchronous version).',lib:'digitalio.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the digital IO port is currently reachable, without raising any error (asynchronous version). If there is a cached value for the digital IO port in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['DigitalIO']['load']={syn:'Preloads the digital IO port cache with a specified validity duration.',lib:'digitalio.load()',pro:'function load(msValidity)',cmt:'Preloads the digital IO port cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['load_async']={syn:'Preloads the digital IO port cache with a specified validity duration (asynchronous version).',lib:'digitalio.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the digital IO port cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['DigitalIO']['nextDigitalIO']={syn:'Continues the enumeration of digital IO ports started using yFirstDigitalIO().',lib:'digitalio.nextDigitalIO()',pro:'function nextDigitalIO()',cmt:'Continues the enumeration of digital IO ports started using yFirstDigitalIO().
',ret:'a pointer to a YDigitalIO object, corresponding to a digital IO port currently online, or a null pointer if there are no more digital IO ports to enumerate.'}; doc['DigitalIO']['pulse']={syn:'Triggers a pulse on a single bit for a specified duration.',lib:'digitalio.pulse()',pro:'function pulse(bitno, ms_duration)',cmt:'Triggers a pulse on a single bit for a specified duration. The specified bit will be turned to 1, and then back to 0 after the given duration.
',par:{bitno:'the bit number; lowest bit has index 0',ms_duration:'desired pulse duration in milliseconds. Be aware that the device time resolution is not guaranteed up to the millisecond.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'digitalio.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['DigitalIO']['set_bitDirection']={syn:'Changes the direction of a single bit from the I/O port.',lib:'digitalio.set_bitDirection()',pro:'function set_bitDirection(bitno, bitdirection)',cmt:'Changes the direction of a single bit from the I/O port.
',par:{bitno:'the bit number; lowest bit has index 0',bitdirection:'direction to set, 0 makes the bit an input, 1 makes it an output. Remember to call the saveToFlash() method to make sure the setting is kept after a reboot.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_bitOpenDrain']={syn:'Changes the electrical interface of a single bit from the I/O port.',lib:'digitalio.set_bitOpenDrain()',pro:'function set_bitOpenDrain(bitno, opendrain)',cmt:'Changes the electrical interface of a single bit from the I/O port.
',par:{bitno:'the bit number; lowest bit has index 0',opendrain:'0 makes a bit a regular input/output, 1 makes it an open-drain (open-collector) input/output. Remember to call the saveToFlash() method to make sure the setting is kept after a reboot.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_bitPolarity']={syn:'Changes the polarity of a single bit from the I/O port.',lib:'digitalio.set_bitPolarity()',pro:'function set_bitPolarity(bitno, bitpolarity)',cmt:'Changes the polarity of a single bit from the I/O port.
',par:{bitno:'the bit number; lowest bit has index 0.',bitpolarity:'polarity to set, 0 makes the I/O work in regular mode, 1 makes the I/O works in reverse mode. Remember to call the saveToFlash() method to make sure the setting is kept after a reboot.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_bitState']={syn:'Sets a single bit of the I/O port.',lib:'digitalio.set_bitState()',pro:'function set_bitState(bitno, bitstate)',cmt:'Sets a single bit of the I/O port.
',par:{bitno:'the bit number; lowest bit has index 0',bitstate:'the state of the bit (1 or 0)'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_logicalName']={syn:'Changes the logical name of the digital IO port.',lib:'digitalio.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the digital IO port. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the digital IO port.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_outputVoltage']={syn:'Changes the voltage source used to drive output bits.',lib:'digitalio.set_outputVoltage()',pro:'function set_outputVoltage(newval)',cmt:'Changes the voltage source used to drive output bits. Remember to call the saveToFlash() method to make sure the setting is kept after a reboot.
',par:{newval:'a value among Y_OUTPUTVOLTAGE_USB_5V, Y_OUTPUTVOLTAGE_USB_3V and Y_OUTPUTVOLTAGE_EXT_V corresponding to the voltage source used to drive output bits'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_portDirection']={syn:'Changes the IO direction of all bits of the port: 0 makes a bit an input, 1 makes it an output.',lib:'digitalio.set_portDirection()',pro:'function set_portDirection(newval)',cmt:'Changes the IO direction of all bits of the port: 0 makes a bit an input, 1 makes it an output. Remember to call the saveToFlash() method to make sure the setting is kept after a reboot.
',par:{newval:'an integer corresponding to the IO direction of all bits of the port: 0 makes a bit an input, 1 makes it an output'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_portOpenDrain']={syn:'Changes the electrical interface for each bit of the port.',lib:'digitalio.set_portOpenDrain()',pro:'function set_portOpenDrain(newval)',cmt:'Changes the electrical interface for each bit of the port. 0 makes a bit a regular input/output, 1 makes it an open-drain (open-collector) input/output. Remember to call the saveToFlash() method to make sure the setting is kept after a reboot.
',par:{newval:'an integer corresponding to the electrical interface for each bit of the port'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_portPolarity']={syn:'Changes the polarity of all the bits of the port: 0 makes a bit an input, 1 makes it an output.',lib:'digitalio.set_portPolarity()',pro:'function set_portPolarity(newval)',cmt:'Changes the polarity of all the bits of the port: 0 makes a bit an input, 1 makes it an output. Remember to call the saveToFlash() method to make sure the setting will be kept after a reboot.
',par:{newval:'an integer corresponding to the polarity of all the bits of the port: 0 makes a bit an input, 1 makes it an output'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_portState']={syn:'Changes the digital IO port state: bit 0 represents input 0, and so on.',lib:'digitalio.set_portState()',pro:'function set_portState(newval)',cmt:'Changes the digital IO port state: bit 0 represents input 0, and so on. This function has no effect on bits configured as input in portDirection.
',par:{newval:'an integer corresponding to the digital IO port state: bit 0 represents input 0, and so on'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'digitalio.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['DigitalIO']['toggle_bitState']={syn:'Reverts a single bit of the I/O port.',lib:'digitalio.toggle_bitState()',pro:'function toggle_bitState(bitno)',cmt:'Reverts a single bit of the I/O port.
',par:{bitno:'the bit number; lowest bit has index 0'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DigitalIO']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'digitalio.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: DigitalIO) //--- (generated code: OsControl) doc['OsControl']={'':{syn:'OS control',inc:'<script type='text/javascript' src='yocto_oscontrol.js'></script>',cmt:'The OScontrol object allows some control over the operating system running a VirtualHub. OsControl is available on the VirtualHub software only. This feature must be activated at the VirtualHub start up with -o option.
'}}; doc['OsControl']['FindOsControl']={syn:'Retrieves OS control for a given identifier.',lib:'YOsControl.FindOsControl()',pro:'function FindOsControl(func)',cmt:'Retrieves OS control for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of OS control currently accessible. Use the method YOsControl.nextOsControl() to iterate on next OS control.
',ret:'a pointer to a YOsControl object, corresponding to the first OS control currently online, or a null pointer if there are none.'}; doc['OsControl']['describe']={syn:'Returns a short text that describes the OS control in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'oscontrol.describe()',pro:'function describe()',cmt:'Returns a short text that describes the OS control in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the OS control (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['OsControl']['get_advertisedValue']={syn:'Returns the current value of the OS control (no more than 6 characters).',lib:'oscontrol.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the OS control (no more than 6 characters).
',ret:'a string corresponding to the current value of the OS control (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['OsControl']['get_errorMessage']={syn:'Returns the error message of the latest error with the OS control.',lib:'oscontrol.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the OS control. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the OS control object'}; doc['OsControl']['get_errorType']={syn:'Returns the numerical error code of the latest error with the OS control.',lib:'oscontrol.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the OS control. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the OS control object'}; doc['OsControl']['get_friendlyName']={syn:'Returns a global identifier of the OS control in the format MODULE_NAME.FUNCTION_NAME.',lib:'oscontrol.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the OS control in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the OS control if they are defined, otherwise the serial number of the module and the hardware identifier of the OS control (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the OS control using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['OsControl']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'oscontrol.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['OsControl']['get_functionId']={syn:'Returns the hardware identifier of the OS control, without reference to the module.',lib:'oscontrol.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the OS control, without reference to the module. For example relay1
',ret:'a string that identifies the OS control (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['OsControl']['get_hardwareId']={syn:'Returns the unique hardware identifier of the OS control in the form SERIAL.FUNCTIONID.',lib:'oscontrol.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the OS control in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the OS control. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the OS control (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['OsControl']['get_logicalName']={syn:'Returns the logical name of the OS control.',lib:'oscontrol.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the OS control.
',ret:'a string corresponding to the logical name of the OS control. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['OsControl']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'oscontrol.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['OsControl']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'oscontrol.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['OsControl']['get_shutdownCountdown']={syn:'Returns the remaining number of seconds before the OS shutdown, or zero when no shutdown has been scheduled.',lib:'oscontrol.get_shutdownCountdown()',pro:'function get_shutdownCountdown()',cmt:'Returns the remaining number of seconds before the OS shutdown, or zero when no shutdown has been scheduled.
',ret:'an integer corresponding to the remaining number of seconds before the OS shutdown, or zero when no shutdown has been scheduled',ext:'On failure, throws an exception or returns Y_SHUTDOWNCOUNTDOWN_INVALID.'}; doc['OsControl']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'oscontrol.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['OsControl']['isOnline']={syn:'Checks if the OS control is currently reachable, without raising any error.',lib:'oscontrol.isOnline()',pro:'function isOnline()',cmt:'Checks if the OS control is currently reachable, without raising any error. If there is a cached value for the OS control in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the OS control.
',ret:'true if the OS control can be reached, and false otherwise'}; doc['OsControl']['isOnline_async']={syn:'Checks if the OS control is currently reachable, without raising any error (asynchronous version).',lib:'oscontrol.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the OS control is currently reachable, without raising any error (asynchronous version). If there is a cached value for the OS control in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['OsControl']['load']={syn:'Preloads the OS control cache with a specified validity duration.',lib:'oscontrol.load()',pro:'function load(msValidity)',cmt:'Preloads the OS control cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['OsControl']['load_async']={syn:'Preloads the OS control cache with a specified validity duration (asynchronous version).',lib:'oscontrol.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the OS control cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['OsControl']['nextOsControl']={syn:'Continues the enumeration of OS control started using yFirstOsControl().',lib:'oscontrol.nextOsControl()',pro:'function nextOsControl()',cmt:'Continues the enumeration of OS control started using yFirstOsControl().
',ret:'a pointer to a YOsControl object, corresponding to OS control currently online, or a null pointer if there are no more OS control to enumerate.'}; doc['OsControl']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'oscontrol.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['OsControl']['set_logicalName']={syn:'Changes the logical name of the OS control.',lib:'oscontrol.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the OS control. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the OS control.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['OsControl']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'oscontrol.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['OsControl']['shutdown']={syn:'Schedules an OS shutdown after a given number of seconds.',lib:'oscontrol.shutdown()',pro:'function shutdown(secBeforeShutDown)',cmt:'Schedules an OS shutdown after a given number of seconds.
',par:{secBeforeShutDown:'number of seconds before shutdown'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['OsControl']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'oscontrol.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: OsControl) //--- (generated code: DataSet) doc['DataSet']={'':{syn:'Recorded data sequence',inc:'<script type='text/javascript' src='yocto_api.js'></script>',cmt:'YDataSet objects make it possible to retrieve a set of recorded measures for a given sensor and a specified time interval. They can be used to load data points with a progress report. When the YDataSet object is instanciated by the get_recordedData() function, no data is yet loaded from the module. It is only when the loadMore() method is called over and over than data will be effectively loaded from the dataLogger.
A preview of available measures is available using the function get_preview() as soon as loadMore() has been called once. Measures themselves are available using function get_measures() when loaded by subsequent calls to loadMore().
This class can only be used on devices that use a recent firmware, as YDataSet objects are not supported by firmwares older than version 13000.
'}}; doc['DataSet']['get_endTimeUTC']={syn:'Returns the end time of the dataset, relative to the Jan 1, 1970.',lib:'dataset.get_endTimeUTC()',pro:'function get_endTimeUTC()',cmt:'Returns the end time of the dataset, relative to the Jan 1, 1970. When the YDataSet is created, the end time is the value passed in parameter to the get_dataSet() function. After the very first call to loadMore(), the end time is updated to reflect the timestamp of the last measure actually found in the dataLogger within the specified range.
',ret:'an unsigned number corresponding to the number of seconds between the Jan 1, 1970 and the end of this data set (i.e. Unix time representation of the absolute time).'}; doc['DataSet']['get_functionId']={syn:'Returns the hardware identifier of the function that performed the measure, without reference to the module.',lib:'dataset.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the function that performed the measure, without reference to the module. For example temperature1.
',ret:'a string that identifies the function (ex: temperature1)'}; doc['DataSet']['get_hardwareId']={syn:'Returns the unique hardware identifier of the function who performed the measures, in the form SERIAL.FUNCTIONID.',lib:'dataset.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the function who performed the measures, in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the function (for example THRMCPL1-123456.temperature1)
',ret:'a string that uniquely identifies the function (ex: THRMCPL1-123456.temperature1)',ext:'On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['DataSet']['get_measures']={syn:'Returns all measured values currently available for this DataSet, as a list of YMeasure objects.',lib:'dataset.get_measures()',pro:'function get_measures()',cmt:'Returns all measured values currently available for this DataSet, as a list of YMeasure objects. Each item includes: - the start of the measure time interval - the end of the measure time interval - the minimal value observed during the time interval - the average value observed during the time interval - the maximal value observed during the time interval
Before calling this method, you should call loadMore() to load data from the device. You may have to call loadMore() several time until all rows are loaded, but you can start looking at available data rows before the load is complete.
The oldest measures are always loaded first, and the most recent measures will be loaded last. As a result, timestamps are normally sorted in ascending order within the measure table, unless there was an unexpected adjustment of the datalogger UTC clock.
',ret:'a table of records, where each record depicts the measured value for a given time interval',ext:'On failure, throws an exception or returns an empty array.'}; doc['DataSet']['get_preview']={syn:'Returns a condensed version of the measures that can retrieved in this YDataSet, as a list of YMeasure objects.',lib:'dataset.get_preview()',pro:'function get_preview()',cmt:'Returns a condensed version of the measures that can retrieved in this YDataSet, as a list of YMeasure objects. Each item includes: - the start of a time interval - the end of a time interval - the minimal value observed during the time interval - the average value observed during the time interval - the maximal value observed during the time interval
This preview is available as soon as loadMore() has been called for the first time.
',ret:'a table of records, where each record depicts the measured values during a time interval',ext:'On failure, throws an exception or returns an empty array.'}; doc['DataSet']['get_progress']={syn:'Returns the progress of the downloads of the measures from the data logger, on a scale from 0 to 100.',lib:'dataset.get_progress()',pro:'function get_progress()',cmt:'Returns the progress of the downloads of the measures from the data logger, on a scale from 0 to 100. When the object is instanciated by get_dataSet, the progress is zero. Each time loadMore() is invoked, the progress is updated, to reach the value 100 only once all measures have been loaded.
',ret:'an integer in the range 0 to 100 (percentage of completion).'}; doc['DataSet']['get_startTimeUTC']={syn:'Returns the start time of the dataset, relative to the Jan 1, 1970.',lib:'dataset.get_startTimeUTC()',pro:'function get_startTimeUTC()',cmt:'Returns the start time of the dataset, relative to the Jan 1, 1970. When the YDataSet is created, the start time is the value passed in parameter to the get_dataSet() function. After the very first call to loadMore(), the start time is updated to reflect the timestamp of the first measure actually found in the dataLogger within the specified range.
',ret:'an unsigned number corresponding to the number of seconds between the Jan 1, 1970 and the beginning of this data set (i.e. Unix time representation of the absolute time).'}; doc['DataSet']['get_summary']={syn:'Returns an YMeasure object which summarizes the whole DataSet.',lib:'dataset.get_summary()',pro:'function get_summary()',cmt:'Returns an YMeasure object which summarizes the whole DataSet. In includes the following information: - the start of a time interval - the end of a time interval - the minimal value observed during the time interval - the average value observed during the time interval - the maximal value observed during the time interval
This summary is available as soon as loadMore() has been called for the first time.
',ret:'an YMeasure object'}; doc['DataSet']['get_unit']={syn:'Returns the measuring unit for the measured value.',lib:'dataset.get_unit()',pro:'function get_unit()',cmt:'Returns the measuring unit for the measured value.
',ret:'a string that represents a physical unit.',ext:'On failure, throws an exception or returns Y_UNIT_INVALID.'}; doc['DataSet']['loadMore']={syn:'Loads the the next block of measures from the dataLogger, and updates the progress indicator.',lib:'dataset.loadMore()',pro:'function loadMore()',cmt:'Loads the the next block of measures from the dataLogger, and updates the progress indicator.
',ret:'an integer in the range 0 to 100 (percentage of completion), or a negative error code in case of failure.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['DataSet']['loadMore_async']={syn:'Loads the the next block of measures from the dataLogger asynchronously.',lib:'dataset.loadMore_async()',pro:'function loadMore_async(callback, context)',cmt:'Loads the the next block of measures from the dataLogger asynchronously.
',par:{callback:'callback function that is invoked when the w The callback function receives three arguments: - the user-specific context object - the YDataSet object whose loadMore_async was invoked - the load result: either the progress indicator (0...100), or a negative error code in case of failure.',context:'user-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: DataSet) //--- (generated code: Measure) doc['Measure']={'':{syn:'Measured value',inc:'<script type='text/javascript' src='yocto_api.js'></script>',cmt:'YMeasure objects are used within the API to represent a value measured at a specified time. These objects are used in particular in conjunction with the YDataSet class.
'}}; doc['Measure']['get_averageValue']={syn:'Returns the average value observed during the time interval covered by this measure.',lib:'measure.get_averageValue()',pro:'function get_averageValue()',cmt:'Returns the average value observed during the time interval covered by this measure.
',ret:'a floating-point number corresponding to the average value observed.'}; doc['Measure']['get_endTimeUTC']={syn:'Returns the end time of the measure, relative to the Jan 1, 1970 UTC (Unix timestamp).',lib:'measure.get_endTimeUTC()',pro:'function get_endTimeUTC()',cmt:'Returns the end time of the measure, relative to the Jan 1, 1970 UTC (Unix timestamp). When the recording rate is higher then 1 sample per second, the timestamp may have a fractional part.
',ret:'an floating point number corresponding to the number of seconds between the Jan 1, 1970 UTC and the end of this measure.'}; doc['Measure']['get_maxValue']={syn:'Returns the largest value observed during the time interval covered by this measure.',lib:'measure.get_maxValue()',pro:'function get_maxValue()',cmt:'Returns the largest value observed during the time interval covered by this measure.
',ret:'a floating-point number corresponding to the largest value observed.'}; doc['Measure']['get_minValue']={syn:'Returns the smallest value observed during the time interval covered by this measure.',lib:'measure.get_minValue()',pro:'function get_minValue()',cmt:'Returns the smallest value observed during the time interval covered by this measure.
',ret:'a floating-point number corresponding to the smallest value observed.'}; doc['Measure']['get_startTimeUTC']={syn:'Returns the start time of the measure, relative to the Jan 1, 1970 UTC (Unix timestamp).',lib:'measure.get_startTimeUTC()',pro:'function get_startTimeUTC()',cmt:'Returns the start time of the measure, relative to the Jan 1, 1970 UTC (Unix timestamp). When the recording rate is higher then 1 sample per second, the timestamp may have a fractional part.
',ret:'an floating point number corresponding to the number of seconds between the Jan 1, 1970 UTC and the beginning of this measure.'}; //--- (end of generated code: Measure) //--- (generated code: AnalogSensorS16) doc['AnalogSensorS16']={'':{syn:'AnalogSensorS16',inc:'',cmt:'The Yoctopuce application programming interface allows you to read an instant measure of the sensor, as well as the minimal and maximal values observed.
'}}; doc['AnalogSensorS16']['FindAnalogSensorS16']={syn:'Retrieves $AFUNCTION$ for a given identifier.',lib:'YAnalogSensorS16.FindAnalogSensorS16()',pro:'function FindAnalogSensorS16(func)',cmt:'Retrieves $AFUNCTION$ for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of $FUNCTIONS$ currently accessible. Use the method YAnalogSensorS16.nextAnalogSensorS16() to iterate on next $FUNCTIONS$.
',ret:'a pointer to a YAnalogSensorS16 object, corresponding to $THEFIRSTFUNCTION$ currently online, or a null pointer if there are none.'}; doc['AnalogSensorS16']['calibrateFromPoints']={syn:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure.',lib:'analogsensors16.calibrateFromPoints()',pro:'function calibrateFromPoints(rawValues, refValues)',cmt:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure. It is possible to configure up to five correction points. Correction points must be provided in ascending order, and be in the range of the sensor. The device will automatically perform a linear interpolation of the error correction between specified points. Remember to call the saveToFlash() method of the module if the modification must be kept.
For more information on advanced capabilities to refine the calibration of sensors, please contact support
',par:{rawValues:'array of floating point numbers, corresponding to the raw values returned by the sensor for the correction points.',refValues:'array of floating point numbers, corresponding to the corrected values for the correction points.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['AnalogSensorS16']['describe']={syn:'Returns a short text that describes the function in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'analogsensors16.describe()',pro:'function describe()',cmt:'Returns a short text that describes the function in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the function (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['AnalogSensorS16']['get_advertisedValue']={syn:'Returns the current value of $THEFUNCTION$ (no more than 6 characters).',lib:'analogsensors16.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of $THEFUNCTION$ (no more than 6 characters).
',ret:'a string corresponding to the current value of $THEFUNCTION$ (no more than 6 characters)',ext:'On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['AnalogSensorS16']['get_currentRawValue']={syn:'Returns the uncalibrated, unrounded raw value returned by the sensor.',lib:'analogsensors16.get_currentRawValue()',pro:'function get_currentRawValue()',cmt:'Returns the uncalibrated, unrounded raw value returned by the sensor.
',ret:'a floating point number corresponding to the uncalibrated, unrounded raw value returned by the sensor',ext:'On failure, throws an exception or returns Y_CURRENTRAWVALUE_INVALID.'}; doc['AnalogSensorS16']['get_currentValue']={syn:'Returns the current measured value.',lib:'analogsensors16.get_currentValue()',pro:'function get_currentValue()',cmt:'Returns the current measured value.
',ret:'a floating point number corresponding to the current measured value',ext:'On failure, throws an exception or returns Y_CURRENTVALUE_INVALID.'}; doc['AnalogSensorS16']['get_errorMessage']={syn:'Returns the error message of the latest error with this function.',lib:'analogsensors16.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with this function. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using this function object'}; doc['AnalogSensorS16']['get_errorType']={syn:'Returns the numerical error code of the latest error with this function.',lib:'analogsensors16.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with this function. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using this function object'}; doc['AnalogSensorS16']['get_friendlyName']={syn:'Returns a global identifier of the function in the format MODULE_NAME.FUNCTION_NAME.',lib:'analogsensors16.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the function in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the function if they are defined, otherwise the serial number of the module and the hardware identifier of the function (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the function using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['AnalogSensorS16']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'analogsensors16.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['AnalogSensorS16']['get_functionId']={syn:'Returns the hardware identifier of the function, without reference to the module.',lib:'analogsensors16.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the function, without reference to the module. For example relay1
',ret:'a string that identifies the function (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['AnalogSensorS16']['get_hardwareId']={syn:'Returns the unique hardware identifier of the function in the form SERIAL.FUNCTIONID.',lib:'analogsensors16.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the function in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the function. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the function (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['AnalogSensorS16']['get_highestValue']={syn:'Returns the maximal value observed.',lib:'analogsensors16.get_highestValue()',pro:'function get_highestValue()',cmt:'Returns the maximal value observed.
',ret:'a floating point number corresponding to the maximal value observed',ext:'On failure, throws an exception or returns Y_HIGHESTVALUE_INVALID.'}; doc['AnalogSensorS16']['get_logFrequency']={syn:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.',lib:'analogsensors16.get_logFrequency()',pro:'function get_logFrequency()',cmt:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.
',ret:'a string corresponding to the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory',ext:'On failure, throws an exception or returns Y_LOGFREQUENCY_INVALID.'}; doc['AnalogSensorS16']['get_logicalName']={syn:'Returns the logical name of $THEFUNCTION$.',lib:'analogsensors16.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of $THEFUNCTION$.
',ret:'a string corresponding to the logical name of $THEFUNCTION$',ext:'On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['AnalogSensorS16']['get_lowestValue']={syn:'Returns the minimal value observed.',lib:'analogsensors16.get_lowestValue()',pro:'function get_lowestValue()',cmt:'Returns the minimal value observed.
',ret:'a floating point number corresponding to the minimal value observed',ext:'On failure, throws an exception or returns Y_LOWESTVALUE_INVALID.'}; doc['AnalogSensorS16']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'analogsensors16.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['AnalogSensorS16']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'analogsensors16.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['AnalogSensorS16']['get_reportFrequency']={syn:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.',lib:'analogsensors16.get_reportFrequency()',pro:'function get_reportFrequency()',cmt:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.
',ret:'a string corresponding to the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function',ext:'On failure, throws an exception or returns Y_REPORTFREQUENCY_INVALID.'}; doc['AnalogSensorS16']['get_resolution']={syn:'Returns the resolution of the measured values.',lib:'analogsensors16.get_resolution()',pro:'function get_resolution()',cmt:'Returns the resolution of the measured values. The resolution corresponds to the numerical precision of the measures, which is not always the same as the actual precision of the sensor.
',ret:'a floating point number corresponding to the resolution of the measured values',ext:'On failure, throws an exception or returns Y_RESOLUTION_INVALID.'}; doc['AnalogSensorS16']['get_unit']={syn:'Returns the measuring unit for the measured value.',lib:'analogsensors16.get_unit()',pro:'function get_unit()',cmt:'Returns the measuring unit for the measured value.
',ret:'a string corresponding to the measuring unit for the measured value',ext:'On failure, throws an exception or returns Y_UNIT_INVALID.'}; doc['AnalogSensorS16']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'analogsensors16.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['AnalogSensorS16']['isOnline']={syn:'Checks if the function is currently reachable, without raising any error.',lib:'analogsensors16.isOnline()',pro:'function isOnline()',cmt:'Checks if the function is currently reachable, without raising any error. If there is a cached value for the function in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the requested function.
',ret:'true if the function can be reached, and false otherwise'}; doc['AnalogSensorS16']['isOnline_async']={syn:'Checks if the function is currently reachable, without raising any error (asynchronous version).',lib:'analogsensors16.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the function is currently reachable, without raising any error (asynchronous version). If there is a cached value for the function in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 Firefox Javascript VM that does not implement context switching during blocking I/O calls.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['AnalogSensorS16']['load']={syn:'Preloads the function cache with a specified validity duration.',lib:'analogsensors16.load()',pro:'function load(msValidity)',cmt:'Preloads the function cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['AnalogSensorS16']['load_async']={syn:'Preloads the function cache with a specified validity duration (asynchronous version).',lib:'analogsensors16.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the function cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['AnalogSensorS16']['nextAnalogSensorS16']={syn:'Continues the enumeration of $FUNCTIONS$ started using yFirstAnalogSensorS16().',lib:'analogsensors16.nextAnalogSensorS16()',pro:'function nextAnalogSensorS16()',cmt:'Continues the enumeration of $FUNCTIONS$ started using yFirstAnalogSensorS16().
',ret:'a pointer to a YAnalogSensorS16 object, corresponding to $AFUNCTION$ currently online, or a null pointer if there are no more $FUNCTIONS$ to enumerate.'}; doc['AnalogSensorS16']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'analogsensors16.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['AnalogSensorS16']['set_highestValue']={syn:'Changes the recorded maximal value observed.',lib:'analogsensors16.set_highestValue()',pro:'function set_highestValue(newval)',cmt:'Changes the recorded maximal value observed.
',par:{newval:'a floating point number corresponding to the recorded maximal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['AnalogSensorS16']['set_logFrequency']={syn:'Changes the datalogger recording frequency for this function.',lib:'analogsensors16.set_logFrequency()',pro:'function set_logFrequency(newval)',cmt:'Changes the datalogger recording frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable recording for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the datalogger recording frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['AnalogSensorS16']['set_logicalName']={syn:'Changes the logical name of $THEFUNCTION$.',lib:'analogsensors16.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of $THEFUNCTION$. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of $THEFUNCTION$'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['AnalogSensorS16']['set_lowestValue']={syn:'Changes the recorded minimal value observed.',lib:'analogsensors16.set_lowestValue()',pro:'function set_lowestValue(newval)',cmt:'Changes the recorded minimal value observed.
',par:{newval:'a floating point number corresponding to the recorded minimal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['AnalogSensorS16']['set_reportFrequency']={syn:'Changes the timed value notification frequency for this function.',lib:'analogsensors16.set_reportFrequency()',pro:'function set_reportFrequency(newval)',cmt:'Changes the timed value notification frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable timed value notifications for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the timed value notification frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['AnalogSensorS16']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'analogsensors16.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['AnalogSensorS16']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'analogsensors16.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: AnalogSensorS16) //--- (generated code: Sensor) doc['Sensor']={'':{syn:'Sensor function interface',inc:'<script type='text/javascript' src='yocto_api.js'></script>',cmt:'The Yoctopuce application programming interface allows you to read an instant measure of the sensor, as well as the minimal and maximal values observed.
'}}; doc['Sensor']['FindSensor']={syn:'Retrieves a sensor for a given identifier.',lib:'YSensor.FindSensor()',pro:'function FindSensor(func)',cmt:'Retrieves a sensor for a given identifier. The identifier can be specified using several formats:
Starts the enumeration of sensors currently accessible. Use the method YSensor.nextSensor() to iterate on next sensors.
',ret:'a pointer to a YSensor object, corresponding to the first sensor currently online, or a null pointer if there are none.'}; doc['Sensor']['calibrateFromPoints']={syn:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure.',lib:'sensor.calibrateFromPoints()',pro:'function calibrateFromPoints(rawValues, refValues)',cmt:'Configures error correction data points, in particular to compensate for a possible perturbation of the measure caused by an enclosure. It is possible to configure up to five correction points. Correction points must be provided in ascending order, and be in the range of the sensor. The device will automatically perform a linear interpolation of the error correction between specified points. Remember to call the saveToFlash() method of the module if the modification must be kept.
For more information on advanced capabilities to refine the calibration of sensors, please contact support
',par:{rawValues:'array of floating point numbers, corresponding to the raw values returned by the sensor for the correction points.',refValues:'array of floating point numbers, corresponding to the corrected values for the correction points.'}}; doc['Sensor']['describe']={syn:'Returns a short text that describes the sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'sensor.describe()',pro:'function describe()',cmt:'Returns a short text that describes the sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID. More precisely, TYPE is the type of the 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 \x22unresolved\x22, and FUNCTIONID is the hardware identifier of the function if the module is connected. For example, this method returns Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1 if the module is already connected or Relay(BadCustomeName.relay1)=unresolved if the module has not yet been connected. This method does not trigger any USB or TCP transaction and can therefore be used in a debugger.
',ret:'a string that describes the sensor (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'}; doc['Sensor']['get_advertisedValue']={syn:'Returns the current value of the sensor (no more than 6 characters).',lib:'sensor.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'Returns the current value of the sensor (no more than 6 characters).
',ret:'a string corresponding to the current value of the sensor (no more than 6 characters). On failure, throws an exception or returns Y_ADVERTISEDVALUE_INVALID.'}; doc['Sensor']['get_currentRawValue']={syn:'Returns the uncalibrated, unrounded raw value returned by the sensor.',lib:'sensor.get_currentRawValue()',pro:'function get_currentRawValue()',cmt:'Returns the uncalibrated, unrounded raw value returned by the sensor.
',ret:'a floating point number corresponding to the uncalibrated, unrounded raw value returned by the sensor',ext:'On failure, throws an exception or returns Y_CURRENTRAWVALUE_INVALID.'}; doc['Sensor']['get_currentValue']={syn:'Returns the current measured value.',lib:'sensor.get_currentValue()',pro:'function get_currentValue()',cmt:'Returns the current measured value.
',ret:'a floating point number corresponding to the current measured value',ext:'On failure, throws an exception or returns Y_CURRENTVALUE_INVALID.'}; doc['Sensor']['get_errorMessage']={syn:'Returns the error message of the latest error with the sensor.',lib:'sensor.get_errorMessage()',pro:'function get_errorMessage()',cmt:'Returns the error message of the latest error with the sensor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a string corresponding to the latest error message that occured while using the sensor object'}; doc['Sensor']['get_errorType']={syn:'Returns the numerical error code of the latest error with the sensor.',lib:'sensor.get_errorType()',pro:'function get_errorType()',cmt:'Returns the numerical error code of the latest error with the sensor. This method is mostly useful when using the Yoctopuce library with exceptions disabled.
',ret:'a number corresponding to the code of the latest error that occured while using the sensor object'}; doc['Sensor']['get_friendlyName']={syn:'Returns a global identifier of the sensor in the format MODULE_NAME.FUNCTION_NAME.',lib:'sensor.get_friendlyName()',pro:'function get_friendlyName()',cmt:'Returns a global identifier of the sensor in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the sensor if they are defined, otherwise the serial number of the module and the hardware identifier of the sensor (for exemple: MyCustomName.relay1)
',ret:'a string that uniquely identifies the sensor using logical names (ex: MyCustomName.relay1) On failure, throws an exception or returns Y_FRIENDLYNAME_INVALID.'}; doc['Sensor']['get_functionDescriptor']={syn:'Returns a unique identifier of type YFUN_DESCR corresponding to the function.',lib:'sensor.get_functionDescriptor()',pro:'function get_functionDescriptor()',cmt:'Returns a unique identifier of type YFUN_DESCR corresponding to the function. This identifier can be used to test if two instances of YFunction reference the same physical function on the same physical device.
',ret:'an identifier of type YFUN_DESCR. If the function has never been contacted, the returned value is Y_FUNCTIONDESCRIPTOR_INVALID.'}; doc['Sensor']['get_functionId']={syn:'Returns the hardware identifier of the sensor, without reference to the module.',lib:'sensor.get_functionId()',pro:'function get_functionId()',cmt:'Returns the hardware identifier of the sensor, without reference to the module. For example relay1
',ret:'a string that identifies the sensor (ex: relay1) On failure, throws an exception or returns Y_FUNCTIONID_INVALID.'}; doc['Sensor']['get_hardwareId']={syn:'Returns the unique hardware identifier of the sensor in the form SERIAL.FUNCTIONID.',lib:'sensor.get_hardwareId()',pro:'function get_hardwareId()',cmt:'Returns the unique hardware identifier of the sensor in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the sensor. (for example RELAYLO1-123456.relay1)
',ret:'a string that uniquely identifies the sensor (ex: RELAYLO1-123456.relay1) On failure, throws an exception or returns Y_HARDWAREID_INVALID.'}; doc['Sensor']['get_highestValue']={syn:'Returns the maximal value observed.',lib:'sensor.get_highestValue()',pro:'function get_highestValue()',cmt:'Returns the maximal value observed.
',ret:'a floating point number corresponding to the maximal value observed',ext:'On failure, throws an exception or returns Y_HIGHESTVALUE_INVALID.'}; doc['Sensor']['get_logFrequency']={syn:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.',lib:'sensor.get_logFrequency()',pro:'function get_logFrequency()',cmt:'Returns the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory.
',ret:'a string corresponding to the datalogger recording frequency for this function, or \x22OFF\x22 when measures are not stored in the data logger flash memory',ext:'On failure, throws an exception or returns Y_LOGFREQUENCY_INVALID.'}; doc['Sensor']['get_logicalName']={syn:'Returns the logical name of the sensor.',lib:'sensor.get_logicalName()',pro:'function get_logicalName()',cmt:'Returns the logical name of the sensor.
',ret:'a string corresponding to the logical name of the sensor. On failure, throws an exception or returns Y_LOGICALNAME_INVALID.'}; doc['Sensor']['get_lowestValue']={syn:'Returns the minimal value observed.',lib:'sensor.get_lowestValue()',pro:'function get_lowestValue()',cmt:'Returns the minimal value observed.
',ret:'a floating point number corresponding to the minimal value observed',ext:'On failure, throws an exception or returns Y_LOWESTVALUE_INVALID.'}; doc['Sensor']['get_module']={syn:'Gets the YModule object for the device on which the function is located.',lib:'sensor.get_module()',pro:'function get_module()',cmt:'Gets the YModule object for the device on which the function is located. If the function cannot be located on any module, the returned instance of YModule is not shown as on-line.
',ret:'an instance of YModule'}; doc['Sensor']['get_module_async']={syn:'Gets the YModule object for the device on which the function is located (asynchronous version).',lib:'sensor.get_module_async()',pro:'function get_module_async(callback, context)',cmt:'Gets the YModule object for the device on which the function is located (asynchronous version). If the function cannot be located on any module, the returned YModule object does not show as on-line. 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 switching during blocking I/O calls. See the documentation section on asynchronous Javascript calls for more details.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the requested YModule object',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Sensor']['get_recordedData']={syn:'Retrieves a DataSet object holding historical data for this sensor, for a specified time interval.',lib:'sensor.get_recordedData()',pro:'function get_recordedData(startTime, endTime)',cmt:'Retrieves a DataSet object holding historical data for this sensor, for a specified time interval. The measures will be retrieved from the data logger, which must have been turned on at the desired time. See the documentation of the DataSet class for information on how to get an overview of the recorded data, and how to load progressively a large set of measures from the data logger.
This function only works if the device uses a recent firmware, as DataSet objects are not supported by firmwares older than version 13000.
',par:{startTime:'the start of the desired measure time interval, as a Unix timestamp, i.e. the number of seconds since January 1, 1970 UTC. The special value 0 can be used to include any meaasure, without initial limit.',endTime:'the end of the desired measure time interval, as a Unix timestamp, i.e. the number of seconds since January 1, 1970 UTC. The special value 0 can be used to include any meaasure, without ending limit.'},ret:'an instance of YDataSet, providing access to historical data. Past measures can be loaded progressively using methods from the YDataSet object.'}; doc['Sensor']['get_reportFrequency']={syn:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.',lib:'sensor.get_reportFrequency()',pro:'function get_reportFrequency()',cmt:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.
',ret:'a string corresponding to the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function',ext:'On failure, throws an exception or returns Y_REPORTFREQUENCY_INVALID.'}; doc['Sensor']['get_resolution']={syn:'Returns the resolution of the measured values.',lib:'sensor.get_resolution()',pro:'function get_resolution()',cmt:'Returns the resolution of the measured values. The resolution corresponds to the numerical precision of the measures, which is not always the same as the actual precision of the sensor.
',ret:'a floating point number corresponding to the resolution of the measured values',ext:'On failure, throws an exception or returns Y_RESOLUTION_INVALID.'}; doc['Sensor']['get_unit']={syn:'Returns the measuring unit for the measured value.',lib:'sensor.get_unit()',pro:'function get_unit()',cmt:'Returns the measuring unit for the measured value.
',ret:'a string corresponding to the measuring unit for the measured value',ext:'On failure, throws an exception or returns Y_UNIT_INVALID.'}; doc['Sensor']['get_userData']={syn:'Returns the value of the userData attribute, as previously stored using method set_userData.',lib:'sensor.get_userData()',pro:'function get_userData()',cmt:'Returns the value of the userData attribute, as previously stored using method set_userData. This attribute is never touched directly by the API, and is at disposal of the caller to store a context.
',ret:'the object stored previously by the caller.'}; doc['Sensor']['isOnline']={syn:'Checks if the sensor is currently reachable, without raising any error.',lib:'sensor.isOnline()',pro:'function isOnline()',cmt:'Checks if the sensor is currently reachable, without raising any error. If there is a cached value for the sensor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is an error while trying to contact the device hosting the sensor.
',ret:'true if the sensor can be reached, and false otherwise'}; doc['Sensor']['isOnline_async']={syn:'Checks if the sensor is currently reachable, without raising any error (asynchronous version).',lib:'sensor.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'Checks if the sensor is currently reachable, without raising any error (asynchronous version). If there is a cached value for the sensor in cache, that has not yet expired, the device is considered reachable. No exception is raised if there is 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 the Javascript virtual machine.
',par:{callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the boolean result',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Sensor']['load']={syn:'Preloads the sensor cache with a specified validity duration.',lib:'sensor.load()',pro:'function load(msValidity)',cmt:'Preloads the sensor cache with a specified validity duration. By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network trafic for instance.
',par:{msValidity:'an integer corresponding to the validity attributed to the loaded function parameters, in milliseconds'},ret:'YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Sensor']['loadCalibrationPoints']={syn:'Retrieves error correction data points previously entered using the method calibrateFromPoints.',lib:'sensor.loadCalibrationPoints()',pro:'function loadCalibrationPoints(rawValues, refValues)',cmt:'Retrieves error correction data points previously entered using the method calibrateFromPoints.
',par:{rawValues:'array of floating point numbers, that will be filled by the function with the raw sensor values for the correction points.',refValues:'array of floating point numbers, that will be filled by the function with the desired values for the correction points.'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Sensor']['load_async']={syn:'Preloads the sensor cache with a specified validity duration (asynchronous version).',lib:'sensor.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'Preloads the sensor cache with a specified validity duration (asynchronous version). By default, whenever accessing a device, all function attributes are kept in cache for the standard duration (5 ms). This method can be used to temporarily mark the cache as valid for a longer period, in order to reduce network 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.
',par:{msValidity:'an integer corresponding to the validity of the loaded function parameters, in milliseconds',callback:'callback function that is invoked when the result is known. The callback function receives three arguments: the caller-specific context object, the receiving function object and the error code (or YAPI_SUCCESS)',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'}; doc['Sensor']['nextSensor']={syn:'Continues the enumeration of sensors started using yFirstSensor().',lib:'sensor.nextSensor()',pro:'function nextSensor()',cmt:'Continues the enumeration of sensors started using yFirstSensor().
',ret:'a pointer to a YSensor object, corresponding to a sensor currently online, or a null pointer if there are no more sensors to enumerate.'}; doc['Sensor']['registerTimedReportCallback']={syn:'Registers the callback function that is invoked on every periodic timed notification.',lib:'sensor.registerTimedReportCallback()',pro:'function registerTimedReportCallback(callback)',cmt:'Registers the callback function that is invoked on every periodic timed notification. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and an YMeasure object describing the new advertised value.'}}; doc['Sensor']['registerValueCallback']={syn:'Registers the callback function that is invoked on every change of advertised value.',lib:'sensor.registerValueCallback()',pro:'function registerValueCallback(callback)',cmt:'Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a null pointer as argument.
',par:{callback:'the callback function to call, or a null pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value.'}}; doc['Sensor']['set_highestValue']={syn:'Changes the recorded maximal value observed.',lib:'sensor.set_highestValue()',pro:'function set_highestValue(newval)',cmt:'Changes the recorded maximal value observed.
',par:{newval:'a floating point number corresponding to the recorded maximal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Sensor']['set_logFrequency']={syn:'Changes the datalogger recording frequency for this function.',lib:'sensor.set_logFrequency()',pro:'function set_logFrequency(newval)',cmt:'Changes the datalogger recording frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable recording for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the datalogger recording frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Sensor']['set_logicalName']={syn:'Changes the logical name of the sensor.',lib:'sensor.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'Changes the logical name of the sensor. You can use yCheckLogicalName() prior to this call to make sure that your parameter is valid. Remember to call the saveToFlash() method of the module if the modification must be kept.
',par:{newval:'a string corresponding to the logical name of the sensor.'},ret:'YAPI_SUCCESS if the call succeeds. On failure, throws an exception or returns a negative error code.'}; doc['Sensor']['set_lowestValue']={syn:'Changes the recorded minimal value observed.',lib:'sensor.set_lowestValue()',pro:'function set_lowestValue(newval)',cmt:'Changes the recorded minimal value observed.
',par:{newval:'a floating point number corresponding to the recorded minimal value observed'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Sensor']['set_reportFrequency']={syn:'Changes the timed value notification frequency for this function.',lib:'sensor.set_reportFrequency()',pro:'function set_reportFrequency(newval)',cmt:'Changes the timed value notification frequency for this function. The frequency can be specified as samples per second, as sample per minute (for instance \x2215/m\x22) or in samples per hour (eg. \x224/h\x22). To disable timed value notifications for this function, use the value \x22OFF\x22.
',par:{newval:'a string corresponding to the timed value notification frequency for this function'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Sensor']['set_resolution']={syn:'Changes the resolution of the measured physical values.',lib:'sensor.set_resolution()',pro:'function set_resolution(newval)',cmt:'Changes the resolution of the measured physical values. The resolution corresponds to the numerical precision when displaying value. It does not change the precision of the measure itself.
',par:{newval:'a floating point number corresponding to the resolution of the measured physical values'},ret:'YAPI_SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'}; doc['Sensor']['set_userData']={syn:'Stores a user context provided as argument in the userData attribute of the function.',lib:'sensor.set_userData()',pro:'function set_userData(data)',cmt:'Stores a user context provided as argument in the userData attribute of the function. This attribute is never touched by the API, and is at disposal of the caller to store a context.
',par:{data:'any kind of object to be stored'}}; doc['Sensor']['wait_async']={syn:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function.',lib:'sensor.wait_async()',pro:'function wait_async(callback, context)',cmt:'Waits for all pending asynchronous commands on the module to complete, and invoke the user-provided callback function. The callback function can therefore freely issue synchronous or asynchronous commands, without risking to block the Javascript VM.
',par:{callback:'callback function that is invoked when all pending commands on the module are completed. The callback function receives two arguments: the caller-specific context object and the receiving function object.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing.'}; //--- (end of generated code: Sensor) //--- (end of generated code) function isClassMethod(str_method) { return str_method.charAt(0) == str_method.charAt(0).toUpperCase(); } // add function aliases to the substitution list for(classname in doc) { for(funcname in doc[classname]) { if(isClassMethod(funcname)) { // class method, generate shortcut sub['y'+funcname] = doc[classname][funcname].lib; } } } function ApplySub(text,classname) { var pos, endpos = 0, key, rep; if(sub['null'] != 'null') text = text.replace('null',''+sub['null']+''); if(UseShortcuts) return text; if(classname.substr(0,1)!='Y') classname = 'Y'+classname; while((pos = text.toLowerCase().indexOf('',endpos)) >= endpos) { pos += 4; endpos = text.indexOf('', pos); key = text.substr(pos,endpos-pos).match(/[\w_]+/); if(key) { key = key[0]; rep = sub[key]; if(!rep && key.substr(0,2)=='Y_' && sub['YAPI_SUCCESS']) { rep = sub['YAPI_SUCCESS'].replace('YAPI',classname).replace('SUCCESS',key.substr(2,key.length)); } if(rep) text = text.substr(0, pos)+rep+text.substr(endpos); } } return text; } function SetPosition(o,x,y) { var it=document.getElementById(o); if (!it) throw "SetPosition: "+o+" element does not exist." it.style.top = y; it.style.left = x; } function GetPositionX(o) { var it=document.getElementById(o); if (!it) throw "GetPositionX: "+o+" element does not exist." return parseInt(it.style.left); } function GetPositionY(o) { var it=document.getElementById(o); if (!it) throw "GetPositionY: "+o+" element does not exist." return parseInt(it.style.top); } function GetWidth(o) { var it=document.getElementById(o); if (!it) throw "GetWidth: "+o+" element does not exist." return parseInt(it.style.width); } function GetHeight(o) { var it=document.getElementById(o); if (!it) throw "GetHeight: "+o+" element does not exist." return parseInt(it.style.height); } function SetHeight(o,h) { var it=document.getElementById(o); if (!it) throw "SetHeight: "+o+" element does not exist." h=parseInt(h); if (h<0) h=0; it.style.height = h+ "px"; } function SetWidth(o,w) { var it=document.getElementById(o); if (!it) throw "SetWidth: "+o+" element does not exist." w = parseInt(w); if (w<0) w=0; it.style.width = parseInt(w) + "px"; } function SetLeft(o,l) { var it=document.getElementById(o); if (!it) throw "SetLeft: "+o+" element does not exist." it.style.left = parseInt(l) + "px"; } function SetTop(o,t) { var it=document.getElementById(o); if (!it) throw "SetTop: "+o+" element does not exist." it.style.top = parseInt(t) + "px"; } function SetSize(o,w,h) { var it=document.getElementById(o); if (!it) throw "SetSize: "+o+" element does not exist." w= parseInt(w); if (w<0) w=0; h=parseInt(h); if (h<0) h=0; it.style.width = w; it.style.height = h; } function GetWindowWidth() { return parseInt(document.body.clientWidth); } function GetWindowHeight() { return parseInt(document.body.clientHeight); } function computeWinWH() { WinW = GetWindowWidth() ; if (WinW<600) WinW=600; WinH = GetWindowHeight(); if (WinH<400) WinH=400; } function getInnerHeight() { var D = document; return Math.max( Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), Math.max(D.body.clientHeight, D.documentElement.clientHeight) ); } function getInnerWidth() { var D = document; return Math.max( Math.max(D.body.scrollWidth, D.documentElement.scrollWidth), Math.max(D.body.offsetWidth, D.documentElement.offsetWidth), Math.max(D.body.clientWidth, D.documentElement.clientWidth) ); } function onResize(fct) { fct(); resizeCallBacks[resizeCallBacks.length]=fct; } function windowResized() { computeWinWH() for (var i=0;i'+p+' | : '+ApplySub(fct.par[p],str_classindex)+' |
'+ApplySub(fct.ret,str_classindex)+'
\n'; } if (fct.ext) fcthtml+=ApplySub(fct.ext,str_classindex); } else if (str_classindex!='') { fcthtml = ""+str_classindex+'"+ApplySub(doc[str_classindex][''].syn,str_classindex)+"
" + ""+IncludeLabel+"
" + ""+doc[str_classindex][''].inc+"
" + ""+ApplySub(doc[str_classindex][''].cmt,str_classindex)+"
"; for (m in doc[str_classindex]) { if (m!='') { var funcproto = proto(str_classindex, m); fcthtml +=""+funcproto+'
'
+""+ApplySub(doc[str_classindex][m].syn,str_classindex)+'