Panel | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
ON THIS PAGE
|
BrightSign players use a standardized library of BrightScript objects to expose functionality for public software development. To publish a new API for interacting with BrightSign hardware, we create a new BrightScript object.
Interfaces and Methods
Every BrightScript object consists of one or more "interfaces." An interface consists of one or more "methods." For example, the roVideoPlayer object has several interfaces, including ifMessagePort. The interface ifMessagePort has one method: SetPort()
.
The abstract interface ifMessagePort is exposed and implemented by both the roControlPort and the roVideoPlayer objects. Once the SetPort() method is called, these objects will send their events to the supplied message port. This is discussed more in the the Event Loops section Loops section below.
Code Block | ||
---|---|---|
| ||
p = CreateObject("roMessagePort") video = CreateObject("roVideoPlayer") gpio = CreateObject("roControlPort", "BrightSign") gpio.SetPort(p) video.SetPort(p) |
...