Download Yocto-Amp, User's guide
Transcript
21. High-level API Reference YAPI.PreregisterHub() yPreregisterHub() YAPI Fault-tolerant alternative to RegisterHub(). function yPreregisterHub( url, errmsg) js nodejs function PreregisterHub( url, errmsg) php function yPreregisterHub( $url, &$errmsg) cpp YRETCODE yPreregisterHub( const string& url, string& errmsg) m YRETCODE yPreregisterHub( NSString * url, NSError** errmsg) pas function yPreregisterHub( url: string, var errmsg: string): integer vb function yPreregisterHub( ByVal url As String, ByRef errmsg As String) As Integer cs int PreregisterHub( string url, ref string errmsg) java synchronized static int PreregisterHub( String url) def PreregisterHub( url, errmsg=None) py This function has the same purpose and same arguments as RegisterHub(), but does not trigger an error when the selected hub is not available at the time of the function call. 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. Parameters : url a string containing either "usb","callback" or the root URL of the hub to monitor errmsg a string passed by reference to receive any error message. Returns : YAPI_SUCCESS when the call succeeds. On failure, throws an exception or returns a negative error code. www.yoctopuce.com 137