22. High-level API Reference
362
www.yoctopuce.com
YAnButton
anbutton
→
registerValueCallback()
Registers the callback function that is invoked on every change of advertised value.
js
function registerValueCallback(
callback
)
cpp
int registerValueCallback( YAnButtonValueCallback
callback
)
m
-(int) registerValueCallback : (YAnButtonValueCallback)
callback
pas
function registerValueCallback(
callback
: TYAnButtonValueCallback): LongInt
vb
function registerValueCallback( ) As Integer
cs
int registerValueCallback( ValueCallback
callback
)
java
int registerValueCallback( UpdateCallback
callback
)
uwp
Task<int> registerValueCallback( ValueCallback
callback
)
py
def registerValueCallback(
callback
)
php
function registerValueCallback(
$callback
)
es
function registerValueCallback(
callback
)
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.
Parameters :
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.
Содержание Yocto-Display
Страница 1: ...Yocto Display User Manual...
Страница 2: ......
Страница 40: ...34 www yoctopuce com...
Страница 52: ...46 www yoctopuce com...
Страница 84: ...78 www yoctopuce com...
Страница 92: ...86 www yoctopuce com...
Страница 130: ...124 www yoctopuce com...
Страница 158: ...22 High level API Reference 152 www yoctopuce com On failure throws an exception or returns a negative error code...
Страница 422: ...416 www yoctopuce com...
Страница 424: ...24 Characteristics 418 www yoctopuce com...