',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:

This function does not require that the voltage source is online at the time it is invoked. The returned object is nevertheless valid. Use the method YVSource.isOnline() to test if the voltage source is indeed online at a given time. In case of ambiguity when looking for a voltage source by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

',par:{func:'a string that uniquely characterizes the voltage source'},ret:'a YVSource object allowing you to drive the voltage source.'}; doc['VSource']['FirstVSource']={syn:'Starts the enumeration of voltage sources currently accessible.',lib:'YVSource.FirstVSource()',pro:'function FirstVSource()',cmt:'

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: Voc) doc['Voc']={'':{syn:'Volatile Organic Compound sensor control interface, available for instance in the Yocto-VOC-V3',inc:'<script type='text/javascript' src='yocto_voc.js'></script>',cmt:'

The YVoc class allows you to read and configure Yoctopuce Volatile Organic Compound sensors. It inherits from YSensor class the core functions to read measurements, to register callback functions, and to access the autonomous datalogger.

'} ,'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:

This function does not require that the Volatile Organic Compound sensor is online at the time it is invoked. The returned object is nevertheless valid. Use the method YVoc.isOnline() to test if the Volatile Organic Compound sensor is indeed online at a given time. In case of ambiguity when looking for a Volatile Organic Compound sensor by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object\x27s is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

',par:{func:'a string that uniquely characterizes the Volatile Organic Compound sensor, for instance YVOCMK03.voc.'},ret:'a YVoc object allowing you to drive the Volatile Organic Compound sensor.'} ,'FirstVoc':{syn:'Starts the enumeration of Volatile Organic Compound sensors currently accessible.',lib:'YVoc.FirstVoc()',pro:'function FirstVoc()',cmt:'

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.'} ,'calibrateFromPoints':ds.calibrateFromPoints ,'clearCache':{syn:'Invalidates the cache.',lib:'%.clearCache()',pro:'function clearCache()',cmt:'

Invalidates the cache. Invalidates the cache of the Volatile Organic Compound sensor attributes. Forces the next call to get_xxx() or loadxxx() to use values that come from the device.

'} ,'describe':{syn:'Returns a short text that describes unambiguously the instance of the Volatile Organic Compound sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'%.describe()',pro:'function describe()',cmt:'

Returns a short text that describes unambiguously the instance of 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)'} ,'get_advMode':{syn:'Returns the measuring mode used for the advertised value pushed to the parent hub.',lib:'%.get_advMode()',pro:'function get_advMode()',cmt:'

Returns the measuring mode used for the advertised value pushed to the parent hub.

',ret:'a value among YVoc.ADVMODE_IMMEDIATE, YVoc.ADVMODE_PERIOD_AVG, YVoc.ADVMODE_PERIOD_MIN and YVoc.ADVMODE_PERIOD_MAX corresponding to the measuring mode used for the advertised value pushed to the parent hub',ext:'On failure, throws an exception or returns YVoc.ADVMODE_INVALID.'} ,'get_advertisedValue':{syn:'Returns the current value of the Volatile Organic Compound sensor (no more than 6 characters).',lib:'%.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).',ext:'On failure, throws an exception or returns YVoc.ADVERTISEDVALUE_INVALID.'} ,'get_currentRawValue':{syn:'Returns the uncalibrated, unrounded raw value returned by the sensor, in ppm (vol), as a floating point number.',lib:'%.get_currentRawValue()',pro:'function get_currentRawValue()',cmt:'

Returns the uncalibrated, unrounded raw value returned by the sensor, in ppm (vol), as a floating point number.

',ret:'a floating point number corresponding to the uncalibrated, unrounded raw value returned by the sensor, in ppm (vol), as a floating point number',ext:'On failure, throws an exception or returns YVoc.CURRENTRAWVALUE_INVALID.'} ,'get_currentValue':{syn:'Returns the current value of the estimated VOC concentration, in ppm (vol), as a floating point number.',lib:'%.get_currentValue()',pro:'function get_currentValue()',cmt:'

Returns the current value of the estimated VOC concentration, in ppm (vol), as a floating point number. Note that a get_currentValue() call will *not* start a measure in the device, it will just return the last measure that occurred in the device. Indeed, internally, each Yoctopuce devices is continuously making measurements at a hardware specific frequency.

If continuously calling get_currentValue() leads you to performances issues, then you might consider to switch to callback programming model. Check the \x22advanced programming\x22 chapter in in your device user manual for more information.

',ret:'a floating point number corresponding to the current value of the estimated VOC concentration, in ppm (vol), as a floating point number',ext:'On failure, throws an exception or returns YVoc.CURRENTVALUE_INVALID.'} ,'get_dataLogger':ds.get_dataLogger ,'get_errorMessage':{syn:'Returns the error message of the latest error with the Volatile Organic Compound sensor.',lib:'%.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'} ,'get_errorType':{syn:'Returns the numerical error code of the latest error with the Volatile Organic Compound sensor.',lib:'%.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 occurred while using the Volatile Organic Compound sensor object'} ,'get_friendlyName':{syn:'Returns a global identifier of the Volatile Organic Compound sensor in the format MODULE_NAME.FUNCTION_NAME.',lib:'%.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 example: MyCustomName.relay1)

',ret:'a string that uniquely identifies the Volatile Organic Compound sensor using logical names (ex: MyCustomName.relay1)',ext:'On failure, throws an exception or returns YVoc.FRIENDLYNAME_INVALID.'} ,'get_functionDescriptor':ds.get_functionDescriptor ,'get_functionId':{syn:'Returns the hardware identifier of the Volatile Organic Compound sensor, without reference to the module.',lib:'%.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)',ext:'On failure, throws an exception or returns YVoc.FUNCTIONID_INVALID.'} ,'get_hardwareId':{syn:'Returns the unique hardware identifier of the Volatile Organic Compound sensor in the form SERIAL.FUNCTIONID.',lib:'%.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)',ext:'On failure, throws an exception or returns YVoc.HARDWAREID_INVALID.'} ,'get_highestValue':{syn:'Returns the maximal value observed for the estimated VOC concentration since the device was started.',lib:'%.get_highestValue()',pro:'function get_highestValue()',cmt:'

Returns the maximal value observed for the estimated VOC concentration since the device was started. Can be reset to an arbitrary value thanks to set_highestValue().

',ret:'a floating point number corresponding to the maximal value observed for the estimated VOC concentration since the device was started',ext:'On failure, throws an exception or returns YVoc.HIGHESTVALUE_INVALID.'} ,'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:'%.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 YVoc.LOGFREQUENCY_INVALID.'} ,'get_logicalName':{syn:'Returns the logical name of the Volatile Organic Compound sensor.',lib:'%.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.',ext:'On failure, throws an exception or returns YVoc.LOGICALNAME_INVALID.'} ,'get_lowestValue':{syn:'Returns the minimal value observed for the estimated VOC concentration since the device was started.',lib:'%.get_lowestValue()',pro:'function get_lowestValue()',cmt:'

Returns the minimal value observed for the estimated VOC concentration since the device was started. Can be reset to an arbitrary value thanks to set_lowestValue().

',ret:'a floating point number corresponding to the minimal value observed for the estimated VOC concentration since the device was started',ext:'On failure, throws an exception or returns YVoc.LOWESTVALUE_INVALID.'} ,'get_module':ds.get_module ,'get_module_async':ds.get_module_async ,'get_recordedData':ds.get_recordedData ,'get_reportFrequency':{syn:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.',lib:'%.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 YVoc.REPORTFREQUENCY_INVALID.'} ,'get_resolution':{syn:'Returns the resolution of the measured values.',lib:'%.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. Remember to call the saveToFlash() method of the module if the modification must be kept.

',ret:'a floating point number corresponding to the resolution of the measured values',ext:'On failure, throws an exception or returns YVoc.RESOLUTION_INVALID.'} ,'get_sensorState':{syn:'Returns the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now.',lib:'%.get_sensorState()',pro:'function get_sensorState()',cmt:'

Returns the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now.

',ret:'an integer corresponding to the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now',ext:'On failure, throws an exception or returns YVoc.SENSORSTATE_INVALID.'} ,'get_serialNumber':ds.get_serialNumber ,'get_unit':{syn:'Returns the measuring unit for the estimated VOC concentration.',lib:'%.get_unit()',pro:'function get_unit()',cmt:'

Returns the measuring unit for the estimated VOC concentration.

',ret:'a string corresponding to the measuring unit for the estimated VOC concentration',ext:'On failure, throws an exception or returns YVoc.UNIT_INVALID.'} ,'get_userData':dm.get_userData ,'isOnline':{syn:'Checks if the Volatile Organic Compound sensor is currently reachable, without raising any error.',lib:'%.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'} ,'isOnline_async':{syn:'Checks if the Volatile Organic Compound sensor is currently reachable, without raising any error (asynchronous version).',lib:'%.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.'} ,'load':{syn:'Preloads the Volatile Organic Compound sensor cache with a specified validity duration.',lib:'%.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 traffic 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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadAttribute':ds.loadAttribute ,'loadCalibrationPoints':ds.loadCalibrationPoints ,'load_async':{syn:'Preloads the Volatile Organic Compound sensor cache with a specified validity duration (asynchronous version).',lib:'%.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 traffic 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.'} ,'muteValueCallbacks':ds.muteValueCallbacks ,'nextVoc':{syn:'Continues the enumeration of Volatile Organic Compound sensors started using yFirstVoc().',lib:'%.nextVoc()',pro:'function nextVoc()',cmt:'

Continues the enumeration of Volatile Organic Compound sensors started using yFirstVoc(). Caution: You can\x27t make any assumption about the returned Volatile Organic Compound sensors order. If you want to find a specific a Volatile Organic Compound sensor, use Voc.findVoc() and a hardwareID or a logical name.

',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.'} ,'registerTimedReportCallback':ds.registerTimedReportCallback ,'registerValueCallback':ds.registerValueCallback ,'set_advMode':{syn:'Changes the measuring mode used for the advertised value pushed to the parent hub.',lib:'%.set_advMode()',pro:'function set_advMode(newval)',cmt:'

Changes the measuring mode used for the advertised value pushed to the parent hub. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'a value among YVoc.ADVMODE_IMMEDIATE, YVoc.ADVMODE_PERIOD_AVG, YVoc.ADVMODE_PERIOD_MIN and YVoc.ADVMODE_PERIOD_MAX corresponding to the measuring mode used for the advertised value pushed to the parent hub'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_highestValue':ds.set_highestValue ,'set_logFrequency':ds.set_logFrequency ,'set_logicalName':{syn:'Changes the logical name of the Volatile Organic Compound sensor.',lib:'%.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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_lowestValue':ds.set_lowestValue ,'set_reportFrequency':ds.set_reportFrequency ,'set_resolution':ds.set_resolution ,'set_userData':dm.set_userData ,'startDataLogger':ds.startDataLogger ,'stopDataLogger':ds.stopDataLogger ,'unmuteValueCallbacks':ds.unmuteValueCallbacks ,'wait_async':dm.wait_async }; //--- (end of generated code: Voc) //--- (generated code: Voltage) doc['Voltage']={'':{syn:'Voltage sensor control interface, available for instance in the Yocto-Motor-DC, the Yocto-Volt or the Yocto-Watt',inc:'<script type='text/javascript' src='yocto_voltage.js'></script>',cmt:'

The YVoltage class allows you to read and configure Yoctopuce voltage sensors. It inherits from YSensor class the core functions to read measurements, to register callback functions, and to access the autonomous datalogger.

'} ,'FindVoltage':{syn:'Retrieves a voltage sensor for a given identifier.',lib:'YVoltage.FindVoltage()',pro:'function FindVoltage(func)',cmt:'

Retrieves a voltage sensor for a given identifier. The identifier can be specified using several formats:

This function does not require that the voltage sensor is online at the time it is invoked. The returned object is nevertheless valid. Use the method YVoltage.isOnline() to test if the voltage sensor is indeed online at a given time. In case of ambiguity when looking for a voltage sensor by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object\x27s is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

',par:{func:'a string that uniquely characterizes the voltage sensor, for instance MOTORCTL.voltage.'},ret:'a YVoltage object allowing you to drive the voltage sensor.'} ,'FirstVoltage':{syn:'Starts the enumeration of voltage sensors currently accessible.',lib:'YVoltage.FirstVoltage()',pro:'function FirstVoltage()',cmt:'

Starts the enumeration of voltage sensors currently accessible. Use the method YVoltage.nextVoltage() to iterate on next voltage sensors.

',ret:'a pointer to a YVoltage object, corresponding to the first voltage sensor currently online, or a null pointer if there are none.'} ,'calibrateFromPoints':ds.calibrateFromPoints ,'clearCache':{syn:'Invalidates the cache.',lib:'%.clearCache()',pro:'function clearCache()',cmt:'

Invalidates the cache. Invalidates the cache of the voltage sensor attributes. Forces the next call to get_xxx() or loadxxx() to use values that come from the device.

'} ,'describe':{syn:'Returns a short text that describes unambiguously the instance of the voltage sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'%.describe()',pro:'function describe()',cmt:'

Returns a short text that describes unambiguously the instance of the voltage 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 voltage sensor (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'} ,'get_advMode':{syn:'Returns the measuring mode used for the advertised value pushed to the parent hub.',lib:'%.get_advMode()',pro:'function get_advMode()',cmt:'

Returns the measuring mode used for the advertised value pushed to the parent hub.

',ret:'a value among YVoltage.ADVMODE_IMMEDIATE, YVoltage.ADVMODE_PERIOD_AVG, YVoltage.ADVMODE_PERIOD_MIN and YVoltage.ADVMODE_PERIOD_MAX corresponding to the measuring mode used for the advertised value pushed to the parent hub',ext:'On failure, throws an exception or returns YVoltage.ADVMODE_INVALID.'} ,'get_advertisedValue':{syn:'Returns the current value of the voltage sensor (no more than 6 characters).',lib:'%.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'

Returns the current value of the voltage sensor (no more than 6 characters).

',ret:'a string corresponding to the current value of the voltage sensor (no more than 6 characters).',ext:'On failure, throws an exception or returns YVoltage.ADVERTISEDVALUE_INVALID.'} ,'get_currentRawValue':{syn:'Returns the uncalibrated, unrounded raw value returned by the sensor, in Volt, as a floating point number.',lib:'%.get_currentRawValue()',pro:'function get_currentRawValue()',cmt:'

Returns the uncalibrated, unrounded raw value returned by the sensor, in Volt, as a floating point number.

',ret:'a floating point number corresponding to the uncalibrated, unrounded raw value returned by the sensor, in Volt, as a floating point number',ext:'On failure, throws an exception or returns YVoltage.CURRENTRAWVALUE_INVALID.'} ,'get_currentValue':{syn:'Returns the current value of the voltage, in Volt, as a floating point number.',lib:'%.get_currentValue()',pro:'function get_currentValue()',cmt:'

Returns the current value of the voltage, in Volt, as a floating point number. Note that a get_currentValue() call will *not* start a measure in the device, it will just return the last measure that occurred in the device. Indeed, internally, each Yoctopuce devices is continuously making measurements at a hardware specific frequency.

If continuously calling get_currentValue() leads you to performances issues, then you might consider to switch to callback programming model. Check the \x22advanced programming\x22 chapter in in your device user manual for more information.

',ret:'a floating point number corresponding to the current value of the voltage, in Volt, as a floating point number',ext:'On failure, throws an exception or returns YVoltage.CURRENTVALUE_INVALID.'} ,'get_dataLogger':ds.get_dataLogger ,'get_enabled':{syn:'Returns the activation state of this input.',lib:'%.get_enabled()',pro:'function get_enabled()',cmt:'

Returns the activation state of this input.

',ret:'either YVoltage.ENABLED_FALSE or YVoltage.ENABLED_TRUE, according to the activation state of this input',ext:'On failure, throws an exception or returns YVoltage.ENABLED_INVALID.'} ,'get_errorMessage':{syn:'Returns the error message of the latest error with the voltage sensor.',lib:'%.get_errorMessage()',pro:'function get_errorMessage()',cmt:'

Returns the error message of the latest error with the voltage 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 voltage sensor object'} ,'get_errorType':{syn:'Returns the numerical error code of the latest error with the voltage sensor.',lib:'%.get_errorType()',pro:'function get_errorType()',cmt:'

Returns the numerical error code of the latest error with the voltage 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 occurred while using the voltage sensor object'} ,'get_friendlyName':{syn:'Returns a global identifier of the voltage sensor in the format MODULE_NAME.FUNCTION_NAME.',lib:'%.get_friendlyName()',pro:'function get_friendlyName()',cmt:'

Returns a global identifier of the voltage sensor in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the voltage sensor if they are defined, otherwise the serial number of the module and the hardware identifier of the voltage sensor (for example: MyCustomName.relay1)

',ret:'a string that uniquely identifies the voltage sensor using logical names (ex: MyCustomName.relay1)',ext:'On failure, throws an exception or returns YVoltage.FRIENDLYNAME_INVALID.'} ,'get_functionDescriptor':ds.get_functionDescriptor ,'get_functionId':{syn:'Returns the hardware identifier of the voltage sensor, without reference to the module.',lib:'%.get_functionId()',pro:'function get_functionId()',cmt:'

Returns the hardware identifier of the voltage sensor, without reference to the module. For example relay1

',ret:'a string that identifies the voltage sensor (ex: relay1)',ext:'On failure, throws an exception or returns YVoltage.FUNCTIONID_INVALID.'} ,'get_hardwareId':{syn:'Returns the unique hardware identifier of the voltage sensor in the form SERIAL.FUNCTIONID.',lib:'%.get_hardwareId()',pro:'function get_hardwareId()',cmt:'

Returns the unique hardware identifier of the voltage sensor in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the voltage sensor (for example RELAYLO1-123456.relay1).

',ret:'a string that uniquely identifies the voltage sensor (ex: RELAYLO1-123456.relay1)',ext:'On failure, throws an exception or returns YVoltage.HARDWAREID_INVALID.'} ,'get_highestValue':{syn:'Returns the maximal value observed for the voltage since the device was started.',lib:'%.get_highestValue()',pro:'function get_highestValue()',cmt:'

Returns the maximal value observed for the voltage since the device was started. Can be reset to an arbitrary value thanks to set_highestValue().

',ret:'a floating point number corresponding to the maximal value observed for the voltage since the device was started',ext:'On failure, throws an exception or returns YVoltage.HIGHESTVALUE_INVALID.'} ,'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:'%.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 YVoltage.LOGFREQUENCY_INVALID.'} ,'get_logicalName':{syn:'Returns the logical name of the voltage sensor.',lib:'%.get_logicalName()',pro:'function get_logicalName()',cmt:'

Returns the logical name of the voltage sensor.

',ret:'a string corresponding to the logical name of the voltage sensor.',ext:'On failure, throws an exception or returns YVoltage.LOGICALNAME_INVALID.'} ,'get_lowestValue':{syn:'Returns the minimal value observed for the voltage since the device was started.',lib:'%.get_lowestValue()',pro:'function get_lowestValue()',cmt:'

Returns the minimal value observed for the voltage since the device was started. Can be reset to an arbitrary value thanks to set_lowestValue().

',ret:'a floating point number corresponding to the minimal value observed for the voltage since the device was started',ext:'On failure, throws an exception or returns YVoltage.LOWESTVALUE_INVALID.'} ,'get_module':ds.get_module ,'get_module_async':ds.get_module_async ,'get_recordedData':ds.get_recordedData ,'get_reportFrequency':{syn:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.',lib:'%.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 YVoltage.REPORTFREQUENCY_INVALID.'} ,'get_resolution':{syn:'Returns the resolution of the measured values.',lib:'%.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. Remember to call the saveToFlash() method of the module if the modification must be kept.

',ret:'a floating point number corresponding to the resolution of the measured values',ext:'On failure, throws an exception or returns YVoltage.RESOLUTION_INVALID.'} ,'get_sensorState':{syn:'Returns the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now.',lib:'%.get_sensorState()',pro:'function get_sensorState()',cmt:'

Returns the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now.

',ret:'an integer corresponding to the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now',ext:'On failure, throws an exception or returns YVoltage.SENSORSTATE_INVALID.'} ,'get_serialNumber':ds.get_serialNumber ,'get_unit':{syn:'Returns the measuring unit for the voltage.',lib:'%.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 YVoltage.UNIT_INVALID.'} ,'get_userData':dm.get_userData ,'isOnline':{syn:'Checks if the voltage sensor is currently reachable, without raising any error.',lib:'%.isOnline()',pro:'function isOnline()',cmt:'

Checks if the voltage sensor is currently reachable, without raising any error. If there is a cached value for the voltage 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 voltage sensor.

',ret:'true if the voltage sensor can be reached, and false otherwise'} ,'isOnline_async':{syn:'Checks if the voltage sensor is currently reachable, without raising any error (asynchronous version).',lib:'%.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'

Checks if the voltage sensor is currently reachable, without raising any error (asynchronous version). If there is a cached value for the voltage 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.'} ,'load':{syn:'Preloads the voltage sensor cache with a specified validity duration.',lib:'%.load()',pro:'function load(msValidity)',cmt:'

Preloads the voltage 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 traffic 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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadAttribute':ds.loadAttribute ,'loadCalibrationPoints':ds.loadCalibrationPoints ,'load_async':{syn:'Preloads the voltage sensor cache with a specified validity duration (asynchronous version).',lib:'%.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'

Preloads the voltage 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 traffic 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.'} ,'muteValueCallbacks':ds.muteValueCallbacks ,'nextVoltage':{syn:'Continues the enumeration of voltage sensors started using yFirstVoltage().',lib:'%.nextVoltage()',pro:'function nextVoltage()',cmt:'

Continues the enumeration of voltage sensors started using yFirstVoltage(). Caution: You can\x27t make any assumption about the returned voltage sensors order. If you want to find a specific a voltage sensor, use Voltage.findVoltage() and a hardwareID or a logical name.

',ret:'a pointer to a YVoltage object, corresponding to a voltage sensor currently online, or a null pointer if there are no more voltage sensors to enumerate.'} ,'registerTimedReportCallback':ds.registerTimedReportCallback ,'registerValueCallback':ds.registerValueCallback ,'set_advMode':{syn:'Changes the measuring mode used for the advertised value pushed to the parent hub.',lib:'%.set_advMode()',pro:'function set_advMode(newval)',cmt:'

Changes the measuring mode used for the advertised value pushed to the parent hub. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'a value among YVoltage.ADVMODE_IMMEDIATE, YVoltage.ADVMODE_PERIOD_AVG, YVoltage.ADVMODE_PERIOD_MIN and YVoltage.ADVMODE_PERIOD_MAX corresponding to the measuring mode used for the advertised value pushed to the parent hub'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_enabled':{syn:'Changes the activation state of this voltage input.',lib:'%.set_enabled()',pro:'function set_enabled(newval)',cmt:'

Changes the activation state of this voltage input. When AC measurements are disabled, the device will always assume a DC signal, and vice-versa. When both AC and DC measurements are active, the device switches between AC and DC mode based on the relative amplitude of variations compared to the average value. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'either YVoltage.ENABLED_FALSE or YVoltage.ENABLED_TRUE, according to the activation state of this voltage input'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_highestValue':ds.set_highestValue ,'set_logFrequency':ds.set_logFrequency ,'set_logicalName':{syn:'Changes the logical name of the voltage sensor.',lib:'%.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'

Changes the logical name of the voltage 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 voltage sensor.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_lowestValue':ds.set_lowestValue ,'set_reportFrequency':ds.set_reportFrequency ,'set_resolution':ds.set_resolution ,'set_userData':dm.set_userData ,'startDataLogger':ds.startDataLogger ,'stopDataLogger':ds.stopDataLogger ,'unmuteValueCallbacks':ds.unmuteValueCallbacks ,'wait_async':dm.wait_async }; //--- (end of generated code: Voltage) //--- (generated code: VoltageOutput) doc['VoltageOutput']={'':{syn:'Voltage output control interface, available for instance in the Yocto-0-10V-Tx',inc:'<script type='text/javascript' src='yocto_voltageoutput.js'></script>',cmt:'

The YVoltageOutput class allows you to drive a voltage output.

'} ,'FindVoltageOutput':{syn:'Retrieves a voltage output for a given identifier.',lib:'YVoltageOutput.FindVoltageOutput()',pro:'function FindVoltageOutput(func)',cmt:'

Retrieves a voltage output for a given identifier. The identifier can be specified using several formats:

This function does not require that the voltage output is online at the time it is invoked. The returned object is nevertheless valid. Use the method YVoltageOutput.isOnline() to test if the voltage output is indeed online at a given time. In case of ambiguity when looking for a voltage output by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object\x27s is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

',par:{func:'a string that uniquely characterizes the voltage output, for instance TX010V01.voltageOutput1.'},ret:'a YVoltageOutput object allowing you to drive the voltage output.'} ,'FirstVoltageOutput':{syn:'Starts the enumeration of voltage outputs currently accessible.',lib:'YVoltageOutput.FirstVoltageOutput()',pro:'function FirstVoltageOutput()',cmt:'

Starts the enumeration of voltage outputs currently accessible. Use the method YVoltageOutput.nextVoltageOutput() to iterate on next voltage outputs.

',ret:'a pointer to a YVoltageOutput object, corresponding to the first voltage output currently online, or a null pointer if there are none.'} ,'clearCache':{syn:'Invalidates the cache.',lib:'%.clearCache()',pro:'function clearCache()',cmt:'

Invalidates the cache. Invalidates the cache of the voltage output attributes. Forces the next call to get_xxx() or loadxxx() to use values that come from the device.

'} ,'describe':{syn:'Returns a short text that describes unambiguously the instance of the voltage output in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'%.describe()',pro:'function describe()',cmt:'

Returns a short text that describes unambiguously the instance of the voltage output 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 voltage output (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'} ,'get_advertisedValue':{syn:'Returns the current value of the voltage output (no more than 6 characters).',lib:'%.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'

Returns the current value of the voltage output (no more than 6 characters).

',ret:'a string corresponding to the current value of the voltage output (no more than 6 characters).',ext:'On failure, throws an exception or returns YVoltageOutput.ADVERTISEDVALUE_INVALID.'} ,'get_currentVoltage':{syn:'Returns the output voltage set point, in V.',lib:'%.get_currentVoltage()',pro:'function get_currentVoltage()',cmt:'

Returns the output voltage set point, in V.

',ret:'a floating point number corresponding to the output voltage set point, in V',ext:'On failure, throws an exception or returns YVoltageOutput.CURRENTVOLTAGE_INVALID.'} ,'get_errorMessage':{syn:'Returns the error message of the latest error with the voltage output.',lib:'%.get_errorMessage()',pro:'function get_errorMessage()',cmt:'

Returns the error message of the latest error with the voltage output. 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 voltage output object'} ,'get_errorType':{syn:'Returns the numerical error code of the latest error with the voltage output.',lib:'%.get_errorType()',pro:'function get_errorType()',cmt:'

Returns the numerical error code of the latest error with the voltage output. 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 occurred while using the voltage output object'} ,'get_friendlyName':{syn:'Returns a global identifier of the voltage output in the format MODULE_NAME.FUNCTION_NAME.',lib:'%.get_friendlyName()',pro:'function get_friendlyName()',cmt:'

Returns a global identifier of the voltage output in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the voltage output if they are defined, otherwise the serial number of the module and the hardware identifier of the voltage output (for example: MyCustomName.relay1)

',ret:'a string that uniquely identifies the voltage output using logical names (ex: MyCustomName.relay1)',ext:'On failure, throws an exception or returns YVoltageOutput.FRIENDLYNAME_INVALID.'} ,'get_functionDescriptor':ds.get_functionDescriptor ,'get_functionId':{syn:'Returns the hardware identifier of the voltage output, without reference to the module.',lib:'%.get_functionId()',pro:'function get_functionId()',cmt:'

Returns the hardware identifier of the voltage output, without reference to the module. For example relay1

',ret:'a string that identifies the voltage output (ex: relay1)',ext:'On failure, throws an exception or returns YVoltageOutput.FUNCTIONID_INVALID.'} ,'get_hardwareId':{syn:'Returns the unique hardware identifier of the voltage output in the form SERIAL.FUNCTIONID.',lib:'%.get_hardwareId()',pro:'function get_hardwareId()',cmt:'

Returns the unique hardware identifier of the voltage output in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the voltage output (for example RELAYLO1-123456.relay1).

',ret:'a string that uniquely identifies the voltage output (ex: RELAYLO1-123456.relay1)',ext:'On failure, throws an exception or returns YVoltageOutput.HARDWAREID_INVALID.'} ,'get_logicalName':{syn:'Returns the logical name of the voltage output.',lib:'%.get_logicalName()',pro:'function get_logicalName()',cmt:'

Returns the logical name of the voltage output.

',ret:'a string corresponding to the logical name of the voltage output.',ext:'On failure, throws an exception or returns YVoltageOutput.LOGICALNAME_INVALID.'} ,'get_module':ds.get_module ,'get_module_async':ds.get_module_async ,'get_serialNumber':ds.get_serialNumber ,'get_userData':dm.get_userData ,'get_voltageAtStartUp':{syn:'Returns the selected voltage output at device startup, in V.',lib:'%.get_voltageAtStartUp()',pro:'function get_voltageAtStartUp()',cmt:'

Returns the selected voltage output at device startup, in V.

',ret:'a floating point number corresponding to the selected voltage output at device startup, in V',ext:'On failure, throws an exception or returns YVoltageOutput.VOLTAGEATSTARTUP_INVALID.'} ,'isOnline':{syn:'Checks if the voltage output is currently reachable, without raising any error.',lib:'%.isOnline()',pro:'function isOnline()',cmt:'

Checks if the voltage output is currently reachable, without raising any error. If there is a cached value for the voltage output 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 voltage output.

',ret:'true if the voltage output can be reached, and false otherwise'} ,'isOnline_async':{syn:'Checks if the voltage output is currently reachable, without raising any error (asynchronous version).',lib:'%.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'

Checks if the voltage output is currently reachable, without raising any error (asynchronous version). If there is a cached value for the voltage output 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.'} ,'load':{syn:'Preloads the voltage output cache with a specified validity duration.',lib:'%.load()',pro:'function load(msValidity)',cmt:'

Preloads the voltage output 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 traffic 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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadAttribute':ds.loadAttribute ,'load_async':{syn:'Preloads the voltage output cache with a specified validity duration (asynchronous version).',lib:'%.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'

Preloads the voltage output 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 traffic 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.'} ,'muteValueCallbacks':ds.muteValueCallbacks ,'nextVoltageOutput':{syn:'Continues the enumeration of voltage outputs started using yFirstVoltageOutput().',lib:'%.nextVoltageOutput()',pro:'function nextVoltageOutput()',cmt:'

Continues the enumeration of voltage outputs started using yFirstVoltageOutput(). Caution: You can\x27t make any assumption about the returned voltage outputs order. If you want to find a specific a voltage output, use VoltageOutput.findVoltageOutput() and a hardwareID or a logical name.

',ret:'a pointer to a YVoltageOutput object, corresponding to a voltage output currently online, or a null pointer if there are no more voltage outputs to enumerate.'} ,'registerValueCallback':ds.registerValueCallback ,'set_currentVoltage':{syn:'Changes the output voltage, in V.',lib:'%.set_currentVoltage()',pro:'function set_currentVoltage(newval)',cmt:'

Changes the output voltage, in V. Valid range is from 0 to 10V.

',par:{newval:'a floating point number corresponding to the output voltage, in V'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_logicalName':{syn:'Changes the logical name of the voltage output.',lib:'%.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'

Changes the logical name of the voltage output. 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 output.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_userData':dm.set_userData ,'set_voltageAtStartUp':{syn:'Changes the output voltage at device start up.',lib:'%.set_voltageAtStartUp()',pro:'function set_voltageAtStartUp(newval)',cmt:'

Changes the output voltage at device start up. Remember to call the matching module saveToFlash() method, otherwise this call has no effect.

',par:{newval:'a floating point number corresponding to the output voltage at device start up'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'unmuteValueCallbacks':ds.unmuteValueCallbacks ,'voltageMove':{syn:'Performs a smooth transition of output voltage.',lib:'%.voltageMove()',pro:'function voltageMove(V_target, ms_duration)',cmt:'

Performs a smooth transition of output voltage. Any explicit voltage change cancels any ongoing transition process.

',par:{V_target:'new output voltage value at the end of the transition (floating-point number, representing the end voltage in V)',ms_duration:'total duration of the transition, in milliseconds'},ret:'YAPI.SUCCESS when the call succeeds.'} ,'wait_async':dm.wait_async }; //--- (end of generated code: VoltageOutput) //--- (generated code: WakeUpMonitor) doc['WakeUpMonitor']={'':{syn:'Wake-up monitor control interface, available for instance in the YoctoHub-GSM-4G, the YoctoHub-Wireless-SR, the YoctoHub-Wireless-g or the YoctoHub-Wireless-n',inc:'<script type='text/javascript' src='yocto_wakeupmonitor.js'></script>',cmt:'

The YWakeUpMonitor class handles globally all wake-up sources, as well as automated sleep mode.

'} ,'FindWakeUpMonitor':{syn:'Retrieves a wake-up monitor for a given identifier.',lib:'YWakeUpMonitor.FindWakeUpMonitor()',pro:'function FindWakeUpMonitor(func)',cmt:'

Retrieves a wake-up monitor for a given identifier. The identifier can be specified using several formats:

This function does not require that the wake-up monitor is online at the time it is invoked. The returned object is nevertheless valid. Use the method YWakeUpMonitor.isOnline() to test if the wake-up monitor is indeed online at a given time. In case of ambiguity when looking for a wake-up monitor by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object\x27s is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

',par:{func:'a string that uniquely characterizes the wake-up monitor, for instance YHUBGSM5.wakeUpMonitor.'},ret:'a YWakeUpMonitor object allowing you to drive the wake-up monitor.'} ,'FirstWakeUpMonitor':{syn:'Starts the enumeration of wake-up monitors currently accessible.',lib:'YWakeUpMonitor.FirstWakeUpMonitor()',pro:'function FirstWakeUpMonitor()',cmt:'

Starts the enumeration of wake-up monitors currently accessible. Use the method YWakeUpMonitor.nextWakeUpMonitor() to iterate on next wake-up monitors.

',ret:'a pointer to a YWakeUpMonitor object, corresponding to the first wake-up monitor currently online, or a null pointer if there are none.'} ,'clearCache':{syn:'Invalidates the cache.',lib:'%.clearCache()',pro:'function clearCache()',cmt:'

Invalidates the cache. Invalidates the cache of the wake-up monitor attributes. Forces the next call to get_xxx() or loadxxx() to use values that come from the device.

'} ,'describe':{syn:'Returns a short text that describes unambiguously the instance of the wake-up monitor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'%.describe()',pro:'function describe()',cmt:'

Returns a short text that describes unambiguously the instance of the wake-up 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 wake-up monitor (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'} ,'get_advertisedValue':{syn:'Returns the current value of the wake-up monitor (no more than 6 characters).',lib:'%.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'

Returns the current value of the wake-up monitor (no more than 6 characters).

',ret:'a string corresponding to the current value of the wake-up monitor (no more than 6 characters).',ext:'On failure, throws an exception or returns YWakeUpMonitor.ADVERTISEDVALUE_INVALID.'} ,'get_errorMessage':{syn:'Returns the error message of the latest error with the wake-up monitor.',lib:'%.get_errorMessage()',pro:'function get_errorMessage()',cmt:'

Returns the error message of the latest error with the wake-up 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 wake-up monitor object'} ,'get_errorType':{syn:'Returns the numerical error code of the latest error with the wake-up monitor.',lib:'%.get_errorType()',pro:'function get_errorType()',cmt:'

Returns the numerical error code of the latest error with the wake-up 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 occurred while using the wake-up monitor object'} ,'get_friendlyName':{syn:'Returns a global identifier of the wake-up monitor in the format MODULE_NAME.FUNCTION_NAME.',lib:'%.get_friendlyName()',pro:'function get_friendlyName()',cmt:'

Returns a global identifier of the wake-up monitor in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the wake-up monitor if they are defined, otherwise the serial number of the module and the hardware identifier of the wake-up monitor (for example: MyCustomName.relay1)

',ret:'a string that uniquely identifies the wake-up monitor using logical names (ex: MyCustomName.relay1)',ext:'On failure, throws an exception or returns YWakeUpMonitor.FRIENDLYNAME_INVALID.'} ,'get_functionDescriptor':ds.get_functionDescriptor ,'get_functionId':{syn:'Returns the hardware identifier of the wake-up monitor, without reference to the module.',lib:'%.get_functionId()',pro:'function get_functionId()',cmt:'

Returns the hardware identifier of the wake-up monitor, without reference to the module. For example relay1

',ret:'a string that identifies the wake-up monitor (ex: relay1)',ext:'On failure, throws an exception or returns YWakeUpMonitor.FUNCTIONID_INVALID.'} ,'get_hardwareId':{syn:'Returns the unique hardware identifier of the wake-up monitor in the form SERIAL.FUNCTIONID.',lib:'%.get_hardwareId()',pro:'function get_hardwareId()',cmt:'

Returns the unique hardware identifier of the wake-up monitor 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 monitor (for example RELAYLO1-123456.relay1).

',ret:'a string that uniquely identifies the wake-up monitor (ex: RELAYLO1-123456.relay1)',ext:'On failure, throws an exception or returns YWakeUpMonitor.HARDWAREID_INVALID.'} ,'get_logicalName':{syn:'Returns the logical name of the wake-up monitor.',lib:'%.get_logicalName()',pro:'function get_logicalName()',cmt:'

Returns the logical name of the wake-up monitor.

',ret:'a string corresponding to the logical name of the wake-up monitor.',ext:'On failure, throws an exception or returns YWakeUpMonitor.LOGICALNAME_INVALID.'} ,'get_module':ds.get_module ,'get_module_async':ds.get_module_async ,'get_nextWakeUp':{syn:'Returns the next scheduled wake up date/time (UNIX format).',lib:'%.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 YWakeUpMonitor.NEXTWAKEUP_INVALID.'} ,'get_powerDuration':{syn:'Returns the maximal wake up time (in seconds) before automatically going to sleep.',lib:'%.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 YWakeUpMonitor.POWERDURATION_INVALID.'} ,'get_serialNumber':ds.get_serialNumber ,'get_sleepCountdown':{syn:'Returns the delay before the next sleep period.',lib:'%.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 YWakeUpMonitor.SLEEPCOUNTDOWN_INVALID.'} ,'get_userData':dm.get_userData ,'get_wakeUpReason':{syn:'Returns the latest wake up reason.',lib:'%.get_wakeUpReason()',pro:'function get_wakeUpReason()',cmt:'

Returns the latest wake up reason.

',ret:'a value among YWakeUpMonitor.WAKEUPREASON_USBPOWER, YWakeUpMonitor.WAKEUPREASON_EXTPOWER, YWakeUpMonitor.WAKEUPREASON_ENDOFSLEEP, YWakeUpMonitor.WAKEUPREASON_EXTSIG1, YWakeUpMonitor.WAKEUPREASON_SCHEDULE1 and YWakeUpMonitor.WAKEUPREASON_SCHEDULE2 corresponding to the latest wake up reason',ext:'On failure, throws an exception or returns YWakeUpMonitor.WAKEUPREASON_INVALID.'} ,'get_wakeUpState':{syn:'Returns the current state of the monitor.',lib:'%.get_wakeUpState()',pro:'function get_wakeUpState()',cmt:'

Returns the current state of the monitor.

',ret:'either YWakeUpMonitor.WAKEUPSTATE_SLEEPING or YWakeUpMonitor.WAKEUPSTATE_AWAKE, according to the current state of the monitor',ext:'On failure, throws an exception or returns YWakeUpMonitor.WAKEUPSTATE_INVALID.'} ,'isOnline':{syn:'Checks if the wake-up monitor is currently reachable, without raising any error.',lib:'%.isOnline()',pro:'function isOnline()',cmt:'

Checks if the wake-up monitor is currently reachable, without raising any error. If there is a cached value for the wake-up 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 wake-up monitor.

',ret:'true if the wake-up monitor can be reached, and false otherwise'} ,'isOnline_async':{syn:'Checks if the wake-up monitor is currently reachable, without raising any error (asynchronous version).',lib:'%.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'

Checks if the wake-up monitor is currently reachable, without raising any error (asynchronous version). If there is a cached value for the wake-up 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.'} ,'load':{syn:'Preloads the wake-up monitor cache with a specified validity duration.',lib:'%.load()',pro:'function load(msValidity)',cmt:'

Preloads the wake-up 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 traffic 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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadAttribute':ds.loadAttribute ,'load_async':{syn:'Preloads the wake-up monitor cache with a specified validity duration (asynchronous version).',lib:'%.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'

Preloads the wake-up 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 traffic 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.'} ,'muteValueCallbacks':ds.muteValueCallbacks ,'nextWakeUpMonitor':{syn:'Continues the enumeration of wake-up monitors started using yFirstWakeUpMonitor().',lib:'%.nextWakeUpMonitor()',pro:'function nextWakeUpMonitor()',cmt:'

Continues the enumeration of wake-up monitors started using yFirstWakeUpMonitor(). Caution: You can\x27t make any assumption about the returned wake-up monitors order. If you want to find a specific a wake-up monitor, use WakeUpMonitor.findWakeUpMonitor() and a hardwareID or a logical name.

',ret:'a pointer to a YWakeUpMonitor object, corresponding to a wake-up monitor currently online, or a null pointer if there are no more wake-up monitors to enumerate.'} ,'registerValueCallback':ds.registerValueCallback ,'resetSleepCountDown':{syn:'Resets the sleep countdown.',lib:'%.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.'} ,'set_logicalName':{syn:'Changes the logical name of the wake-up monitor.',lib:'%.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'

Changes the logical name of the wake-up 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 wake-up monitor.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_nextWakeUp':{syn:'Changes the days of the week when a wake up must take place.',lib:'%.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.'} ,'set_powerDuration':{syn:'Changes the maximal wake up time (seconds) before automatically going to sleep.',lib:'%.set_powerDuration()',pro:'function set_powerDuration(newval)',cmt:'

Changes the maximal wake up time (seconds) before automatically going to sleep. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'set_sleepCountdown':{syn:'Changes the delay before the next sleep period.',lib:'%.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.'} ,'set_userData':dm.set_userData ,'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:'%.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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'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:'%.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:'number of seconds before next wake up',secBeforeSleep:'number of seconds before going into sleep mode'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'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:'%.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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'unmuteValueCallbacks':ds.unmuteValueCallbacks ,'wait_async':dm.wait_async ,'wakeUp':{syn:'Forces a wake up.',lib:'%.wakeUp()',pro:'function wakeUp()',cmt:'

Forces a wake up.

'} }; //--- (end of generated code: WakeUpMonitor) //--- (generated code: WakeUpSchedule) doc['WakeUpSchedule']={'':{syn:'Wake up schedule control interface, available for instance in the YoctoHub-GSM-4G, the YoctoHub-Wireless-SR, the YoctoHub-Wireless-g or the YoctoHub-Wireless-n',inc:'<script type='text/javascript' src='yocto_wakeupschedule.js'></script>',cmt:'

The YWakeUpSchedule class 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.

'} ,'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:

This function does not require that the wake up schedule is online at the time it is invoked. The returned object is nevertheless valid. Use the method YWakeUpSchedule.isOnline() to test if the wake up schedule is indeed online at a given time. In case of ambiguity when looking for a wake up schedule by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object\x27s is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

',par:{func:'a string that uniquely characterizes the wake up schedule, for instance YHUBGSM5.wakeUpSchedule1.'},ret:'a YWakeUpSchedule object allowing you to drive the wake up schedule.'} ,'FirstWakeUpSchedule':{syn:'Starts the enumeration of wake up schedules currently accessible.',lib:'YWakeUpSchedule.FirstWakeUpSchedule()',pro:'function FirstWakeUpSchedule()',cmt:'

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.'} ,'clearCache':{syn:'Invalidates the cache.',lib:'%.clearCache()',pro:'function clearCache()',cmt:'

Invalidates the cache. Invalidates the cache of the wake up schedule attributes. Forces the next call to get_xxx() or loadxxx() to use values that come from the device.

'} ,'describe':{syn:'Returns a short text that describes unambiguously the instance of the wake up schedule in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'%.describe()',pro:'function describe()',cmt:'

Returns a short text that describes unambiguously the instance of 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)'} ,'get_advertisedValue':{syn:'Returns the current value of the wake up schedule (no more than 6 characters).',lib:'%.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).',ext:'On failure, throws an exception or returns YWakeUpSchedule.ADVERTISEDVALUE_INVALID.'} ,'get_errorMessage':{syn:'Returns the error message of the latest error with the wake up schedule.',lib:'%.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'} ,'get_errorType':{syn:'Returns the numerical error code of the latest error with the wake up schedule.',lib:'%.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 occurred while using the wake up schedule object'} ,'get_friendlyName':{syn:'Returns a global identifier of the wake up schedule in the format MODULE_NAME.FUNCTION_NAME.',lib:'%.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 example: MyCustomName.relay1)

',ret:'a string that uniquely identifies the wake up schedule using logical names (ex: MyCustomName.relay1)',ext:'On failure, throws an exception or returns YWakeUpSchedule.FRIENDLYNAME_INVALID.'} ,'get_functionDescriptor':ds.get_functionDescriptor ,'get_functionId':{syn:'Returns the hardware identifier of the wake up schedule, without reference to the module.',lib:'%.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)',ext:'On failure, throws an exception or returns YWakeUpSchedule.FUNCTIONID_INVALID.'} ,'get_hardwareId':{syn:'Returns the unique hardware identifier of the wake up schedule in the form SERIAL.FUNCTIONID.',lib:'%.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)',ext:'On failure, throws an exception or returns YWakeUpSchedule.HARDWAREID_INVALID.'} ,'get_hours':{syn:'Returns the hours scheduled for wake up.',lib:'%.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 YWakeUpSchedule.HOURS_INVALID.'} ,'get_logicalName':{syn:'Returns the logical name of the wake up schedule.',lib:'%.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.',ext:'On failure, throws an exception or returns YWakeUpSchedule.LOGICALNAME_INVALID.'} ,'get_minutes':{syn:'Returns all the minutes of each hour that are scheduled for wake up.',lib:'%.get_minutes()',pro:'function get_minutes()',cmt:'

Returns all the minutes of each hour that are scheduled for wake up.

'} ,'get_minutesA':{syn:'Returns the minutes in the 00-29 interval of each hour scheduled for wake up.',lib:'%.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 YWakeUpSchedule.MINUTESA_INVALID.'} ,'get_minutesB':{syn:'Returns the minutes in the 30-59 interval of each hour scheduled for wake up.',lib:'%.get_minutesB()',pro:'function get_minutesB()',cmt:'

Returns the minutes in the 30-59 interval of each hour scheduled for wake up.

',ret:'an integer corresponding to the minutes in the 30-59 interval of each hour scheduled for wake up',ext:'On failure, throws an exception or returns YWakeUpSchedule.MINUTESB_INVALID.'} ,'get_module':ds.get_module ,'get_module_async':ds.get_module_async ,'get_monthDays':{syn:'Returns the days of the month scheduled for wake up.',lib:'%.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 YWakeUpSchedule.MONTHDAYS_INVALID.'} ,'get_months':{syn:'Returns the months scheduled for wake up.',lib:'%.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 YWakeUpSchedule.MONTHS_INVALID.'} ,'get_nextOccurence':{syn:'Returns the date/time (seconds) of the next wake up occurrence.',lib:'%.get_nextOccurence()',pro:'function get_nextOccurence()',cmt:'

Returns the date/time (seconds) of the next wake up occurrence.

',ret:'an integer corresponding to the date/time (seconds) of the next wake up occurrence',ext:'On failure, throws an exception or returns YWakeUpSchedule.NEXTOCCURENCE_INVALID.'} ,'get_secondsBefore':{syn:'Returns the number of seconds to anticipate wake-up time to allow the system to power-up.',lib:'%.get_secondsBefore()',pro:'function get_secondsBefore()',cmt:'

Returns the number of seconds to anticipate wake-up time to allow the system to power-up.

',ret:'an integer corresponding to the number of seconds to anticipate wake-up time to allow the system to power-up',ext:'On failure, throws an exception or returns YWakeUpSchedule.SECONDSBEFORE_INVALID.'} ,'get_serialNumber':ds.get_serialNumber ,'get_userData':dm.get_userData ,'get_weekDays':{syn:'Returns the days of the week scheduled for wake up.',lib:'%.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 YWakeUpSchedule.WEEKDAYS_INVALID.'} ,'isOnline':{syn:'Checks if the wake up schedule is currently reachable, without raising any error.',lib:'%.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'} ,'isOnline_async':{syn:'Checks if the wake up schedule is currently reachable, without raising any error (asynchronous version).',lib:'%.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.'} ,'load':{syn:'Preloads the wake up schedule cache with a specified validity duration.',lib:'%.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 traffic 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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadAttribute':ds.loadAttribute ,'load_async':{syn:'Preloads the wake up schedule cache with a specified validity duration (asynchronous version).',lib:'%.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 traffic 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.'} ,'muteValueCallbacks':ds.muteValueCallbacks ,'nextWakeUpSchedule':{syn:'Continues the enumeration of wake up schedules started using yFirstWakeUpSchedule().',lib:'%.nextWakeUpSchedule()',pro:'function nextWakeUpSchedule()',cmt:'

Continues the enumeration of wake up schedules started using yFirstWakeUpSchedule(). Caution: You can\x27t make any assumption about the returned wake up schedules order. If you want to find a specific a wake up schedule, use WakeUpSchedule.findWakeUpSchedule() and a hardwareID or a logical name.

',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.'} ,'registerValueCallback':ds.registerValueCallback ,'set_hours':{syn:'Changes the hours when a wake up must take place.',lib:'%.set_hours()',pro:'function set_hours(newval)',cmt:'

Changes the hours when a wake up must take place. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'set_logicalName':{syn:'Changes the logical name of the wake up schedule.',lib:'%.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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_minutes':{syn:'Changes all the minutes where a wake up must take place.',lib:'%.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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_minutesA':{syn:'Changes the minutes in the 00-29 interval when a wake up must take place.',lib:'%.set_minutesA()',pro:'function set_minutesA(newval)',cmt:'

Changes the minutes in the 00-29 interval when a wake up must take place. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'set_minutesB':{syn:'Changes the minutes in the 30-59 interval when a wake up must take place.',lib:'%.set_minutesB()',pro:'function set_minutesB(newval)',cmt:'

Changes the minutes in the 30-59 interval when a wake up must take place. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'set_monthDays':{syn:'Changes the days of the month when a wake up must take place.',lib:'%.set_monthDays()',pro:'function set_monthDays(newval)',cmt:'

Changes the days of the month when a wake up must take place. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'set_months':{syn:'Changes the months when a wake up must take place.',lib:'%.set_months()',pro:'function set_months(newval)',cmt:'

Changes the months when a wake up must take place. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'set_secondsBefore':{syn:'Changes the number of seconds to anticipate wake-up time to allow the system to power-up.',lib:'%.set_secondsBefore()',pro:'function set_secondsBefore(newval)',cmt:'

Changes the number of seconds to anticipate wake-up time to allow the system to power-up. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'an integer corresponding to the number of seconds to anticipate wake-up time to allow the system to power-up'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_userData':dm.set_userData ,'set_weekDays':{syn:'Changes the days of the week when a wake up must take place.',lib:'%.set_weekDays()',pro:'function set_weekDays(newval)',cmt:'

Changes the days of the week when a wake up must take place. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'unmuteValueCallbacks':ds.unmuteValueCallbacks ,'wait_async':dm.wait_async }; //--- (end of generated code: WakeUpSchedule) //--- (generated code: Watchdog) doc['Watchdog']={'':{syn:'Watchdog control interface, available for instance in the Yocto-WatchdogDC',inc:'<script type='text/javascript' src='yocto_watchdog.js'></script>',cmt:'

The YWatchdog class allows you to drive a Yoctopuce watchdog. A watchdog works like a relay, with an extra timer that can automatically trigger a brief power cycle to an appliance after a preset delay, to force this appliance to reset if a problem occurs. During normal use, the watchdog timer is reset periodically by the application to prevent the automated power cycle. Whenever the application dies, the watchdog will automatically trigger the power cycle. The watchdog can also be driven directly with pulse and delayedPulse methods to switch off an appliance for a given duration.

'} ,'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:

This function does not require that the watchdog is online at the time it is invoked. The returned object is nevertheless valid. Use the method YWatchdog.isOnline() to test if the watchdog is indeed online at a given time. In case of ambiguity when looking for a watchdog by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object\x27s is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

',par:{func:'a string that uniquely characterizes the watchdog, for instance WDOGDC01.watchdog1.'},ret:'a YWatchdog object allowing you to drive the watchdog.'} ,'FirstWatchdog':{syn:'Starts the enumeration of watchdog currently accessible.',lib:'YWatchdog.FirstWatchdog()',pro:'function FirstWatchdog()',cmt:'

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.'} ,'clearCache':{syn:'Invalidates the cache.',lib:'%.clearCache()',pro:'function clearCache()',cmt:'

Invalidates the cache. Invalidates the cache of the watchdog attributes. Forces the next call to get_xxx() or loadxxx() to use values that come from the device.

'} ,'delayedPulse':{syn:'Schedules a pulse.',lib:'%.delayedPulse()',pro:'function delayedPulse(ms_delay, ms_duration)',cmt:'

Schedules a pulse.

',par:{ms_delay:'waiting time before the pulse, in milliseconds',ms_duration:'pulse duration, in milliseconds'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'describe':{syn:'Returns a short text that describes unambiguously the instance of the watchdog in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'%.describe()',pro:'function describe()',cmt:'

Returns a short text that describes unambiguously the instance of 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)'} ,'get_advertisedValue':{syn:'Returns the current value of the watchdog (no more than 6 characters).',lib:'%.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).',ext:'On failure, throws an exception or returns YWatchdog.ADVERTISEDVALUE_INVALID.'} ,'get_autoStart':{syn:'Returns the watchdog running state at module power on.',lib:'%.get_autoStart()',pro:'function get_autoStart()',cmt:'

Returns the watchdog running state at module power on.

',ret:'either YWatchdog.AUTOSTART_OFF or YWatchdog.AUTOSTART_ON, according to the watchdog running state at module power on',ext:'On failure, throws an exception or returns YWatchdog.AUTOSTART_INVALID.'} ,'get_countdown':{syn:'Returns the number of milliseconds remaining before a pulse (delayedPulse() call) When there is no scheduled pulse, returns zero.',lib:'%.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 YWatchdog.COUNTDOWN_INVALID.'} ,'get_errorMessage':{syn:'Returns the error message of the latest error with the watchdog.',lib:'%.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'} ,'get_errorType':{syn:'Returns the numerical error code of the latest error with the watchdog.',lib:'%.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 occurred while using the watchdog object'} ,'get_friendlyName':{syn:'Returns a global identifier of the watchdog in the format MODULE_NAME.FUNCTION_NAME.',lib:'%.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 example: MyCustomName.relay1)

',ret:'a string that uniquely identifies the watchdog using logical names (ex: MyCustomName.relay1)',ext:'On failure, throws an exception or returns YWatchdog.FRIENDLYNAME_INVALID.'} ,'get_functionDescriptor':ds.get_functionDescriptor ,'get_functionId':{syn:'Returns the hardware identifier of the watchdog, without reference to the module.',lib:'%.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)',ext:'On failure, throws an exception or returns YWatchdog.FUNCTIONID_INVALID.'} ,'get_hardwareId':{syn:'Returns the unique hardware identifier of the watchdog in the form SERIAL.FUNCTIONID.',lib:'%.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)',ext:'On failure, throws an exception or returns YWatchdog.HARDWAREID_INVALID.'} ,'get_lastTrigger':{syn:'Returns the number of seconds spent since the last output power-up event.',lib:'%.get_lastTrigger()',pro:'function get_lastTrigger()',cmt:'

Returns the number of seconds spent since the last output power-up event.

',ret:'an integer corresponding to the number of seconds spent since the last output power-up event',ext:'On failure, throws an exception or returns YWatchdog.LASTTRIGGER_INVALID.'} ,'get_logicalName':{syn:'Returns the logical name of the watchdog.',lib:'%.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.',ext:'On failure, throws an exception or returns YWatchdog.LOGICALNAME_INVALID.'} ,'get_maxTimeOnStateA':{syn:'Returns the maximum time (ms) allowed for the watchdog to stay in state A before automatically switching back in to B state.',lib:'%.get_maxTimeOnStateA()',pro:'function get_maxTimeOnStateA()',cmt:'

Returns the maximum time (ms) allowed for the watchdog to stay in state A before automatically switching back in to B state. Zero means no time limit.

',ret:'an integer corresponding to the maximum time (ms) allowed for the watchdog to stay in state A before automatically switching back in to B state',ext:'On failure, throws an exception or returns YWatchdog.MAXTIMEONSTATEA_INVALID.'} ,'get_maxTimeOnStateB':{syn:'Retourne the maximum time (ms) allowed for the watchdog to stay in state B before automatically switching back in to A state.',lib:'%.get_maxTimeOnStateB()',pro:'function get_maxTimeOnStateB()',cmt:'

Retourne the maximum time (ms) allowed for the watchdog to stay in state B before automatically switching back in to A state. Zero means no time limit.

',ret:'an integer',ext:'On failure, throws an exception or returns YWatchdog.MAXTIMEONSTATEB_INVALID.'} ,'get_module':ds.get_module ,'get_module_async':ds.get_module_async ,'get_output':{syn:'Returns the output state of the watchdog, when used as a simple switch (single throw).',lib:'%.get_output()',pro:'function get_output()',cmt:'

Returns the output state of the watchdog, when used as a simple switch (single throw).

',ret:'either YWatchdog.OUTPUT_OFF or YWatchdog.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 YWatchdog.OUTPUT_INVALID.'} ,'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:'%.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 YWatchdog.PULSETIMER_INVALID.'} ,'get_running':{syn:'Returns the watchdog running state.',lib:'%.get_running()',pro:'function get_running()',cmt:'

Returns the watchdog running state.

',ret:'either YWatchdog.RUNNING_OFF or YWatchdog.RUNNING_ON, according to the watchdog running state',ext:'On failure, throws an exception or returns YWatchdog.RUNNING_INVALID.'} ,'get_serialNumber':ds.get_serialNumber ,'get_state':{syn:'Returns the state of the watchdog (A for the idle position, B for the active position).',lib:'%.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 YWatchdog.STATE_A or YWatchdog.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 YWatchdog.STATE_INVALID.'} ,'get_stateAtPowerOn':{syn:'Returns the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED to leave the relay state as is).',lib:'%.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 to leave the relay state as is).

',ret:'a value among YWatchdog.STATEATPOWERON_UNCHANGED, YWatchdog.STATEATPOWERON_A and YWatchdog.STATEATPOWERON_B corresponding to the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED to leave the relay state as is)',ext:'On failure, throws an exception or returns YWatchdog.STATEATPOWERON_INVALID.'} ,'get_triggerDelay':{syn:'Returns the waiting duration before a reset is automatically triggered by the watchdog, in milliseconds.',lib:'%.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 YWatchdog.TRIGGERDELAY_INVALID.'} ,'get_triggerDuration':{syn:'Returns the duration of resets caused by the watchdog, in milliseconds.',lib:'%.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 YWatchdog.TRIGGERDURATION_INVALID.'} ,'get_userData':dm.get_userData ,'isOnline':{syn:'Checks if the watchdog is currently reachable, without raising any error.',lib:'%.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'} ,'isOnline_async':{syn:'Checks if the watchdog is currently reachable, without raising any error (asynchronous version).',lib:'%.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.'} ,'load':{syn:'Preloads the watchdog cache with a specified validity duration.',lib:'%.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 traffic 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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadAttribute':ds.loadAttribute ,'load_async':{syn:'Preloads the watchdog cache with a specified validity duration (asynchronous version).',lib:'%.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 traffic 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.'} ,'muteValueCallbacks':ds.muteValueCallbacks ,'nextWatchdog':{syn:'Continues the enumeration of watchdog started using yFirstWatchdog().',lib:'%.nextWatchdog()',pro:'function nextWatchdog()',cmt:'

Continues the enumeration of watchdog started using yFirstWatchdog(). Caution: You can\x27t make any assumption about the returned watchdog order. If you want to find a specific a watchdog, use Watchdog.findWatchdog() and a hardwareID or a logical name.

',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.'} ,'pulse':{syn:'Sets the relay to output B (active) for a specified duration, then brings it automatically back to output A (idle state).',lib:'%.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 milliseconds'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'registerValueCallback':ds.registerValueCallback ,'resetWatchdog':{syn:'Resets the watchdog.',lib:'%.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 watchdog to trigger

',ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_autoStart':{syn:'Changes the watchdog running state at module power on.',lib:'%.set_autoStart()',pro:'function set_autoStart(newval)',cmt:'

Changes the watchdog running state at module power on. Remember to call the saveToFlash() method and then to reboot the module to apply this setting.

',par:{newval:'either YWatchdog.AUTOSTART_OFF or YWatchdog.AUTOSTART_ON, according to the watchdog running state at module power on'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_logicalName':{syn:'Changes the logical name of the watchdog.',lib:'%.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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_maxTimeOnStateA':{syn:'Changes the maximum time (ms) allowed for the watchdog to stay in state A before automatically switching back in to B state.',lib:'%.set_maxTimeOnStateA()',pro:'function set_maxTimeOnStateA(newval)',cmt:'

Changes the maximum time (ms) allowed for the watchdog to stay in state A before automatically switching back in to B state. Use zero for no time limit. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'an integer corresponding to the maximum time (ms) allowed for the watchdog to stay in state A before automatically switching back in to B state'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_maxTimeOnStateB':{syn:'Changes the maximum time (ms) allowed for the watchdog to stay in state B before automatically switching back in to A state.',lib:'%.set_maxTimeOnStateB()',pro:'function set_maxTimeOnStateB(newval)',cmt:'

Changes the maximum time (ms) allowed for the watchdog to stay in state B before automatically switching back in to A state. Use zero for no time limit. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'an integer corresponding to the maximum time (ms) allowed for the watchdog to stay in state B before automatically switching back in to A state'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_output':{syn:'Changes the output state of the watchdog, when used as a simple switch (single throw).',lib:'%.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 YWatchdog.OUTPUT_OFF or YWatchdog.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.'} ,'set_running':{syn:'Changes the running state of the watchdog.',lib:'%.set_running()',pro:'function set_running(newval)',cmt:'

Changes the running state of the watchdog.

',par:{newval:'either YWatchdog.RUNNING_OFF or YWatchdog.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.'} ,'set_state':{syn:'Changes the state of the watchdog (A for the idle position, B for the active position).',lib:'%.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 YWatchdog.STATE_A or YWatchdog.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.'} ,'set_stateAtPowerOn':{syn:'Changes the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED to leave the relay state as is).',lib:'%.set_stateAtPowerOn()',pro:'function set_stateAtPowerOn(newval)',cmt:'

Changes the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED to leave the relay state as is). Remember to call the matching module saveToFlash() method, otherwise this call will have no effect.

',par:{newval:'a value among YWatchdog.STATEATPOWERON_UNCHANGED, YWatchdog.STATEATPOWERON_A and YWatchdog.STATEATPOWERON_B corresponding to the state of the watchdog at device startup (A for the idle position, B for the active position, UNCHANGED to leave the relay state as is)'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_triggerDelay':{syn:'Changes the waiting delay before a reset is triggered by the watchdog, in milliseconds.',lib:'%.set_triggerDelay()',pro:'function set_triggerDelay(newval)',cmt:'

Changes the waiting delay before a reset is triggered by the watchdog, in milliseconds. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'set_triggerDuration':{syn:'Changes the duration of resets caused by the watchdog, in milliseconds.',lib:'%.set_triggerDuration()',pro:'function set_triggerDuration(newval)',cmt:'

Changes the duration of resets caused by the watchdog, in milliseconds. Remember to call the saveToFlash() method of the module if the modification must be kept.

',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.'} ,'set_userData':dm.set_userData ,'toggle':{syn:'Switch the relay to the opposite state.',lib:'%.toggle()',pro:'function toggle()',cmt:'

Switch the relay to the opposite state.

',ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'unmuteValueCallbacks':ds.unmuteValueCallbacks ,'wait_async':dm.wait_async }; //--- (end of generated code: Watchdog) //--- (generated code: WeighScale) doc['WeighScale']={'':{syn:'Weighing scale sensor control interface, available for instance in the Yocto-Bridge or the Yocto-MaxiBridge',inc:'<script type='text/javascript' src='yocto_weighscale.js'></script>',cmt:'

The YWeighScale class provides a weight measurement from a ratiometric sensor. It can be used to control the bridge excitation parameters, in order to avoid measure shifts caused by temperature variation in the electronics, and can also automatically apply an additional correction factor based on temperature to compensate for offsets in the load cell itself.

'} ,'FindWeighScale':{syn:'Retrieves a weighing scale sensor for a given identifier.',lib:'YWeighScale.FindWeighScale()',pro:'function FindWeighScale(func)',cmt:'

Retrieves a weighing scale sensor for a given identifier. The identifier can be specified using several formats:

This function does not require that the weighing scale sensor is online at the time it is invoked. The returned object is nevertheless valid. Use the method YWeighScale.isOnline() to test if the weighing scale sensor is indeed online at a given time. In case of ambiguity when looking for a weighing scale sensor by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object\x27s is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

',par:{func:'a string that uniquely characterizes the weighing scale sensor, for instance YWBRIDG1.weighScale1.'},ret:'a YWeighScale object allowing you to drive the weighing scale sensor.'} ,'FirstWeighScale':{syn:'Starts the enumeration of weighing scale sensors currently accessible.',lib:'YWeighScale.FirstWeighScale()',pro:'function FirstWeighScale()',cmt:'

Starts the enumeration of weighing scale sensors currently accessible. Use the method YWeighScale.nextWeighScale() to iterate on next weighing scale sensors.

',ret:'a pointer to a YWeighScale object, corresponding to the first weighing scale sensor currently online, or a null pointer if there are none.'} ,'calibrateFromPoints':ds.calibrateFromPoints ,'clearCache':{syn:'Invalidates the cache.',lib:'%.clearCache()',pro:'function clearCache()',cmt:'

Invalidates the cache. Invalidates the cache of the weighing scale sensor attributes. Forces the next call to get_xxx() or loadxxx() to use values that come from the device.

'} ,'describe':{syn:'Returns a short text that describes unambiguously the instance of the weighing scale sensor in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'%.describe()',pro:'function describe()',cmt:'

Returns a short text that describes unambiguously the instance of the weighing scale 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 weighing scale sensor (ex: Relay(MyCustomName.relay1)=RELAYLO1-123456.relay1)'} ,'get_advMode':{syn:'Returns the measuring mode used for the advertised value pushed to the parent hub.',lib:'%.get_advMode()',pro:'function get_advMode()',cmt:'

Returns the measuring mode used for the advertised value pushed to the parent hub.

',ret:'a value among YWeighScale.ADVMODE_IMMEDIATE, YWeighScale.ADVMODE_PERIOD_AVG, YWeighScale.ADVMODE_PERIOD_MIN and YWeighScale.ADVMODE_PERIOD_MAX corresponding to the measuring mode used for the advertised value pushed to the parent hub',ext:'On failure, throws an exception or returns YWeighScale.ADVMODE_INVALID.'} ,'get_advertisedValue':{syn:'Returns the current value of the weighing scale sensor (no more than 6 characters).',lib:'%.get_advertisedValue()',pro:'function get_advertisedValue()',cmt:'

Returns the current value of the weighing scale sensor (no more than 6 characters).

',ret:'a string corresponding to the current value of the weighing scale sensor (no more than 6 characters).',ext:'On failure, throws an exception or returns YWeighScale.ADVERTISEDVALUE_INVALID.'} ,'get_compTempAvg':{syn:'Returns the current averaged temperature, used for thermal compensation.',lib:'%.get_compTempAvg()',pro:'function get_compTempAvg()',cmt:'

Returns the current averaged temperature, used for thermal compensation.

',ret:'a floating point number corresponding to the current averaged temperature, used for thermal compensation',ext:'On failure, throws an exception or returns YWeighScale.COMPTEMPAVG_INVALID.'} ,'get_compTempChg':{syn:'Returns the current temperature variation, used for thermal compensation.',lib:'%.get_compTempChg()',pro:'function get_compTempChg()',cmt:'

Returns the current temperature variation, used for thermal compensation.

',ret:'a floating point number corresponding to the current temperature variation, used for thermal compensation',ext:'On failure, throws an exception or returns YWeighScale.COMPTEMPCHG_INVALID.'} ,'get_compensation':{syn:'Returns the current current thermal compensation value.',lib:'%.get_compensation()',pro:'function get_compensation()',cmt:'

Returns the current current thermal compensation value.

',ret:'a floating point number corresponding to the current current thermal compensation value',ext:'On failure, throws an exception or returns YWeighScale.COMPENSATION_INVALID.'} ,'get_currentRawValue':{syn:'Returns the uncalibrated, unrounded raw value returned by the sensor, in the specified unit, as a floating point number.',lib:'%.get_currentRawValue()',pro:'function get_currentRawValue()',cmt:'

Returns the uncalibrated, unrounded raw value returned by the sensor, in the specified unit, as a floating point number.

',ret:'a floating point number corresponding to the uncalibrated, unrounded raw value returned by the sensor, in the specified unit, as a floating point number',ext:'On failure, throws an exception or returns YWeighScale.CURRENTRAWVALUE_INVALID.'} ,'get_currentValue':{syn:'Returns the current value of the measure, in the specified unit, as a floating point number.',lib:'%.get_currentValue()',pro:'function get_currentValue()',cmt:'

Returns the current value of the measure, in the specified unit, as a floating point number. Note that a get_currentValue() call will *not* start a measure in the device, it will just return the last measure that occurred in the device. Indeed, internally, each Yoctopuce devices is continuously making measurements at a hardware specific frequency.

If continuously calling get_currentValue() leads you to performances issues, then you might consider to switch to callback programming model. Check the \x22advanced programming\x22 chapter in in your device user manual for more information.

',ret:'a floating point number corresponding to the current value of the measure, in the specified unit, as a floating point number',ext:'On failure, throws an exception or returns YWeighScale.CURRENTVALUE_INVALID.'} ,'get_dataLogger':ds.get_dataLogger ,'get_errorMessage':{syn:'Returns the error message of the latest error with the weighing scale sensor.',lib:'%.get_errorMessage()',pro:'function get_errorMessage()',cmt:'

Returns the error message of the latest error with the weighing scale 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 weighing scale sensor object'} ,'get_errorType':{syn:'Returns the numerical error code of the latest error with the weighing scale sensor.',lib:'%.get_errorType()',pro:'function get_errorType()',cmt:'

Returns the numerical error code of the latest error with the weighing scale 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 occurred while using the weighing scale sensor object'} ,'get_excitation':{syn:'Returns the current load cell bridge excitation method.',lib:'%.get_excitation()',pro:'function get_excitation()',cmt:'

Returns the current load cell bridge excitation method.

',ret:'a value among YWeighScale.EXCITATION_OFF, YWeighScale.EXCITATION_DC and YWeighScale.EXCITATION_AC corresponding to the current load cell bridge excitation method',ext:'On failure, throws an exception or returns YWeighScale.EXCITATION_INVALID.'} ,'get_friendlyName':{syn:'Returns a global identifier of the weighing scale sensor in the format MODULE_NAME.FUNCTION_NAME.',lib:'%.get_friendlyName()',pro:'function get_friendlyName()',cmt:'

Returns a global identifier of the weighing scale sensor in the format MODULE_NAME.FUNCTION_NAME. The returned string uses the logical names of the module and of the weighing scale sensor if they are defined, otherwise the serial number of the module and the hardware identifier of the weighing scale sensor (for example: MyCustomName.relay1)

',ret:'a string that uniquely identifies the weighing scale sensor using logical names (ex: MyCustomName.relay1)',ext:'On failure, throws an exception or returns YWeighScale.FRIENDLYNAME_INVALID.'} ,'get_functionDescriptor':ds.get_functionDescriptor ,'get_functionId':{syn:'Returns the hardware identifier of the weighing scale sensor, without reference to the module.',lib:'%.get_functionId()',pro:'function get_functionId()',cmt:'

Returns the hardware identifier of the weighing scale sensor, without reference to the module. For example relay1

',ret:'a string that identifies the weighing scale sensor (ex: relay1)',ext:'On failure, throws an exception or returns YWeighScale.FUNCTIONID_INVALID.'} ,'get_hardwareId':{syn:'Returns the unique hardware identifier of the weighing scale sensor in the form SERIAL.FUNCTIONID.',lib:'%.get_hardwareId()',pro:'function get_hardwareId()',cmt:'

Returns the unique hardware identifier of the weighing scale sensor in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the weighing scale sensor (for example RELAYLO1-123456.relay1).

',ret:'a string that uniquely identifies the weighing scale sensor (ex: RELAYLO1-123456.relay1)',ext:'On failure, throws an exception or returns YWeighScale.HARDWAREID_INVALID.'} ,'get_highestValue':{syn:'Returns the maximal value observed for the measure since the device was started.',lib:'%.get_highestValue()',pro:'function get_highestValue()',cmt:'

Returns the maximal value observed for the measure since the device was started. Can be reset to an arbitrary value thanks to set_highestValue().

',ret:'a floating point number corresponding to the maximal value observed for the measure since the device was started',ext:'On failure, throws an exception or returns YWeighScale.HIGHESTVALUE_INVALID.'} ,'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:'%.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 YWeighScale.LOGFREQUENCY_INVALID.'} ,'get_logicalName':{syn:'Returns the logical name of the weighing scale sensor.',lib:'%.get_logicalName()',pro:'function get_logicalName()',cmt:'

Returns the logical name of the weighing scale sensor.

',ret:'a string corresponding to the logical name of the weighing scale sensor.',ext:'On failure, throws an exception or returns YWeighScale.LOGICALNAME_INVALID.'} ,'get_lowestValue':{syn:'Returns the minimal value observed for the measure since the device was started.',lib:'%.get_lowestValue()',pro:'function get_lowestValue()',cmt:'

Returns the minimal value observed for the measure since the device was started. Can be reset to an arbitrary value thanks to set_lowestValue().

',ret:'a floating point number corresponding to the minimal value observed for the measure since the device was started',ext:'On failure, throws an exception or returns YWeighScale.LOWESTVALUE_INVALID.'} ,'get_module':ds.get_module ,'get_module_async':ds.get_module_async ,'get_recordedData':ds.get_recordedData ,'get_reportFrequency':{syn:'Returns the timed value notification frequency, or \x22OFF\x22 if timed value notifications are disabled for this function.',lib:'%.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 YWeighScale.REPORTFREQUENCY_INVALID.'} ,'get_resolution':{syn:'Returns the resolution of the measured values.',lib:'%.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. Remember to call the saveToFlash() method of the module if the modification must be kept.

',ret:'a floating point number corresponding to the resolution of the measured values',ext:'On failure, throws an exception or returns YWeighScale.RESOLUTION_INVALID.'} ,'get_sensorState':{syn:'Returns the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now.',lib:'%.get_sensorState()',pro:'function get_sensorState()',cmt:'

Returns the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now.

',ret:'an integer corresponding to the sensor state code, which is zero when there is an up-to-date measure available or a positive code if the sensor is not able to provide a measure right now',ext:'On failure, throws an exception or returns YWeighScale.SENSORSTATE_INVALID.'} ,'get_serialNumber':ds.get_serialNumber ,'get_tempAvgAdaptRatio':{syn:'Returns the averaged temperature update rate, in per mille.',lib:'%.get_tempAvgAdaptRatio()',pro:'function get_tempAvgAdaptRatio()',cmt:'

Returns the averaged temperature update rate, in per mille. The purpose of this adaptation ratio is to model the thermal inertia of the load cell. The averaged temperature is updated every 10 seconds, by applying this adaptation rate to the difference between the measures ambient temperature and the current compensation temperature. The standard rate is 0.2 per mille, and the maximal rate is 65 per mille.

',ret:'a floating point number corresponding to the averaged temperature update rate, in per mille',ext:'On failure, throws an exception or returns YWeighScale.TEMPAVGADAPTRATIO_INVALID.'} ,'get_tempChgAdaptRatio':{syn:'Returns the temperature change update rate, in per mille.',lib:'%.get_tempChgAdaptRatio()',pro:'function get_tempChgAdaptRatio()',cmt:'

Returns the temperature change update rate, in per mille. The temperature change is updated every 10 seconds, by applying this adaptation rate to the difference between the measures ambient temperature and the current temperature used for change compensation. The standard rate is 0.6 per mille, and the maximal rate is 65 per mille.

',ret:'a floating point number corresponding to the temperature change update rate, in per mille',ext:'On failure, throws an exception or returns YWeighScale.TEMPCHGADAPTRATIO_INVALID.'} ,'get_unit':{syn:'Returns the measuring unit for the measure.',lib:'%.get_unit()',pro:'function get_unit()',cmt:'

Returns the measuring unit for the measure.

',ret:'a string corresponding to the measuring unit for the measure',ext:'On failure, throws an exception or returns YWeighScale.UNIT_INVALID.'} ,'get_userData':dm.get_userData ,'get_zeroTracking':{syn:'Returns the zero tracking threshold value.',lib:'%.get_zeroTracking()',pro:'function get_zeroTracking()',cmt:'

Returns the zero tracking threshold value. When this threshold is larger than zero, any measure under the threshold will automatically be ignored and the zero compensation will be updated.

',ret:'a floating point number corresponding to the zero tracking threshold value',ext:'On failure, throws an exception or returns YWeighScale.ZEROTRACKING_INVALID.'} ,'isOnline':{syn:'Checks if the weighing scale sensor is currently reachable, without raising any error.',lib:'%.isOnline()',pro:'function isOnline()',cmt:'

Checks if the weighing scale sensor is currently reachable, without raising any error. If there is a cached value for the weighing scale 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 weighing scale sensor.

',ret:'true if the weighing scale sensor can be reached, and false otherwise'} ,'isOnline_async':{syn:'Checks if the weighing scale sensor is currently reachable, without raising any error (asynchronous version).',lib:'%.isOnline_async()',pro:'function isOnline_async(callback, context)',cmt:'

Checks if the weighing scale sensor is currently reachable, without raising any error (asynchronous version). If there is a cached value for the weighing scale 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.'} ,'load':{syn:'Preloads the weighing scale sensor cache with a specified validity duration.',lib:'%.load()',pro:'function load(msValidity)',cmt:'

Preloads the weighing scale 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 traffic 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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadAttribute':ds.loadAttribute ,'loadCalibrationPoints':ds.loadCalibrationPoints ,'loadOffsetAvgCompensationTable':{syn:'Retrieves the weight offset thermal compensation table previously configured using the set_offsetAvgCompensationTable function.',lib:'%.loadOffsetAvgCompensationTable()',pro:'function loadOffsetAvgCompensationTable(tempValues, compValues)',cmt:'

Retrieves the weight offset thermal compensation table previously configured using the set_offsetAvgCompensationTable function. The weight correction is applied by linear interpolation between specified points.

',par:{tempValues:'array of floating point numbers, that is filled by the function with all averaged temperatures for which an offset correction is specified.',compValues:'array of floating point numbers, that is filled by the function with the offset correction applied for each of the temperature included in the first argument, index by index.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadOffsetChgCompensationTable':{syn:'Retrieves the weight offset thermal compensation table previously configured using the set_offsetChgCompensationTable function.',lib:'%.loadOffsetChgCompensationTable()',pro:'function loadOffsetChgCompensationTable(tempValues, compValues)',cmt:'

Retrieves the weight offset thermal compensation table previously configured using the set_offsetChgCompensationTable function. The weight correction is applied by linear interpolation between specified points.

',par:{tempValues:'array of floating point numbers, that is filled by the function with all temperature variations for which an offset correction is specified.',compValues:'array of floating point numbers, that is filled by the function with the offset correction applied for each of the temperature variation included in the first argument, index by index.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadSpanAvgCompensationTable':{syn:'Retrieves the weight span thermal compensation table previously configured using the set_spanAvgCompensationTable function.',lib:'%.loadSpanAvgCompensationTable()',pro:'function loadSpanAvgCompensationTable(tempValues, compValues)',cmt:'

Retrieves the weight span thermal compensation table previously configured using the set_spanAvgCompensationTable function. The weight correction is applied by linear interpolation between specified points.

',par:{tempValues:'array of floating point numbers, that is filled by the function with all averaged temperatures for which an span correction is specified.',compValues:'array of floating point numbers, that is filled by the function with the span correction applied for each of the temperature included in the first argument, index by index.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadSpanChgCompensationTable':{syn:'Retrieves the weight span thermal compensation table previously configured using the set_spanChgCompensationTable function.',lib:'%.loadSpanChgCompensationTable()',pro:'function loadSpanChgCompensationTable(tempValues, compValues)',cmt:'

Retrieves the weight span thermal compensation table previously configured using the set_spanChgCompensationTable function. The weight correction is applied by linear interpolation between specified points.

',par:{tempValues:'array of floating point numbers, that is filled by the function with all variation of temperature for which an span correction is specified.',compValues:'array of floating point numbers, that is filled by the function with the span correction applied for each of variation of temperature included in the first argument, index by index.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'load_async':{syn:'Preloads the weighing scale sensor cache with a specified validity duration (asynchronous version).',lib:'%.load_async()',pro:'function load_async(msValidity, callback, context)',cmt:'

Preloads the weighing scale 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 traffic 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.'} ,'muteValueCallbacks':ds.muteValueCallbacks ,'nextWeighScale':{syn:'Continues the enumeration of weighing scale sensors started using yFirstWeighScale().',lib:'%.nextWeighScale()',pro:'function nextWeighScale()',cmt:'

Continues the enumeration of weighing scale sensors started using yFirstWeighScale(). Caution: You can\x27t make any assumption about the returned weighing scale sensors order. If you want to find a specific a weighing scale sensor, use WeighScale.findWeighScale() and a hardwareID or a logical name.

',ret:'a pointer to a YWeighScale object, corresponding to a weighing scale sensor currently online, or a null pointer if there are no more weighing scale sensors to enumerate.'} ,'registerTimedReportCallback':ds.registerTimedReportCallback ,'registerValueCallback':ds.registerValueCallback ,'set_advMode':{syn:'Changes the measuring mode used for the advertised value pushed to the parent hub.',lib:'%.set_advMode()',pro:'function set_advMode(newval)',cmt:'

Changes the measuring mode used for the advertised value pushed to the parent hub. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'a value among YWeighScale.ADVMODE_IMMEDIATE, YWeighScale.ADVMODE_PERIOD_AVG, YWeighScale.ADVMODE_PERIOD_MIN and YWeighScale.ADVMODE_PERIOD_MAX corresponding to the measuring mode used for the advertised value pushed to the parent hub'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_excitation':{syn:'Changes the current load cell bridge excitation method.',lib:'%.set_excitation()',pro:'function set_excitation(newval)',cmt:'

Changes the current load cell bridge excitation method. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'a value among YWeighScale.EXCITATION_OFF, YWeighScale.EXCITATION_DC and YWeighScale.EXCITATION_AC corresponding to the current load cell bridge excitation method'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_highestValue':ds.set_highestValue ,'set_logFrequency':ds.set_logFrequency ,'set_logicalName':{syn:'Changes the logical name of the weighing scale sensor.',lib:'%.set_logicalName()',pro:'function set_logicalName(newval)',cmt:'

Changes the logical name of the weighing scale 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 weighing scale sensor.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_lowestValue':ds.set_lowestValue ,'set_offsetAvgCompensationTable':{syn:'Records a weight offset thermal compensation table, in order to automatically correct the measured weight based on the averaged compensation temperature.',lib:'%.set_offsetAvgCompensationTable()',pro:'function set_offsetAvgCompensationTable(tempValues, compValues)',cmt:'

Records a weight offset thermal compensation table, in order to automatically correct the measured weight based on the averaged compensation temperature. The weight correction will be applied by linear interpolation between specified points.

',par:{tempValues:'array of floating point numbers, corresponding to all averaged temperatures for which an offset correction is specified.',compValues:'array of floating point numbers, corresponding to the offset correction to apply for each of the temperature included in the first argument, index by index.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_offsetChgCompensationTable':{syn:'Records a weight offset thermal compensation table, in order to automatically correct the measured weight based on the variation of temperature.',lib:'%.set_offsetChgCompensationTable()',pro:'function set_offsetChgCompensationTable(tempValues, compValues)',cmt:'

Records a weight offset thermal compensation table, in order to automatically correct the measured weight based on the variation of temperature. The weight correction will be applied by linear interpolation between specified points.

',par:{tempValues:'array of floating point numbers, corresponding to temperature variations for which an offset correction is specified.',compValues:'array of floating point numbers, corresponding to the offset correction to apply for each of the temperature variation included in the first argument, index by index.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_reportFrequency':ds.set_reportFrequency ,'set_resolution':ds.set_resolution ,'set_spanAvgCompensationTable':{syn:'Records a weight span thermal compensation table, in order to automatically correct the measured weight based on the compensation temperature.',lib:'%.set_spanAvgCompensationTable()',pro:'function set_spanAvgCompensationTable(tempValues, compValues)',cmt:'

Records a weight span thermal compensation table, in order to automatically correct the measured weight based on the compensation temperature. The weight correction will be applied by linear interpolation between specified points.

',par:{tempValues:'array of floating point numbers, corresponding to all averaged temperatures for which a span correction is specified.',compValues:'array of floating point numbers, corresponding to the span correction (in percents) to apply for each of the temperature included in the first argument, index by index.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_spanChgCompensationTable':{syn:'Records a weight span thermal compensation table, in order to automatically correct the measured weight based on the variation of temperature.',lib:'%.set_spanChgCompensationTable()',pro:'function set_spanChgCompensationTable(tempValues, compValues)',cmt:'

Records a weight span thermal compensation table, in order to automatically correct the measured weight based on the variation of temperature. The weight correction will be applied by linear interpolation between specified points.

',par:{tempValues:'array of floating point numbers, corresponding to all variations of temperatures for which a span correction is specified.',compValues:'array of floating point numbers, corresponding to the span correction (in percents) to apply for each of the temperature variation included in the first argument, index by index.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_tempAvgAdaptRatio':{syn:'Changes the averaged temperature update rate, in per mille.',lib:'%.set_tempAvgAdaptRatio()',pro:'function set_tempAvgAdaptRatio(newval)',cmt:'

Changes the averaged temperature update rate, in per mille. The purpose of this adaptation ratio is to model the thermal inertia of the load cell. The averaged temperature is updated every 10 seconds, by applying this adaptation rate to the difference between the measures ambient temperature and the current compensation temperature. The standard rate is 0.2 per mille, and the maximal rate is 65 per mille. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'a floating point number corresponding to the averaged temperature update rate, in per mille'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_tempChgAdaptRatio':{syn:'Changes the temperature change update rate, in per mille.',lib:'%.set_tempChgAdaptRatio()',pro:'function set_tempChgAdaptRatio(newval)',cmt:'

Changes the temperature change update rate, in per mille. The temperature change is updated every 10 seconds, by applying this adaptation rate to the difference between the measures ambient temperature and the current temperature used for change compensation. The standard rate is 0.6 per mille, and the maximal rate is 65 per mille. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'a floating point number corresponding to the temperature change update rate, in per mille'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_unit':{syn:'Changes the measuring unit for the weight.',lib:'%.set_unit()',pro:'function set_unit(newval)',cmt:'

Changes the measuring unit for the weight. 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 weight'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_userData':dm.set_userData ,'set_zeroTracking':{syn:'Changes the zero tracking threshold value.',lib:'%.set_zeroTracking()',pro:'function set_zeroTracking(newval)',cmt:'

Changes the zero tracking threshold value. When this threshold is larger than zero, any measure under the threshold will automatically be ignored and the zero compensation will be updated. Remember to call the saveToFlash() method of the module if the modification must be kept.

',par:{newval:'a floating point number corresponding to the zero tracking threshold value'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'setupSpan':{syn:'Configures the load cell span parameters (stored in the corresponding genericSensor) so that the current signal corresponds to the specified reference weight.',lib:'%.setupSpan()',pro:'function setupSpan(currWeight, maxWeight)',cmt:'

Configures the load cell span parameters (stored in the corresponding genericSensor) so that the current signal corresponds to the specified reference weight.

',par:{currWeight:'reference weight presently on the load cell.',maxWeight:'maximum weight to be expected on the load cell.'},ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'startDataLogger':ds.startDataLogger ,'stopDataLogger':ds.stopDataLogger ,'tare':{syn:'Adapts the load cell signal bias (stored in the corresponding genericSensor) so that the current signal corresponds to a zero weight.',lib:'%.tare()',pro:'function tare()',cmt:'

Adapts the load cell signal bias (stored in the corresponding genericSensor) so that the current signal corresponds to a zero weight. Remember to call the saveToFlash() method of the module if the modification must be kept.

',ret:'YAPI.SUCCESS if the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'unmuteValueCallbacks':ds.unmuteValueCallbacks ,'wait_async':dm.wait_async }; //--- (end of generated code: WeighScale) //--- (generated code: Wireless) doc['Wireless']={'':{syn:'Wireless LAN interface control interface, available for instance in the YoctoHub-Wireless, the YoctoHub-Wireless-SR, the YoctoHub-Wireless-g or the YoctoHub-Wireless-n',inc:'<script type='text/javascript' src='yocto_wireless.js'></script>',cmt:'

The YWireless class provides control over wireless network parameters and status for devices that are wireless-enabled. Note that TCP/IP parameters are configured separately, using class YNetwork.

'} ,'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:

This function does not require that the wireless LAN interface is online at the time it is invoked. The returned object is nevertheless valid. Use the method YWireless.isOnline() to test if the wireless LAN interface is indeed online at a given time. In case of ambiguity when looking for a wireless LAN interface by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object\x27s is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

',par:{func:'a string that uniquely characterizes the wireless LAN interface, for instance YHUBWLN1.wireless.'},ret:'a YWireless object allowing you to drive the wireless LAN interface.'} ,'FirstWireless':{syn:'Starts the enumeration of wireless LAN interfaces currently accessible.',lib:'YWireless.FirstWireless()',pro:'function FirstWireless()',cmt:'

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.'} ,'adhocNetwork':{syn:'Changes the configuration of the wireless lan interface to create an ad-hoc wireless network, without using an access point.',lib:'%.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. On the YoctoHub-Wireless-g and YoctoHub-Wireless-n, you should use softAPNetwork() instead, which emulates an access point (Soft AP) which is more efficient and more widely supported than ad-hoc networks.

When a security key is specified for an ad-hoc network, the network is protected by a WEP40 key (5 characters or 10 hexadecimal digits) or WEP128 key (13 characters or 26 hexadecimal digits). It is recommended to use a well-randomized WEP128 key using 26 hexadecimal digits to maximize security. 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 when the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'clearCache':{syn:'Invalidates the cache.',lib:'%.clearCache()',pro:'function clearCache()',cmt:'

Invalidates the cache. Invalidates the cache of the wireless LAN interface attributes. Forces the next call to get_xxx() or loadxxx() to use values that come from the device.

'} ,'describe':{syn:'Returns a short text that describes unambiguously the instance of the wireless LAN interface in the form TYPE(NAME)=SERIAL.FUNCTIONID.',lib:'%.describe()',pro:'function describe()',cmt:'

Returns a short text that describes unambiguously the instance of 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)'} ,'get_advertisedValue':{syn:'Returns the current value of the wireless LAN interface (no more than 6 characters).',lib:'%.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).',ext:'On failure, throws an exception or returns YWireless.ADVERTISEDVALUE_INVALID.'} ,'get_channel':{syn:'Returns the 802.11 channel currently used, or 0 when the selected network has not been found.',lib:'%.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 YWireless.CHANNEL_INVALID.'} ,'get_detectedWlans':{syn:'Returns a list of YWlanRecord objects that describe detected Wireless networks.',lib:'%.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 access point (infrastructure mode). To force an update of this list, startWlanScan() must be called. Note that an languages without garbage collections, the returned list must be freed 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.'} ,'get_errorMessage':{syn:'Returns the error message of the latest error with the wireless LAN interface.',lib:'%.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'} ,'get_errorType':{syn:'Returns the numerical error code of the latest error with the wireless LAN interface.',lib:'%.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 occurred while using the wireless LAN interface object'} ,'get_friendlyName':{syn:'Returns a global identifier of the wireless LAN interface in the format MODULE_NAME.FUNCTION_NAME.',lib:'%.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 example: MyCustomName.relay1)

',ret:'a string that uniquely identifies the wireless LAN interface using logical names (ex: MyCustomName.relay1)',ext:'On failure, throws an exception or returns YWireless.FRIENDLYNAME_INVALID.'} ,'get_functionDescriptor':ds.get_functionDescriptor ,'get_functionId':{syn:'Returns the hardware identifier of the wireless LAN interface, without reference to the module.',lib:'%.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)',ext:'On failure, throws an exception or returns YWireless.FUNCTIONID_INVALID.'} ,'get_hardwareId':{syn:'Returns the unique hardware identifier of the wireless LAN interface in the form SERIAL.FUNCTIONID.',lib:'%.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)',ext:'On failure, throws an exception or returns YWireless.HARDWAREID_INVALID.'} ,'get_linkQuality':{syn:'Returns the link quality, expressed in percent.',lib:'%.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 YWireless.LINKQUALITY_INVALID.'} ,'get_logicalName':{syn:'Returns the logical name of the wireless LAN interface.',lib:'%.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.',ext:'On failure, throws an exception or returns YWireless.LOGICALNAME_INVALID.'} ,'get_message':{syn:'Returns the latest status message from the wireless interface.',lib:'%.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 YWireless.MESSAGE_INVALID.'} ,'get_module':ds.get_module ,'get_module_async':ds.get_module_async ,'get_security':{syn:'Returns the security algorithm used by the selected wireless network.',lib:'%.get_security()',pro:'function get_security()',cmt:'

Returns the security algorithm used by the selected wireless network.

',ret:'a value among YWireless.SECURITY_UNKNOWN, YWireless.SECURITY_OPEN, YWireless.SECURITY_WEP, YWireless.SECURITY_WPA and YWireless.SECURITY_WPA2 corresponding to the security algorithm used by the selected wireless network',ext:'On failure, throws an exception or returns YWireless.SECURITY_INVALID.'} ,'get_serialNumber':ds.get_serialNumber ,'get_ssid':{syn:'Returns the wireless network name (SSID).',lib:'%.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 YWireless.SSID_INVALID.'} ,'get_userData':dm.get_userData ,'get_wlanState':{syn:'Returns the current state of the wireless interface.',lib:'%.get_wlanState()',pro:'function get_wlanState()',cmt:'

Returns the current state of the wireless interface. The state YWireless.WLANSTATE_DOWN means that the network interface is not connected to a network. The state YWireless.WLANSTATE_SCANNING means that the network interface is scanning available frequencies. During this stage, the device is not reachable, and the network settings are not yet applied. The state YWireless.WLANSTATE_CONNECTED means that the network settings have been successfully applied ant that the device is reachable from the wireless network. If the device is configured to use ad-hoc or Soft AP mode, it means that the wireless network is up and that other devices can join the network. The state YWireless.WLANSTATE_REJECTED means that the network interface has not been able to join the requested network. The description of the error can be obtain with the get_message() method.

',ret:'a value among YWireless.WLANSTATE_DOWN, YWireless.WLANSTATE_SCANNING, YWireless.WLANSTATE_CONNECTED and YWireless.WLANSTATE_REJECTED corresponding to the current state of the wireless interface',ext:'On failure, throws an exception or returns YWireless.WLANSTATE_INVALID.'} ,'isOnline':{syn:'Checks if the wireless LAN interface is currently reachable, without raising any error.',lib:'%.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'} ,'isOnline_async':{syn:'Checks if the wireless LAN interface is currently reachable, without raising any error (asynchronous version).',lib:'%.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.'} ,'joinNetwork':{syn:'Changes the configuration of the wireless lan interface to connect to an existing access point (infrastructure mode).',lib:'%.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 when the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'load':{syn:'Preloads the wireless LAN interface cache with a specified validity duration.',lib:'%.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 traffic 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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'loadAttribute':ds.loadAttribute ,'load_async':{syn:'Preloads the wireless LAN interface cache with a specified validity duration (asynchronous version).',lib:'%.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 traffic 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.'} ,'muteValueCallbacks':ds.muteValueCallbacks ,'nextWireless':{syn:'Continues the enumeration of wireless LAN interfaces started using yFirstWireless().',lib:'%.nextWireless()',pro:'function nextWireless()',cmt:'

Continues the enumeration of wireless LAN interfaces started using yFirstWireless(). Caution: You can\x27t make any assumption about the returned wireless LAN interfaces order. If you want to find a specific a wireless LAN interface, use Wireless.findWireless() and a hardwareID or a logical name.

',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.'} ,'registerValueCallback':ds.registerValueCallback ,'set_logicalName':{syn:'Changes the logical name of the wireless LAN interface.',lib:'%.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.',ext:'On failure, throws an exception or returns a negative error code.'} ,'set_userData':dm.set_userData ,'softAPNetwork':{syn:'Changes the configuration of the wireless lan interface to create a new wireless network by emulating a WiFi access point (Soft AP).',lib:'%.softAPNetwork()',pro:'function softAPNetwork(ssid, securityKey)',cmt:'

Changes the configuration of the wireless lan interface to create a new wireless network by emulating a WiFi access point (Soft AP). This function can only be used with the YoctoHub-Wireless-g and the YoctoHub-Wireless-n.

On the YoctoHub-Wireless-g, when a security key is specified for a SoftAP network, the network is protected by a WEP40 key (5 characters or 10 hexadecimal digits) or WEP128 key (13 characters or 26 hexadecimal digits). It is recommended to use a well-randomized WEP128 key using 26 hexadecimal digits to maximize security.

On the YoctoHub-Wireless-n, when a security key is specified for a SoftAP network, the network will be protected by WPA2.

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 when the call succeeds.',ext:'On failure, throws an exception or returns a negative error code.'} ,'startWlanScan':{syn:'Triggers a scan of the wireless frequency and builds the list of available networks.',lib:'%.startWlanScan()',pro:'function startWlanScan()',cmt:'

Triggers a scan of the wireless frequency and builds the list of available networks. The scan forces a disconnection from the current network. At then end of the process, the the network interface attempts to reconnect to the previous network. During the scan, the wlanState switches to YWireless.WLANSTATE_DOWN, then to YWireless.WLANSTATE_SCANNING. When the scan is completed, get_wlanState() returns either YWireless.WLANSTATE_DOWN or YWireless.WLANSTATE_SCANNING. At this point, the list of detected network can be retrieved with the get_detectedWlans() method.

On failure, throws an exception or returns a negative error code.

'} ,'unmuteValueCallbacks':ds.unmuteValueCallbacks ,'wait_async':dm.wait_async }; //--- (end of generated code: Wireless) //--- (generated code: WlanRecord) doc['WlanRecord']={'':{syn:'Wireless network description, returned by wireless.get_detectedWlans method',inc:'<script type='text/javascript' src='yocto_wireless.js'></script>',cmt:'

YWlanRecord objects are used to describe a wireless network. These objects are used in particular in conjunction with the YWireless class.

'} ,'get_channel':{syn:'Returns the 802.11 b/g/n channel number used by this network.',lib:'%.get_channel()',pro:'function get_channel()',cmt:'

Returns the 802.11 b/g/n channel number used by this network.

',ret:'an integer corresponding to the channel.'} ,'get_linkQuality':{syn:'Returns the quality of the wireless network link, in per cents.',lib:'%.get_linkQuality()',pro:'function get_linkQuality()',cmt:'

Returns the quality of the wireless network link, in per cents.

',ret:'an integer between 0 and 100 corresponding to the signal quality.'} ,'get_security':{syn:'Returns the security algorithm used by the wireless network.',lib:'%.get_security()',pro:'function get_security()',cmt:'

Returns the security algorithm used by the wireless network. If the network implements to security, the value is \x22OPEN\x22.

',ret:'a string with the security algorithm.'} ,'get_ssid':{syn:'Returns the name of the wireless network (SSID).',lib:'%.get_ssid()',pro:'function get_ssid()',cmt:'

Returns the name of the wireless network (SSID).

',ret:'a string with the name of the wireless network (SSID).'} }; //--- (end of generated code: WlanRecord) //--- (generated code: YAPI) doc['YAPI']={'':{syn:'General functions',inc:'<script type='text/javascript' src='yocto_api.js'></script>',cmt:'

These general functions should be used to initialize and configure the Yoctopuce library. In most cases, a simple call to function yRegisterHub() should be enough. The module-specific functions yFind...() or yFirst...() should then be used to retrieve an object that provides interaction with the module.

'} ,'CheckLogicalName':{syn:'Checks if a given string is valid as logical name for a module or a function.',lib:'YAPI.CheckLogicalName()',pro:'function CheckLogicalName(name)',cmt:'

Checks if a given string is valid as logical name for a module or a function. A valid logical name has a maximum of 19 characters, all among A..Z, a..z, 0..9, _, and -. If you try to configure a logical name with an incorrect string, the invalid characters are ignored.

',par:{name:'a string containing the name to check.'},ret:'true if the name is valid, false otherwise.'} ,'DisableExceptions':{syn:'Disables the use of exceptions to report runtime errors.',lib:'YAPI.DisableExceptions()',pro:'function DisableExceptions()',cmt:'

Disables the use of exceptions to report runtime errors. When exceptions are disabled, every function returns a specific error value which depends on its type and which is documented in this reference manual.

'} ,'EnableExceptions':{syn:'Re-enables the use of exceptions for runtime error handling.',lib:'YAPI.EnableExceptions()',pro:'function EnableExceptions()',cmt:'

Re-enables the use of exceptions for runtime error handling. Be aware than when exceptions are enabled, every function that fails triggers an exception. If the exception is not caught by the user code, it either fires the debugger or aborts (i.e. crash) the program.

'} ,'FreeAPI':{syn:'Waits for all pending communications with Yoctopuce devices to be completed then frees dynamically allocated resources used by the Yoctopuce library.',lib:'YAPI.FreeAPI()',pro:'function FreeAPI()',cmt:'

Waits for all pending communications with Yoctopuce devices to be completed then frees dynamically allocated resources used by the Yoctopuce library.

From an operating system standpoint, it is generally not required to call this function since the OS will automatically free allocated resources once your program is completed. However there are two situations when you may really want to use that function:

- Free all dynamically allocated memory blocks in order to track a memory leak.

- Send commands to devices right before the end of the program. Since commands are sent in an asynchronous way the program could exit before all commands are effectively sent.

You should not call any other library function after calling yFreeAPI(), or your program will crash.

'} ,'GetAPIVersion':{syn:'Returns the version identifier for the Yoctopuce library in use.',lib:'YAPI.GetAPIVersion()',pro:'function GetAPIVersion()',cmt:'

Returns the version identifier for the Yoctopuce library in use. The version is a string in the form \x22Major.Minor.Build\x22, for instance \x221.01.5535\x22. For languages using an external DLL (for instance C#, VisualBasic or Delphi), the character string includes as well the DLL version, for instance \x221.01.5535 (1.01.5439)\x22.

If you want to verify in your code that the library version is compatible with the version that you have used during development, verify that the major number is strictly equal and that the minor number is greater or equal. The build number is not relevant with respect to the library compatibility.

',ret:'a character string describing the library version.'} ,'GetTickCount':{syn:'Returns the current value of a monotone millisecond-based time counter.',lib:'YAPI.GetTickCount()',pro:'function GetTickCount()',cmt:'

Returns the current value of a monotone millisecond-based time counter. This counter can be used to compute delays in relation with Yoctopuce devices, which also uses the millisecond as timebase.

',ret:'a long integer corresponding to the millisecond counter.'} ,'HandleEvents':{syn:'Maintains the device-to-library communication channel.',lib:'YAPI.HandleEvents()',pro:'function HandleEvents(errmsg)',cmt:'

Maintains the device-to-library communication channel. If your program includes significant loops, you may want to include a call to this function to make sure that the library takes care of the information pushed by the modules on the communication channels. This is not strictly necessary, but it may improve the reactivity of the library for the following commands.

This function may signal an error in case there is a communication problem while contacting a module.

',par:{errmsg:'a string passed by reference to receive any error message.'},ret:'YAPI.SUCCESS when the call succeeds.',ext:'On failure returns a negative error code.'} ,'InitAPI':{syn:'Initializes the Yoctopuce programming library explicitly.',lib:'YAPI.InitAPI()',pro:'function InitAPI(mode, errmsg)',cmt:'

Initializes the Yoctopuce programming library explicitly. It is not strictly needed to call yInitAPI(), as the library is automatically initialized when calling yRegisterHub() for the first time.

When YAPI.DETECT_NONE is used as detection mode, you must explicitly use yRegisterHub() to point the API to the VirtualHub on which your devices are connected before trying to access them.

',par:{mode:'an integer corresponding to the type of automatic device detection to use. Possible values are YAPI.DETECT_NONE, YAPI.DETECT_USB, YAPI.DETECT_NET, and YAPI.DETECT_ALL.',errmsg:'a string passed by reference to receive any error message.'},ret:'YAPI.SUCCESS when the call succeeds.',ext:'On failure returns a negative error code.'} ,'PreregisterHub':{syn:'Fault-tolerant alternative to yRegisterHub().',lib:'YAPI.PreregisterHub()',pro:'function PreregisterHub(url, errmsg)',cmt:'

Fault-tolerant alternative to yRegisterHub(). This function has the same purpose and same arguments as yRegisterHub(), but does not trigger an error when the selected hub is not available at the time of the function call. If the connexion cannot be established immediately, a background task will automatically perform periodic retries. This makes it possible to register a network hub independently of the current connectivity, and to try to contact it only when a device is actively needed.

',par:{url:'a string containing either \x22usb\x22,\x22callback\x22 or the root URL of the hub to monitor',errmsg:'a string passed by reference to receive any error message.'},ret:'YAPI.SUCCESS when the call succeeds.',ext:'On failure returns a negative error code.'} ,'RegisterDeviceArrivalCallback':{syn:'Register a callback function, to be called each time a device is plugged.',lib:'YAPI.RegisterDeviceArrivalCallback()',pro:'function RegisterDeviceArrivalCallback(arrivalCallback)',cmt:'

Register a callback function, to be called each time a device is plugged. This callback will be invoked while yUpdateDeviceList is running. You will have to call this function on a regular basis.

',par:{arrivalCallback:'a procedure taking a YModule parameter, or null to unregister a previously registered callback.'}} ,'RegisterDeviceRemovalCallback':{syn:'Register a callback function, to be called each time a device is unplugged.',lib:'YAPI.RegisterDeviceRemovalCallback()',pro:'function RegisterDeviceRemovalCallback(removalCallback)',cmt:'

Register a callback function, to be called each time a device is unplugged. This callback will be invoked while yUpdateDeviceList is running. You will have to call this function on a regular basis.

',par:{removalCallback:'a procedure taking a YModule parameter, or null to unregister a previously registered callback.'}} ,'RegisterHub':{syn:'Setup the Yoctopuce library to use modules connected on a given machine.',lib:'YAPI.RegisterHub()',pro:'function RegisterHub(url, errmsg)',cmt:'

Setup the Yoctopuce library to use modules connected on a given machine. Idealy this call will be made once at the begining of your application. The parameter will determine how the API will work. Use the following values:

usb: When the usb keyword is used, the API will work with devices connected directly to the USB bus. Some programming languages such a JavaScript, PHP, and Java don\x27t provide direct access to USB hardware, so usb will not work with these. In this case, use a VirtualHub or a networked YoctoHub (see below).

x.x.x.x or hostname: The API will use the devices connected to the host with the given IP address or hostname. That host can be a regular computer running a native VirtualHub, a VirtualHub for web hosted on a server, or a networked YoctoHub such as YoctoHub-Ethernet or YoctoHub-Wireless. If you want to use the VirtualHub running on you local computer, use the IP address 127.0.0.1. If the given IP is unresponsive, yRegisterHub will not return until a time-out defined by ySetNetworkTimeout has elapsed. However, it is possible to preventively test a connection with yTestHub. If you cannot afford a network time-out, you can use the non blocking yPregisterHub function that will establish the connection as soon as it is available.

callback: that keyword make the API run in \x22HTTP Callback\x22 mode. This a special mode allowing to take control of Yoctopuce devices through a NAT filter when using a VirtualHub or a networked YoctoHub. You only need to configure your hub to call your server script on a regular basis. This mode is currently available for PHP and Node.JS only.

Be aware that only one application can use direct USB access at a given time on a machine. Multiple access would cause conflicts while trying to access the USB modules. In particular, this means that you must stop the VirtualHub software before starting an application that uses direct USB access. The workaround for this limitation is to setup the library to use the VirtualHub rather than direct USB access.

If access control has been activated on the hub, virtual or not, you want to reach, the URL parameter should look like:

http://username:password@address:port

You can call RegisterHub several times to connect to several machines. On the other hand, it is useless and even counterproductive to call RegisterHub with to same address multiple times during the life of the application.\x09\x09

',par:{url:'a string containing either \x22usb\x22,\x22callback\x22 or the root URL of the hub to monitor',errmsg:'a string passed by reference to receive any error message.'},ret:'YAPI.SUCCESS when the call succeeds.',ext:'On failure returns a negative error code.'} ,'SetTimeout':{syn:'Invoke the specified callback function after a given timeout.',lib:'YAPI.SetTimeout()',pro:'function SetTimeout(callback, ms_timeout, args)',cmt:'

Invoke the specified callback function after a given timeout. This function behaves more or less like Javascript setTimeout, but during the waiting time, it will call yHandleEvents and yUpdateDeviceList periodically, in order to keep the API up-to-date with current devices.

',par:{callback:'the function to call after the timeout occurs. On Microsoft Internet Explorer, the callback must be provided as a string to be evaluated.',ms_timeout:'an integer corresponding to the duration of the timeout, in milliseconds.',args:'additional arguments to be passed to the callback function can be provided, if needed (not supported on Microsoft Internet Explorer).'},ret:'YAPI.SUCCESS'} ,'Sleep':{syn:'Pauses the execution flow for a specified duration.',lib:'YAPI.Sleep()',pro:'function Sleep(ms_duration, errmsg)',cmt:'

Pauses the execution flow for a specified duration. This function implements a passive waiting loop, meaning that it does not consume CPU cycles significantly. The processor is left available for other threads and processes. During the pause, the library nevertheless reads from time to time information from the Yoctopuce modules by calling yHandleEvents(), in order to stay up-to-date.

This function may signal an error in case there is a communication problem while contacting a module.

',par:{ms_duration:'an integer corresponding to the duration of the pause, in milliseconds.',errmsg:'a string passed by reference to receive any error message.'},ret:'YAPI.SUCCESS when the call succeeds.',ext:'On failure returns a negative error code.'} ,'UnregisterHub':{syn:'Setup the Yoctopuce library to no more use modules connected on a previously registered machine with RegisterHub.',lib:'YAPI.UnregisterHub()',pro:'function UnregisterHub(url)',cmt:'

Setup the Yoctopuce library to no more use modules connected on a previously registered machine with RegisterHub.

',par:{url:'a string containing either \x22usb\x22 or the root URL of the hub to monitor'}} ,'UpdateDeviceList':{syn:'Triggers a (re)detection of connected Yoctopuce modules.',lib:'YAPI.UpdateDeviceList()',pro:'function UpdateDeviceList(errmsg)',cmt:'

Triggers a (re)detection of connected Yoctopuce modules. The library searches the machines or USB ports previously registered using yRegisterHub(), and invokes any user-defined callback function in case a change in the list of connected devices is detected.

This function can be called as frequently as desired to refresh the device list and to make the application aware of hot-plug events. However, since device detection is quite a heavy process, UpdateDeviceList shouldn\x27t be called more than once every two seconds.

',par:{errmsg:'a string passed by reference to receive any error message.'},ret:'YAPI.SUCCESS when the call succeeds.',ext:'On failure returns a negative error code.'} ,'UpdateDeviceList_async':{syn:'Triggers a (re)detection of connected Yoctopuce modules.',lib:'YAPI.UpdateDeviceList_async()',pro:'function UpdateDeviceList_async(callback, context)',cmt:'

Triggers a (re)detection of connected Yoctopuce modules. The library searches the machines or USB ports previously registered using yRegisterHub(), and invokes any user-defined callback function in case a change in the list of connected devices is detected.

This function can be called as frequently as desired to refresh the device list and to make the application aware of hot-plug events.

This asynchronous version exists only in JavaScript. It uses a callback instead of a return value in order to avoid blocking 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 result code (YAPI.SUCCESS if the operation completes successfully) and the error message.',context:'caller-specific object that is passed as-is to the callback function'},ret:'nothing : the result is provided to the callback.'} }; //--- (end of generated code: YAPI) //--- (end of generated code) function isProperty(clname,m){return doc[clname][m].lib.indexOf('(')==-1&&Language!='Objective-C';} function isClassMethod(clname,m){return(clname=='YAPI'&&doc[clname][m].pro?doc[clname][m].pro.indexOf('static')>=0:/^[A-Z].*/.test(m));} function MethodType(clname,m){return(isProperty(clname,m)?'property':isClassMethod(clname,m)?'static':'method');} for(clname in doc){for(funcname in doc[clname]){if(isClassMethod(clname,funcname)){sub['y'+funcname]=doc[clname][funcname].lib;}}} function ApplySub(text,clname,attrname){var pos,endpos=0,key,rep,prefix,skip,cname;if(!text)return'';if(sub['null']!='null')text=text.replace('null',''+sub['null']+'');prefix=(clname.substr(0,1)!='Y'?'Y'+clname:clname);skip=2;if(Language.substr(-5)=='Proxy'){if(/^[gs]et_.*/.test(attrname))attrname=attrname.substr(4);prefix=clname.toLowerCase()+'._';if(attrname!='mountPosition'&&attrname!='drawText'){skip+=attrname.length;prefix+=attrname.substr(0,1).toUpperCase()+attrname.substr(1);}}else if(sub['YAPI_SUCCESS']){prefix=sub['YAPI_SUCCESS'].replace('YAPI',prefix).replace('SUCCESS','');}else{prefix+='.';} while((pos=text.toLowerCase().indexOf('',endpos))>=endpos){pos+=4;endpos=text.indexOf('0&&text.substr(pos-7,2)!='VI'&&text.substr(endpos+6,2)!='VI'){cname+='Proxy';} rep=''+cname+'';}}else if((key=inside.match(/^y([A-Z][A-Za-z0-9]+).*/))!==null){ident=key[1];key=key[0].substr(1);if(key.match(/(First|Find)[A-Za-z0-9]+.*/)){if(!UseShortcuts)rep=inside.substr(1);}else{if(!UseShortcuts){rep=sub['YAPI_SUCCESS'].replace('SUCCESS',inside.substr(1));if(doc['YAPI'][ident]){rep=''+rep+'';}}else{if(doc['YAPI'][ident]){rep=''+inside+'';}}}}else if((key=inside.match(/^([A-Za-z][A-Za-z0-9]+)(\.|::)([A-Za-z_0-9]+).*/))!==null){cident=key[1].substr(0,1).toUpperCase()+key[1].substr(1);mident=key[3];if(cident.substr(0,4)!='YAPI'&&cident[0]=='Y')cident=cident.substr(1);if(cident.match(/.*Proxy$/))cident=cident.slice(0,-5);if(!UseShortcuts){rep=inside;}else if(mident.match(/(First|Find)[A-Za-z0-9]+.*/)||cident=='YAPI'){rep='y'+mident;} if(doc[cident]&&doc[cident][mident]){rep=''+rep+'';}}else if((key=inside.match(/^(saveToFlash|isOnline).*/))!==null){rep=''+inside+'';} if(rep)text=text.substr(0,pos)+rep+text.substr(endpos);} return text;} function wdg(n){return document.getElementById(n);} function SetPosition(o,x,y){var it=wdg(o);it.style.top=y;it.style.left=x;} function GetPositionX(o){var it=wdg(o);return parseInt(it.style.left);} function GetPositionY(o){var it=wdg(o);return parseInt(it.style.top);} function GetWidth(o){var it=wdg(o);return parseInt(it.style.width);} function GetHeight(o){var it=wdg(o);return parseInt(it.style.height);} function SetHeight(o,h){var it=wdg(o);h=parseInt(h);if(h<0)h=0;it.style.height=h+"px";} function SetWidth(o,w){var it=wdg(o);w=parseInt(w);if(w<0)w=0;it.style.width=parseInt(w)+"px";} function SetLeft(o,l){var it=wdg(o);it.style.left=parseInt(l)+"px";} function SetTop(o,t){var it=wdg(o);it.style.top=parseInt(t)+"px";} function SetSize(o,w,h){var it=wdg(o);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()-2;if(WinW<600)WinW=600;WinH=GetWindowHeight()-2;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=32)&&(ascii<=127)&&(ascii!=34)&&(ascii!=39))str_out=str_out+str_in.charAt(i);else{var hex=ascii.toString(16).toUpperCase();if(hex.length==1)hex='0'+hex;str_out=str_out+String.fromCharCode(92)+'x'+hex;}} return str_out;} function resizeMargin(){SetSize("MarginLayer",marginSize,WinH-110);SetLeft("FunctionsLayer",marginSize);SetSize("FunctionsLayer",WinW-marginSize,WinH-110);} function resizeSeparator(){SetHeight("separatorLayer",WinH-110);} function positionObject(int_x,int_y){this.x=int_x;this.y=int_y;} function GetEventPosition(event){var x,y;if(event.changedTouches){x=event.changedTouches[0].pageX;y=event.changedTouches[0].pageY;} else{x=event.PageX;y=event.PageY;if(!x){x=event.clientX+document.body.scrollLeft;y=event.clientY+document.body.scrollTop;}} return new positionObject(x,y);} function EnableDrag(var_element,onDragMove,onDragEnd){if(document.addEventListener){var_element.addEventListener("mousedown",Drag_start,false);var_element.addEventListener("touchstart",Drag_start,false);} else if(document.attachEvent) var_element.attachEvent("onmousedown",Drag_start);if(onDragMove)var_element.onDragMove=onDragMove;if(onDragEnd)var_element.onDragEnd=onDragEnd;} var LastDraggedObject=null;function DraggedObject(obj_element,obj_elmtInitialPos,obj_mouseInitalPos){this.element=obj_element;this.elmtInitialPos=obj_elmtInitialPos;this.elmtCurrentPos=new positionObject(obj_elmtInitialPos.x,obj_elmtInitialPos.y);this.mouseInitialPos=obj_mouseInitalPos;} function Drag_start(event){if(!event)event=window.event;var source=event.srcElement;if(event.button!=undefined){if((event.button!=1)&&(document.attachEvent))return;if((event.button!=0)&&(document.addEventListener))return;} if(!source)source=this;if(!source)return;var originalsource=source;while(source.tagName!="DIV"){if(source.tagName=="A")return false;source=source.parentNode;} if(event.preventDefault)event.preventDefault();source.style.cursor="col-resize";lastDraggedObject=new DraggedObject(source,new positionObject(parseInt(source.style.left),parseInt(source.style.top)),GetEventPosition(event));if(document.addEventListener){document.addEventListener("mousemove",Drag_mouseCapture,false);document.addEventListener("mouseup",Drag_stopMouseCapture,false);document.addEventListener("touchmove",Drag_mouseCapture,false);document.addEventListener("touchend",Drag_stopMouseCapture,false);} else if(document.attachEvent){document.attachEvent("onmousemove",Drag_mouseCapture);document.attachEvent("onmouseup",Drag_stopMouseCapture);} document.onmouseup=Drag_stopMouseCapture;} function Drag_mouseCapture(event){if(!event)event=window.event;var position=GetEventPosition(event);if(event.preventDefault)event.preventDefault();var x=(lastDraggedObject.elmtInitialPos.x+position.x-lastDraggedObject.mouseInitialPos.x);var y=(lastDraggedObject.elmtInitialPos.y+position.y-lastDraggedObject.mouseInitialPos.y);var iw=getInnerWidth() var ih=getInnerHeight();var w=lastDraggedObject.element.offsetWidth;var h=lastDraggedObject.element.offsetHeight;if(x>iw-w)x=iw-w;if(y>ih-h)y=ih-h;if(x<0)x=0;if(y<0)y=0;var p={x:x,y:y};if(lastDraggedObject.element.onDragMove) lastDraggedObject.element.onDragMove(lastDraggedObject.element,p);lastDraggedObject.elmtCurrentPos.x=p.x;lastDraggedObject.elmtCurrentPos.y=p.y;lastDraggedObject.element.style.left=p.x+"px";lastDraggedObject.element.style.top=p.y+"px";} function Drag_stopMouseCapture(){if(document.removeEventListener){document.removeEventListener("mousemove",Drag_mouseCapture,false);document.removeEventListener("mouseup",Drag_stopMouseCapture,false);document.removeEventListener("touchmove",Drag_mouseCapture,false);document.removeEventListener("touchend",Drag_stopMouseCapture,false);} else if(document.detachEvent){document.detachEvent("onmousemove",Drag_mouseCapture);document.detachEvent("onmouseup",Drag_stopMouseCapture);} if(lastDraggedObject){lastDraggedObject.element.style.cursor='col-resize';if(lastDraggedObject.element.onDragEnd) lastDraggedObject.element.onDragEnd(lastDraggedObject.element,{x:lastDraggedObject.elmtCurrentPos.x,y:lastDraggedObject.elmtCurrentPos.y});} lastDraggedObject=null;} function marginMove(el,pos){pos.y=80;if(pos.x<100)pos.x=100;if(pos.x>WinW-100)pos.x=WinW-100;marginSize=pos.x;resizeMargin()} function proto(clname,m){var funcproto=doc[clname][m].pro;if(isClassMethod(clname,m)){if(UseShortcuts){funcproto=funcproto.replace(m,'y'+m);}else if(doc[clname][m].lib.substr(0,1)=='['&&funcproto.substr(0,1)!='+'){var params=doc[clname][m].par;var methodpos=funcproto.search(m);var endrettype=methodpos;while(endrettype>0&&funcproto.substr(endrettype-1,1)==' ')endrettype--;var newproto="+("+funcproto.substr(0,endrettype)+") "+m;var pos=methodpos+m.length;for(var p in params){pos+=funcproto.slice(pos).search(/[A-Za-z]/);var argpos=pos+funcproto.slice(pos).search('pos&&funcproto.substr(endargtype-1,1)==' ')endargtype--;var endarg=argpos+funcproto.slice(argpos).search(/[,)]/);newproto+=": ("+funcproto.slice(pos,endargtype)+") "+funcproto.slice(argpos,endarg)+" ";pos=endarg;} funcproto=newproto;}} return funcproto} var lastindex_shown="";var lastname_shown=null;function Show(clname,str_name,nohist){if(!clname&&!str_name){wdg("FunctionsLayerInner").innerHTML=NotFound;return;} var fcthtml=NotFound;lastindex_shown=clname;if(clname&&str_name&&doc[clname]&&doc[clname][str_name]){lastname_shown=str_name;var fct=doc[clname][str_name];var funcname=fct.lib.replace('%',clname.toLowerCase());var funcproto=proto(clname,str_name);if(UseShortcuts&&isClassMethod(clname,str_name)){funcname='y'+str_name+'()';} fcthtml=""+funcname+'' +"

"+funcproto+'' +'

'+ApplySub(fct.cmt,clname,str_name);if(fct.par){fcthtml+=""+ParamLabel+'
\n';fcthtml+='' for(var p in fct.par) fcthtml+='\n';fcthtml+='
'+p+' : '+ApplySub(fct.par[p],clname,str_name)+'

'} if(fct.ret){fcthtml+=""+ReturnLabel+'
\n';fcthtml+='

'+ApplySub(fct.ret,clname,str_name)+'

\n';} if(fct.ext)fcthtml+=ApplySub(fct.ext,clname,str_name);var newstate=clname+'.'+str_name;if(newstate!=history.state&&!nohist){history.pushState(newstate,newstate,'#'+newstate);}} else if(clname&&doc[clname]){fcthtml=""+clname+'
' +"

"+ApplySub(doc[clname][''].syn,clname,str_name)+"

" +(doc[clname][''].inc!=""?"

"+IncludeLabel+"

"+doc[clname][''].inc+"

":"") +"

"+ApplySub(doc[clname][''].cmt,clname,str_name)+"

";var prevmtype='';for(m in doc[clname]){if(m!=''){var funcproto=proto(clname,m);var mtype=MethodType(clname,m);if(prevmtype!=mtype){prevmtype=mtype;fcthtml+=""+MethodTypes[mtype]+"";if(clname!='YAPI'&&clname!='RfidOptions'){fcthtml+="

"+MethodExtra[mtype]+"

";}} fcthtml+="

"+funcproto+'
' +""+ApplySub(doc[clname][m].syn,clname,str_name)+'

';}} var newstate=clname;if(newstate!=history.state&&!nohist){history.pushState(newstate,newstate,'#'+newstate);}} wdg("FunctionsLayerInner").innerHTML=fcthtml;setTimeout("wdg('FunctionsLayer').scrollTop=0;",20);} function expand(source,openonly){if(wdg(source.id+"List").style.display==''&&!openonly){wdg(source.id+"List").style.display='none';wdg(source.id).src=plusimage;} else{wdg(source.id+"List").style.display='';wdg(source.id).src=minusimage;}} function ShowFunctions(str_currentclname){var marginhtml="";for(var clname in doc){var icon=plusimage;var onck=" onclick='expand(this";var iclass="expandColapse";var display="none";var methodlist="";for(var method in doc[clname]){if(method!=''){var funcname=doc[clname][method].lib.replace('%',clname.toLowerCase());var mclass=(ShowIcons?MethodType(clname,method):'noicon');if(UseShortcuts&&mclass=='static')funcname='y'+method+'()';methodlist+=""+funcname+'';}} if(methodlist==""){iclass="noExpand";onck=" ony='(";}else if(str_currentclname==clname){icon=minusimage;onck=" onclick='expand(this";display=""} marginhtml+="  ";marginhtml+=""+clname+'
';if(methodlist!="")marginhtml+="
"+methodlist+"
";if(clname=='YAPI'||clname=='FreeAPI')marginhtml+='
';} wdg("MarginLayer").innerHTML=marginhtml;} function fctMatch(clname,method,values){var found=new Array() var tosearch=new Array() for(var i=0;i=0;if(!found)found=method.search(expr)>=0;if(!found&&fct.inc){if(!found&&fct.syn)found=fct.syn.search(expr)>=0;if(!found)found=fct.inc.search(expr)>=0;} if(!found&&fct.pro)found=fct.pro.search(expr)>=0;if(fct.par) for(var p in fct.par){if(!found)found=p.search(expr)>=0;if(!found)found=fct.par[p].search(expr)>=0;} if(fct.ret){if(!found)found=fct.ret.search(expr)>=0;} if(!found&&fct.cmt)found=fct.cmt.search(expr)>=0;if(!found&&fct.ext)found=fct.ext.search(expr)>=0;if(!found)return false;} return true;} var searchTimer=null;function doSearch(){searchTimer=null;var value=document.forms['yoctoForm'].elements['search'].value;if(value==''){for(var clname in doc){var container=wdg(clname+"List");for(var method in doc[clname]) if(method!=''){var it=wdg(clname+'.'+method);if(it)it.style.display="block";} wdg(clname).style.visibility='visible';var container=wdg(clname+"List");if(container["originalDisplay"]!=""){wdg(clname+"List").style.display='none';wdg(clname).src=plusimage;} else{wdg(clname+"List").style.display='';wdg(clname).src=minusimage;} container["originalDisplay"]=null;} Show(lastindex_shown,lastname_shown);return;} var firstindex='';var firstname='';qvalue=value;value='';for(var i=0;i1){var words=window.location.hash.substr(1).split('.');var cname=words[0];if(cname!="YAPI"&&cname[0]=='Y')cname=cname.substr(1);if(doc[cname]){defclass=words[0];ShowFunctions(defclass);if(words.length>1&&doc[defclass][words[1]]){defmethod=words[1];var idxwdg=wdg('MarginLayer');var itemwdg=wdg(defclass+'.'+defmethod);var scrollTop=Math.max(itemwdg.offsetTop-(idxwdg.clientHeight>>1),0);setTimeout("wdg('MarginLayer').scrollTop="+scrollTop+";",20);}}else{ShowFunctions();}}else{ShowFunctions();} Show(defclass,defmethod,(arg==='NoH'));} function InitHTMLRef(){wdg('langdt').innerHTML=Language;computeWinWH();onResize(function(){SetWidth("BannerLayer",WinW)});onResize(resizeMargin);onResize(function(){SetWidth("FooterLayer",WinW);SetTop("FooterLayer",WinH-30);});onResize(resizeSeparator);EnableDrag(wdg("separatorLayer"),marginMove,marginMove);if(UseShortcuts!=null){var td=wdg("oosyntax");var widget=' '+AbbrevLabel;td.innerHTML=widget;td.title=AbbrevHint;td.alt=AbbrevHint;} if(Language!='LabVIEW'){var rule='';var types=['int','obj','dbl','str','arr','bool'];for(var i=0;i
2024-04-02