Download Yocto-MiniDisplay, user manual

Transcript
21. High-level API Reference
anbutton→registerValueCallback()
YAnButton
Registers the callback function that is invoked on every change of advertised value.
js
function registerValueCallback( callback)
nodejs
function registerValueCallback( callback)
php
function registerValueCallback( $callback)
cpp
int registerValueCallback( YAnButtonValueCallback callback)
-(int) registerValueCallback : (YAnButtonValueCallback) callback
m
pas
function registerValueCallback( callback: TYAnButtonValueCallback): LongInt
vb
function registerValueCallback( ) As Integer
cs
int registerValueCallback( ValueCallback callback)
java
py
int registerValueCallback( UpdateCallback callback)
def 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.
www.yoctopuce.com
307