User Tools

Site Tools


text-gen-en

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
text-gen-en [2019/04/04 14:46] rjversluistext-gen-en [2024/02/18 18:13] (current) – [Refresh] rjversluis
Line 4: Line 4:
   * [[:text-en|Index]] | **[[:text-gen-en|General]]** | [[:text-int-en|Interface]]   * [[:text-en|Index]] | **[[:text-gen-en|General]]** | [[:text-int-en|Interface]]
     * [[:text-gen-en#dynamic_text|Dynamic text]] | [[text:text-webcam-en|WebCam]] | [[:text:text-webcam-server-en|WebCam on Server]]     * [[:text-gen-en#dynamic_text|Dynamic text]] | [[text:text-webcam-en|WebCam]] | [[:text:text-webcam-server-en|WebCam on Server]]
-  
  \\  \\
- \\ +{{text-setup-en.png?800}}\\
-{{text-setup-en.png?600}}\\+
  
 =====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 "**.png**" files will be displayed as an image. See also: **[[#display_an_image|Display an image]]** \\
 +
 =====Refresh===== =====Refresh=====
 Image refresh time in ms which can be used for __**[[:text:text-webcam-en|WebCam pictures]]**__.\\ Image refresh time in ms which can be used for __**[[:text:text-webcam-en|WebCam pictures]]**__.\\
 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 color.\\+|< >| 
 +^ Button ^  Function 
 +| **Text** | the normal color of the text; or the text color of toggle state OFF | 
 +| **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 item in the Context menue.\\+Background color can only be set by using the Background item in the Context menu.\\
 To get a transparent background (then the Track plan color will be shown) is necessary to set there the Background color to "black". To get a transparent background (then the Track plan color will be shown) is necessary to set there the Background color to "black".
  
 =====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:
   * __**[[:rocweb:rocweb-en|Rocweb]]**__   * __**[[:rocweb:rocweb-en|Rocweb]]**__
 ====Slider==== ====Slider====
- +Vertical slider. For more information see: [[:text:text-slider-en|Slider]]. 
- \\+  * **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 __**[[:locations-details-en#timetable|Location Timetable]]**__.\\ Use this in combination with a __**[[:locations-details-en#timetable|Location Timetable]]**__.\\
 +**Note:** This option is ignored in case pipe, '|', characters are in the text.\\
 +
 +====Train Image====
 +{{:text:text-trainimg-en.jpg}}\\
 +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 [[#refresh|Refresh]] > 99.\\ 
 +A good refresh value is 500.\\ 
 + 
 + 
 + 
 +====Min./Max.==== 
 +Values at the min. and max. positions of the slider. 
 + \\ 
 =====Orientation===== =====Orientation=====
 Default is horizontal.\\ Default is horizontal.\\
Line 71: Line 103:
 |  <nowiki>|</nowiki>  | New line | |  <nowiki>|</nowiki>  | New line |
 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 "<br>". (15607+)\\
 +
 ====Example==== ====Example====
 <code> <code>
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#image_path|Imagepath]]**__.\\+If the text ends with **.png** (only .png is allowed) the text object will try to find the matching image in the __**[[rocgui-gen-en#image_path|Imagepath]]**__.\\
 The image will be scaled, with respect to the image aspect, to fit the text size as defined on the __**[[text-en#position_size|Position Tab]]**__.\\ The image will be scaled, with respect to the image aspect, to fit the text size as defined on the __**[[text-en#position_size|Position Tab]]**__.\\
 + \\
 +
 +=====Display a live stream=====
 +if the text starts with **mjpg:** it will be interpreted as a HTML MJPEG live stream.\\
 +Format:
 +<code>
 +mjpg:<host>:<port>
 +</code>
  \\  \\
 ===== 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 __**[[:rocrailini-automode-en#action_timer_60_sec|Action timer 60sec]]**__ is disabled. | | %sec% | Model seconds part of time: Only available if __**[[:rocrailini-automode-en#action_timer_60_sec|Action timer 60sec]]**__ is disabled. |
-| %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 __**[[:rocrailini-automode-en#action_timer_60_sec|Action timer 60sec]]**__ is disabled. | | %syssec% | System seconds part of time: Only available if __**[[:rocrailini-automode-en#action_timer_60_sec|Action timer 60sec]]**__ is disabled. |
 | %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 '<' or '>' |
 | <del>%lcident%</del> or %lccode% | Loco code (RFID, Railcom, Lissy, Barcode...) | | <del>%lcident%</del> or %lccode% | Loco code (RFID, Railcom, Lissy, Barcode...) |
 | %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: "fwd"/"rev" | %lcdir% | Loco direction: "fwd"/"rev"
 | %lcplacing% | Loco placing: "norm"/"swap" | %lcplacing% | Loco placing: "norm"/"swap"
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 'free'¹) | | %bkmvspeed% | Speed measured in block (use it with state 'free'¹) |
 | %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 'free'. If you trigger the update on other stati, you will get the last measured speed (which might differ from the actual one.) ¹) 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 'free'. If you trigger the update on other stati, you will get the last measured speed (which might differ from the actual one.)
  \\  \\
- 
 ====User Variables==== ====User Variables====
 |< >| |< >|
Line 215: Line 274:
 | #varID or with Sub-ID #varID%lcid% | The integer value | | #varID or with Sub-ID #varID%lcid% | The integer value |
 | @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"%% or text=%%"~varID"%%  | | ~varID | A pointer to the variable text or value; Depends from XMLScript command: value=%%"~varID"%% or text=%%"~varID"%%  |
  \\  \\
text-gen-en.1554381974.txt.gz · Last modified: 2019/04/04 14:46 by rjversluis