Support for Vendors
User Configuration
Code examples
Analysing tools
Accessory text output
Accessories to select a string from namespace 2 for text output on a display.
Requirements
- Bit 2 in Feature FEATURE_STRING_NAMESPACES_AVAILABLE must be set. With this the node announces that namespace 2 is available for MSG_STRING_SET/_GET.
- The node provides accessories with configuration parameters BIDIB_ACCESSORY_PARA_USES_STRINGS.
Texts
Query number and length of texts.
How many texts can be stored on the node and how long they may be max. can be queried by reading the text with the STRING ID = 255.
The returned text contains, separated by comma, the possible number and then the max. length of the texts.
06-04-00-1F-19-02-FF, this means in detail: 0x06 MSG_LENGTH 0x04 lokale Adresse 0x00 lokale Adresse 0x1F MSG_NUM 0x19 MSG_TYPE (= MSG_STRING_GET) 0x02 NAMESPACE = 2 0xFF STRING ID = 255
The node answers with MSG_STRING. In this example, the text says that 12 texts of 24 characters each are available on the node.
0C-04-00-33-95-02-FF-05-31-32-2C-32-34, this means in detail: 0x0C MSG_LENGTH 0x04 lokale Adresse 0x00 lokale Adresse 0x33 MSG_NUM 0x95 MSG_TYPE (= MSG_STRING) 0x02 NAMESPACE = 2 0xFF STRING ID = 255 0x05 Anzahl der Zeichen im String 0x31 '1' 0x32 '2' 0x2C ',' 0x32 '2' 0x34 '4'
Transfer texts
The texts are transferred to the node with the message MSG_STRING_SET.
The NAMESPACE 2 contains the strings that are assigned to the aspects of an accessory.
STRING ID 0 contains a default text that is shown on the display when the node is switched on.
Example:
String "1.919" wird in Namensraum 2 nach STRING_ID 2 geschrieben:
0C-02-00-13-1A-02-02-05-31-2E-39-31-39, this means in detail: 0x0C MSG_LENGTH 0x02 lokale Adresse 0x00 lokale Adresse 0x13 MSG_NUM 0x1A MSG_TYPE (= MSG_STRING_SET) 0x02 NAMESPACE = 2 0x02 STRING_ID = 2 0x05 SIZE = 5 0x31 '1' 0x2E ',' 0x39 '9' 0x31 '1' 0x39 '9'
Accessories
Query Accessoy parameters
Accessries that support text output are reported to the host with the BIDIB_ACCESSORY_PARA_USES_STRINGS parameter.
Example:
The host asks whether Accessory 16 has set the BIDIB_ACCESSORY_PARA_USES_STRINGS parameter:
06-04-00-2F-3B-10-F9, this means in detail: 0x06 MSG_LENGTH 0x04 lokale Adresse 0x00 lokale Adresse 0x2F MSG_NUM 0x3B MSG_TYPE (= MSG_ACCESSORY_PARA_GET) 0x10 ACCESSORY = 16 0xF9 BIDIB_ACCESSORY_PARA_USES_STRINGS = 249
The node responds with MSG_ACCESSORY_PARA:
07-04-00-4A-B9-10-F9-01, this means in detail: 0x07 MSG_LENGTH 0x04 lokale Adresse 0x00 lokale Adresse 0x4A MSG_NUM 0xB9 MSG_TYPE (= MSG_ACCESSORY_PARA) 0x10 ACCESSORY = 16 0xF9 BIDIB_ACCESSORY_PARA_USES_STRINGS = 249 0x01 1 = Parameter vorhanden
Accessory to text assignmen
The accessories of a node with text output can trigger the display of the assigned string via the respective aspects.
A string from namespace 2 is permanently assigned to the aspects.
- Aspekt 0 is assigned to STRING_ID 0.
- Aspekt 1 is assigned to STRING_ID 1.
- Aspekt 2 is assigned to STRING_ID 2.
- etc.
The node defines where on the display the string of the respective accessory is used.
The node manufacturer should describe this assignment in his documentation.
Example: Gas station
A node represents the prices of the fuel types over the Accessories 1 - 3.
The text for the price of diesel is taken from the STRING_ID selected via an aspect of Accessory 1.
If the price for diesel is in STRING_ID 2 of namespace 2, aspect 2 of Accessory 1 must be selected by MSG_ACCESSORY_SET.:
Aspect 2 of Accessory 1 is selected via MSG_ACCESSORY_SET.
This shows the text from STRING_ID 2 on the display.
If the text in STRING_ID 2 is changed and aspect 2 is still active, the node should also update the test on the display.
FE-06-02-00-0F-38-01-02-F9-FE, this means in detail: 0xFE Magic 0x0C MSG_LENGTH 0x02 local adresse 0x00 local adresse 0x0F MSG_NUM 0x38 MSG_TYPE (= MSG_ACCESSORY_SET) 0x01 ACCESSORY = 1 0x02 ASPECT = 2 0x2A CRC 0xFE Magic
NAMESPACE 2
The strings that are assigned to the aspects of an accessory are stored in namespace 2.
Example:
String "1.919" is written in NAME_SPACE 2 at STRING_ID 2:
FE-0C-02-00-13-1A-02-02-05-31-2E-39-31-39-2A-FE, this means in detail: 0xFE Magic 0x0C MSG_LENGTH 0x02 local adresse 0x00 local adresse 0x13 MSG_NUM 0x1A MSG_TYPE (= MSG_STRING_SET) 0x02 NAMESPACE = 2 0x02 STRING_ID = 2 0x05 SIZE = 5 0x31 '1' 0x2E ',' 0x39 '9' 0x31 '1' 0x39 '9' 0x2A CRC 0xFE Magic
Example: Platform display
In this example the node represents a platform display.
Accessories 1 - 5 are used to show the individual information on the display..
- Accessory 1 = Destination
- Accessory 2 = train number
- Accessory 3 = Departure time
- Accessory 4 = Train path
- Accessory 5 = Infotext