Player APIs (BrightScript & Ja...
...
Object Reference
Input/Output Objects

roBtClient

8min
each instance of this object represents a single ble client this object is not instantiated by the script; instead, when a ble client connects to the player, the docid\ j 50zrjy jtwe5e5swoo object sends an event to its attached message port and creates a robtclient instance the javascript equivalent is bsbtmanager docid\ cf7q7xsa9drtcq3btxv a the primary purpose of the robtclient object is to transfer data between the player and the client via user variables (i e characteristics) when a client updates user variables or sends a command, an docid\ dr0efvd1o9jqa1mfa33aw is sent to the attached message port the state can be retrieved using either the robtclient getuservars() method or the robtclientevent getparam() method updates from the robtclientevent object are queued until the script processes them, while the robtclient object returns the most current state ifbtclient getclientid() as string retrieves the uuid of the client associated with the object instance setuservars(data as string) as boolean specifies new data for the client to retrieve getuservars() as string retrieves the latest data from the robtclient state disconnect() as boolean forces the player to disconnect from the client ifmessageport setport(a as object) posts messages of type robtclientevent to the attached message port an event is raised whenever the end of the queue is reached ifuserdata setuserdata(a as object) sets the user data that will be returned when events are raised getuserdata() as object returns the user data that has previously been set via setuserdata() it will return invalid if no data has been set ifidentity getidentity() as integer returns a unique number that can be used to identify robtclientevent objects that originate from this object the ifidentity interface has been deprecated we recommend using the ifuserdata interface instead iffailurereason getfailurereason() as string returns additional useful information if a method on the ifbtclient interface returns false