Player APIs (BrightScript & Ja...
...
Object Reference
Input/Output Objects
roBtClientManager
9min
this object represents a ble gatt service, where the player acts as a peripheral and another device (phone, tablet, etc ) acts as the client/central unlike docid\ akmxi8iwh0er tqdiq3yg , which allows for unidirectional, non connectable communication (i e beaconing), the robtclientmanager object is used to facilitate two way, connectable communication it provides an event to an attached message port when a new client connects it also manages the client state, provides client update events, and times out the client after a period of inactivity the javascript equivalent is bsbtmanager docid\ cf7q7xsa9drtcq3btxv a the ble clients themselves are represented by the docid\ fdpnjsz tkiciape63ol9 object ifbtclientmanager start(params as roassociativearray) as boolean starts ble communication this method accepts the following parameters client timeout the amount of time (in seconds) that a client can be inactive before being disconnected service uuid a uuid that identifies the service clientid uuid the client identifier attribute once a client device connects to the player, it should write its unique client identifier value to this attribute user variable uuid the user variables attribute this attribute is intended to be writable by both the player and the client, providing the primary means for exchanging state data user variables can be written as a json string command uuid the command attribute when a client device writes to this attribute, an event containing the command string is generated by the associated robtclient instance device info uuid the attribute for device information this attribute is read only for clients device data uuid the attribute for device data this attribute can be used to communicate available commands to clients it is read only for clients there is a limit 512 bytes on each attribute stop() as boolean stops ble communication setdeviceinfo(a as object) as boolean setdevicedata(a as object) as boolean ifmessageport setport(a as object) posts messages of type docid 0ya2sscmidfpwj 6w xvi to the attached message port ifidentity getidentity() as integer returns a unique number that can be used to identify docid 0ya2sscmidfpwj 6w xvi objects that originate from this object the ifidentity interface has been deprecated we recommend using the ifuserdata interface instead ifuserdata setuserdata(user data 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 iffailurereason getfailurereason() as string returns additional useful information when a method on the ifbtclientmanager interface returns false