Player APIs (BrightScript & Ja...
...
Object Reference
System Objects
roDeviceInfo
17min
this object provides information about the device hardware, firmware, and features the javascript equivalent is deviceinfo docid\ xcvijzytq6jq780kloglu ifdeviceinfo getmodel() as string returns the model name for the brightsign device running the script as a string (for example, "hd1020" or "xd230") getversion() as string returns the version number of brightsign firmware running on the device (for example, "4 0 13") getversionnumber() as integer returns the three most significant version numbers of the brightsign firmware running on the device in comparable numeric form major 65536 + minor 256 + build the return value for the getversionnumber() method does not include any additional version numbers after the first three for example, firmware version 4 0 13 4 will be returned as 262157 (as if it were "4 0 13") for this reason, we recommend using the getversion() or firmwareisatleast() methods to determine the current firmware version firmwareisatleast(version as string) as boolean returns true if the brightsign firmware version on the device is greater than or equal to the version number represented by the passed string (e g "4 0 13") getbootversion() as string returns the version number of the brightsign boot firmware, also known as "safe mode", as a string (for example, "1 0 4") getbootversionnumber() as integer returns the three most significant version numbers of the brightsign boot firmware, also known as "safe mode," in comparable numeric form major 65536 + minor 256 + build the return value for the getbootversionnumber() method does not include any additional version numbers after the first three for example, firmware version 1 0 4 1 will be returned as 65540 (as if it were "1 0 4") for this reason, we recommend using the getbootversion() or bootfirmwareisatleast() methods to determine the current boot firmware version bootfirmwareisatleast(version as string) as boolean returns true if the brightsign boot firmware version on the device is greater than or equal to the version number represented by the passed string (e g "4 4 22") gettemperature() as roassociativearray returns an associative array containing a dynamic string location key and the temperature as a floating point value getdeviceuptime() as integer returns the number of seconds that the device has been running since the last power cycle or reboot getdevicelifetime() as integer getloadstatistics(parameters as roassociativearray) as string provides current performance information related to the linux kernel this method accepts an associative array with a single key/value pair formatted as item \<parameter> ; it will then return a string containing information associated with that parameter the following are recognized parameters "loadavg" provides information about system performance the first three columns measure cpu and i/o utilization over the past 1, 5, and 10 minutes, respectively the fourth column displays the number of currently running processes and the total number of processes the last column displays the id of the most recently used process "meminfo" displays physical and swap memory usage "slabinfo" provides information about memory usage at the slab level "stat" provides overall statistics about the system (e g the number of page faults since the system booted) "vmstat" displays detailed virtual memory statistics from the kernel "zoneinfo" provides overall statistics about the system, broken down by system node "interrupts" displays which interrupts are in use and how many of each type there have been "version" provides the kernel version example stat = createobject("rodeviceinfo") print stat getloadstatistics({item "interrupts"}) getusbtopology(return as roassociativearray) as dynamic returns the usb topology of the player, including the port enumeration, pid, and vid of each usb device use this method to determine whether certain usb devices are connected to certain ports the passed associative array determines the return value {} returns the usb topology as a string list {format "xml"} if true , returns the usb topology as an xml formatted string {format "array"} returns an array of associative arrays each associative array contains information about a single usb port rebuild if true , ensures that the returned information is up to date with the current hardware status updates information and returns it in xml format di = createobject("rodeviceinfo") tp = di getusbtopology({format "xml", rebuild\ true}) string list brightscript debugger> di = createobject("rodeviceinfo") brightscript debugger> topo = di getusbtopology({}) brightscript debugger> print topo { "containers" \[ { "category" "hub", "fid" "", "pid" 1552, "raw" "1 1", "type" "", "vid" 1507 } ], "devices" \[ { "category" "hid", "fid" "b 0", "ident" "usb/hiddev0", "pid" 60931, "raw" "1 1 2 1 0", "type" "bp900", "vid" 2127 } xml string brightscript debugger> di = createobject("rodeviceinfo") brightscript debugger> topo = di getusbtopology({xml true}) brightscript debugger> print topo \<topology> 	\<device> \<raw>8 1 1 0\</raw> \<fid>c 0\</fid> \<category>hid\</category> \<vid>084f\</vid> \<pid>ee03\</pid> 	 \<ident>usb/hiddev0\</ident> \<type>bp900\</type> 	\</device> 	\<devices raw="2 1 4" category="hub" vid="05e3" pid="0610" > \<device> \<raw>2 1 4 1 1 0\</raw> \<fid>a/4 0\</fid> \<category>audio\</category> \<vid>05a7\</vid> \<pid>40fa\</pid> \</device> \<device> \<raw>2 1 4 1 1 2\</raw> \<fid>a/4 2\</fid> \<category>hid\</category> \<vid>05a7\</vid> \<pid>40fa\</pid> \</device> array brightscript debugger> di = createobject("rodeviceinfo") brightscript debugger> topo = di getusbtopology({array true}) brightscript debugger> print topo\[0] vid 05a7 pid 40fa fid a 0 category audio raw 2 1 4 1 1 0 ident usb/hiddev0 ports that have usb devices connected to them will include a fid (friendly id) value (only array and xml string returns include this value) use the fid to determine which physical port on the player the usb device is connected to the following table matches fid values to the ports on different model lines series 5 friendly id (fid) model family friendly id (fid) location type speed xd235/xd1035 a back type c b back type a ls425/ls445 a front type c sp2/cv hd3 a back type a hd225/hd1025 a back type a fs/hs xt245/xt1145/xt2145/cv uhd3 a back type c fs/hs b back type a xc2055/xc4055 a front type c b back type a series 3/4 friendly id (fid) model family friendly id (fid) location ls424/ls423 a front (usb c) hdx24/hdx23 a front (usb a) hs123 a n/a (m 2 connector) ho523 a upper front (usb a) b lower front (usb a) c back (jae tx 25) xdx33/xdx34 a front (usb c) b back (usb a) xtx43/xtx44 a back (usb a) b front (usb c) a fid value of \<port> \<int> (e g "b 0") indicates that the usb device is directly connected to the player, while a value of \<port>/\<int> \<int> (e g "a/4 2") indicates a device connected through a usb hub the last integer specifies the endpoint for example, if a usb device presents as both an hid and audio device, they will be listed as separate devices with different endpoint numbers also note that there can be more than one layer of port numbers if multiple usb hubs are connected together (e g "a/4 0 0") getdeviceuniqueid() as string returns an identifier that, if not an empty string, is unique to the unit running the script getfamily() as string returns a single string that indicates the family to which the device belongs a device family is a set of models that are all capable of running the same firmware hasfeature(feature as string) as boolean returns true if the player feature, which is passed as a case insensitive string parameter, is present on the current device and firmware the possible features that can be queried from the script are listed below if you pass a parameter other than one of those listed below, it may return false even if the feature is available on the hardware and firmware "5v serial" a 5v serial port "audio1" the first audio output "audio2" a second audio output "audio3" a third audio output "brightscript1" brightscript version 1 "brightscript2" brightscript version 2 "component video" a component video output "ethernet" an ethernet interface "findmemberfunction" the global function of that name is available for use see the global functions docid\ nsjxffr7olfgdwgjfebme page for details "gpio connector" a da15 or phoenix style gpio port "hdmi" an hdmi® output "hdmi input" an hdmi input "hevc decode" an h 265 video decoder "media decryption" the ability to decrypt aes encrypted media, including video, image, and audio files "nand storage" nand storage for the boot loader and firmware "networking" any form of networking capability a false return may indicate that no network is currently available "reset button" a reset button "registry" on board persistent storage "rtc" a real time clock (rtc) "sd" sd or sdhc compatible storage "sdhc" sdhc compatible storage only "serial port 0" the first serial port "serial port 1" a second serial port "serial port 2" a third serial port "svc button" a service ("svc") button passing the legacy term "gpio12 button" will yield the same result "usb" one or more usb interfaces "vga" a vga output "video encoder" a video encoder/transcoder example di = createobject("rodeviceinfo") print di getmodel() print di getversion(), di getversionnumber() print di getbootversion(), di getbootversionnumber() print di getdeviceuptime(), di getdevicebootcount() on a particular system, this will generate the following hd1010 3 2 41 197161 3 2 28 197148 14353 3129