Roku HD110 User Guide - Page 103

Using the registry, Writing to the registry from an interactive playlist, roRegistry

Page 103 highlights

Using the registry BrightSign has an I2C EEPROM with 2K bytes of memory that supports the storage of persistent settings. The BrightSign software uses the registry object to read and write BrightScript data to this eeprom. The purpose of the registry is to enable customers to store usage statistics and other small amounts of information that may change regularly. Individual items are stored in the registry through the use of registry keys and values. For example, you use a registry key named "NumberOfButtonPresses" to count the number of times a button is pressed. Registry data can be organized into different registry sections if desired. Interactive playlists support writing to the registry, deleting from the registry, and displaying the contents of the registry (see Using Excel to create interactive presentations). You can also display the contents of the registry from a playlist (see Playlist commands). In addition, you can access the registry by using a custom script that includes the roRegistry object (see the BrightSign Object Reference Manual for additional information). The number of registry keys and values that you can use depends on a number of factors including the number of sections, the number of keys/values per section, and the size of the keys and values. In typical usage, there is room in the registry for about 50 keys. Writing to the registry from an interactive playlist When using interactive playlists, you can use the registry to track the number of times that the system transitions from one state to another. To do this, add the following to the state name in an event column: :counter() In the demo example, the elo:110:180:350:400 event column shows the state CARS.TS is in. To track the number of times that the user activates this transition, enter cars.mpg:counter(TouchToDemoMenu) in place of CARS.TS. Then, each time the user requests CARS.TS, BrightSign increments the TouchToDemoMenu key value in the registry. 97 • •

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118

97
Using the registry
BrightSign has an I2C EEPROM with 2K bytes of memory that supports the storage of persistent
settings. The BrightSign software uses the registry object to read and write BrightScript data to
this eeprom. The purpose of the registry is to enable customers to store usage statistics and other
small amounts of information that may change regularly.
Individual items are stored in the registry through the use of registry keys and values. For
example, you use a registry key named “NumberOfButtonPresses” to count the number of times
a button is pressed. Registry data can be organized into different registry sections if desired.
Interactive playlists support writing to the registry, deleting from the registry, and displaying the
contents of the registry (see
Using Excel to create interactive presentations
)
. You can also
display the contents of the registry from a playlist (see
Playlist commands
). In addition, you can
access the registry by using a custom script that includes the
roRegistry
object (see the
BrightSign Object Reference Manual
for additional information).
The number of registry keys and values that you can use depends on a number of factors
including the number of sections, the number of keys/values per section, and the size of the keys
and values. In typical usage, there is room in the registry for about 50 keys.
Writing to the registry from an interactive playlist
When using interactive playlists, you can use the registry to track the number of times that the
system transitions from one state to another. To do this, add the following to the state name in
an event column:
:counter(<registry key name>)
In the demo example, the elo:110:180:350:400 event column shows the state CARS.TS is in.
To track the number of times that the user activates this transition, enter
cars.mpg:counter(TouchToDemoMenu)
in place of CARS.TS. Then, each time the user requests
CARS.TS, BrightSign increments the TouchToDemoMenu key value in the registry.