text-gen-en
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
text-gen-en [2019/04/04 14:46] – rjversluis | text-gen-en [2024/02/18 18:13] (current) – [Refresh] rjversluis | ||
---|---|---|---|
Line 4: | Line 4: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
- | |||
\\ | \\ | ||
- | \\ | + | {{text-setup-en.png? |
- | {{text-setup-en.png? | + | |
=====ID===== | =====ID===== | ||
A unique ID, which is used by Rocrail to address the element. This ID is usually assigned by Rocrail.\\ | A unique ID, which is used by Rocrail to address the element. This ID is usually assigned by Rocrail.\\ | ||
+ | |||
=====Text===== | =====Text===== | ||
This attribute stores the string, which should be displayed in the track plan and can be changed here.\\ | This attribute stores the string, which should be displayed in the track plan and can be changed here.\\ | ||
+ | |||
=====Image===== | =====Image===== | ||
Select the path to an image using this button, to show an image instead of a simple text.\\ | Select the path to an image using this button, to show an image instead of a simple text.\\ | ||
+ | **Note:** Only " | ||
+ | |||
=====Refresh===== | =====Refresh===== | ||
Image refresh time in ms which can be used for __**[[: | Image refresh time in ms which can be used for __**[[: | ||
This option must be greater the 99 to be activated.\\ | This option must be greater the 99 to be activated.\\ | ||
+ | In case of a static image this value should be zero to prevent deleting the file.\\ | ||
=====Tip===== | =====Tip===== | ||
Tooltip for this element.\\ | Tooltip for this element.\\ | ||
Is the field empty, the ID will shown as tooltip. | Is the field empty, the ID will shown as tooltip. | ||
+ | |||
=====Color===== | =====Color===== | ||
- | Forground | + | |< >| |
+ | ^ Button ^ Function | ||
+ | | **Text** | the normal | ||
+ | | **Active text** | the text color of toggle state ON, if Text Type = Toggle switch | | ||
+ | | **Border** | the text color of the border, if Border = ON | | ||
+ | |||
====Background==== | ====Background==== | ||
- | Background color can only be set by using the Backgrond | + | Background color can only be set by using the Background |
To get a transparent background (then the Track plan color will be shown) is necessary to set there the Background color to " | To get a transparent background (then the Track plan color will be shown) is necessary to set there the Background color to " | ||
=====Point size===== | =====Point size===== | ||
- | You can change with this attribute the font size of the text.\\ | + | With this attribute the font size of the text may be changed.\\ |
0 (default) means the standard value of the operating system.\\ | 0 (default) means the standard value of the operating system.\\ | ||
Line 50: | Line 59: | ||
* __**[[: | * __**[[: | ||
====Slider==== | ====Slider==== | ||
- | + | Vertical slider. For more information see: [[: | |
- | \\ | + | * **Note:** Regardless of the alignment of the text object or a rotation of the track plan, the slider direction is always vertical. |
=====Attributes===== | =====Attributes===== | ||
====HTML==== | ====HTML==== | ||
Render HTML instead of plain text.\\ | Render HTML instead of plain text.\\ | ||
Use this in combination with a __**[[: | Use this in combination with a __**[[: | ||
+ | **Note:** This option is ignored in case pipe, ' | ||
+ | |||
+ | ====Train Image==== | ||
+ | {{: | ||
+ | The locomotive and its assigned train can be visualised if the action is triggered by a block.\\ | ||
+ | The action only needs the command update and no text by the following states: | ||
+ | * enter | ||
+ | * occupied | ||
+ | * in | ||
+ | * free | ||
+ | The text field width should be long enough to contain the longest train.\\ | ||
+ | Images are expected with a height of 80 pixel and will be scaled down to fit in height to one raster cell.\\ | ||
+ | |||
====Reset==== | ====Reset==== | ||
Reset the saved text content at startup; Useful for dynamic text.\\ | Reset the saved text content at startup; Useful for dynamic text.\\ | ||
Line 62: | Line 84: | ||
====Mirror image==== | ====Mirror image==== | ||
In case the text points to an image it will be mirrored horizontally.\\ | In case the text points to an image it will be mirrored horizontally.\\ | ||
- | \\ | + | |
+ | |||
+ | ====Blink==== | ||
+ | Blink the text incase [[# | ||
+ | A good refresh value is 500.\\ | ||
+ | |||
+ | |||
+ | |||
+ | ====Min./ | ||
+ | Values at the min. and max. positions of the slider. | ||
+ | \\ | ||
=====Orientation===== | =====Orientation===== | ||
Default is horizontal.\\ | Default is horizontal.\\ | ||
Line 71: | Line 103: | ||
| < | | < | ||
If dynamic text starts with the new line char it will be appended to the existing text.\\ | If dynamic text starts with the new line char it will be appended to the existing text.\\ | ||
+ | For HTML text the new line char id replaced by "< | ||
+ | |||
====Example==== | ====Example==== | ||
< | < | ||
Line 79: | Line 113: | ||
=====Display an image===== | =====Display an image===== | ||
{{text-image-en.png}} \\ | {{text-image-en.png}} \\ | ||
- | If the text ends with **.png** the text object will try to find the matching image in the __**[[rocgui-gen-en# | + | If the text ends with **.png** |
The image will be scaled, with respect to the image aspect, to fit the text size as defined on the __**[[text-en# | The image will be scaled, with respect to the image aspect, to fit the text size as defined on the __**[[text-en# | ||
+ | \\ | ||
+ | |||
+ | =====Display a live stream===== | ||
+ | if the text starts with **mjpg:** it will be interpreted as a HTML MJPEG live stream.\\ | ||
+ | Format: | ||
+ | < | ||
+ | mjpg:< | ||
+ | </ | ||
\\ | \\ | ||
===== Actions===== | ===== Actions===== | ||
Line 119: | Line 161: | ||
| %min% | Model minute part of time | | | %min% | Model minute part of time | | ||
| %sec% | Model seconds part of time: Only available if __**[[: | | %sec% | Model seconds part of time: Only available if __**[[: | ||
- | | %temp% | Model temperature. | | + | | %sunriseH% | Sunrise hour (Rocrail properties -> Service -> Location) | |
+ | | %sunriseM% | Sunrise minute | | ||
+ | | %sunsetH% | Sunset hour | | ||
+ | | %sunsetM% | Sunset minute | | ||
+ | | %temp% | Model temperature, or HUE sensor temperature. | | ||
+ | | %temp100% | HUE sensor temperature in hundreds of degrees. | | ||
+ | | %bri% | Brightness by weather or HUE sensor. | | ||
+ | | %lux% | HUE sensor lux. | | ||
+ | | %pressure% | Sensor pressure in hPa. | | ||
+ | | %humidity% | Sensor humidity in percent. | | ||
| %syshour% | System hour part of time | | | %syshour% | System hour part of time | | ||
| %sysmin% | System minute part of time | | | %sysmin% | System minute part of time | | ||
| %syssec% | System seconds part of time: Only available if __**[[: | | %syssec% | System seconds part of time: Only available if __**[[: | ||
| %callerid% | The ID of the object which called this action. | | | %callerid% | The ID of the object which called this action. | | ||
+ | | %calleraddr% | The address of the object which called this action. | | ||
+ | | %callertype% | The type of the object which called this action. | | ||
| %callerdesc% | The description of the object which called this action. | | | %callerdesc% | The description of the object which called this action. | | ||
| %calleruserdata% | The user data of the object which called this action. | | | %calleruserdata% | The user data of the object which called this action. | | ||
Line 131: | Line 184: | ||
^ Loco & Car^^ | ^ Loco & Car^^ | ||
| %lcid% | Loco ID | | | %lcid% | Loco ID | | ||
+ | | %lcaddr% | Loco address | | ||
| %lcshortid% | Loco short ID | | | %lcshortid% | Loco short ID | | ||
| %lcclass% | Loco/Train Class | | | %lcclass% | Loco/Train Class | | ||
+ | | %lcbes% | Loco block enter side as '<' | ||
| < | | < | ||
| %lcimg% | Loco image | | | %lcimg% | Loco image | | ||
Line 141: | Line 196: | ||
| %lcnr% | Loco number | | | %lcnr% | Loco number | | ||
| %lchome% | Loco home location | | | %lchome% | Loco home location | | ||
+ | | %lchomedesc% | Loco home location description | | ||
| %lcdir% | Loco direction: " | | %lcdir% | Loco direction: " | ||
| %lcplacing% | Loco placing: " | | %lcplacing% | Loco placing: " | ||
Line 155: | Line 211: | ||
| %carlocation% | Car location | | | %carlocation% | Car location | | ||
| %operatorid% | Operator ID in case the car is part of the train | | | %operatorid% | Operator ID in case the car is part of the train | | ||
+ | | %operatorlocoid% | Loco ID in case the car is part of a train and the train is assigned to a loco | | ||
| %waybill% | The waybill ID assigned to this car. | | | %waybill% | The waybill ID assigned to this car. | | ||
| %waybilldest% | The destination of the assigned waybill to this car. | | | %waybilldest% | The destination of the assigned waybill to this car. | | ||
Line 191: | Line 248: | ||
| %bkmvspeed% | Speed measured in block (use it with state ' | | %bkmvspeed% | Speed measured in block (use it with state ' | ||
| %bklen% | Block length | | | %bklen% | Block length | | ||
+ | ^ Turntable ^^ | ||
+ | | %regval% | Bridge position. | | ||
^ Sensor ^^ | ^ Sensor ^^ | ||
| %counter% | Number of state ON events. | | | %counter% | Number of state ON events. | | ||
Line 200: | Line 259: | ||
| %load% | Load in mA | | | %load% | Load in mA | | ||
| %volt% | Voltage in mV | | | %volt% | Voltage in mV | | ||
- | | %temp% | Temperature in °C | | + | | %boostertemp% | Temperature in °C | |
^ MVTrack ^^ | ^ MVTrack ^^ | ||
| %mvspeed% | Measured speed in KM/H | | | %mvspeed% | Measured speed in KM/H | | ||
+ | | %mvtrainlen% | Measured Train length in mm | | ||
^ Text ^^ | ^ Text ^^ | ||
| $txtID | The text of a text object | | | $txtID | The text of a text object | | ||
Line 209: | Line 269: | ||
¹) Hint: %bkmvspeed% will be updated on the in-event. The next event which can be used to trigger the update of the text is the change to status ' | ¹) Hint: %bkmvspeed% will be updated on the in-event. The next event which can be used to trigger the update of the text is the change to status ' | ||
\\ | \\ | ||
- | |||
====User Variables==== | ====User Variables==== | ||
|< >| | |< >| | ||
Line 215: | Line 274: | ||
| #varID or with Sub-ID # | | #varID or with Sub-ID # | ||
| @varID | The text value of a variable. | | | @varID | The text value of a variable. | | ||
- | | @@nvarID | The indexed, n=0...9, text value of a variable. The text value must be a comma separated list. | | + | | @@nvarID | The indexed, n=0...99, text value of a variable. The text value must be a comma separated list. | |
- | | ##nvarID | The indexed, n=0...9, text value of a variable converted in an integer. (atoi) The text value must be a comma separated list. | | + | | ##nvarID | The indexed, n=0...99, text value of a variable converted in an integer. (atoi) The text value must be a comma separated list. | |
| ~varID | A pointer to the variable text or value; Depends from XMLScript command: value=%%" | | ~varID | A pointer to the variable text or value; Depends from XMLScript command: value=%%" | ||
\\ | \\ |
text-gen-en.1554381974.txt.gz · Last modified: 2019/04/04 14:46 by rjversluis