rocrailini-service-en
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | rocrailini-service-en [2024/04/01 16:05] (current) – [Location] rjversluis | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Services ====== | ||
+ | [[: | ||
+ | [[english | Content ]] -> [[english# | ||
+ | * [[rocrailini-gen-en|General]] | [[rocrailini-trace-en|Trace]] | **Service** | ||
+ | * [[clockservice-en|Clock Service]] | ||
+ | // \\ // \\ | ||
+ | |||
+ | ===== Rocrail Service tab. ===== | ||
+ | |||
+ | {{rocrailini-service-en.png? | ||
+ | \\ | ||
+ | |||
+ | ===== HTTP Service ===== | ||
+ | [[servermonitor-en|See for details this chapter.]] | ||
+ | \\ | ||
+ | |||
+ | ====Port==== | ||
+ | :!: The port must differ from the client service port to avoid conflicts.\\ | ||
+ | \\ | ||
+ | |||
+ | ===== Clock Service ===== | ||
+ | Use this service if a faster clock is wanted and/or all clients must be synchronized. | ||
+ | ====Divider==== | ||
+ | The time divider is used to setup the clock speed: 1...100. (Example: A divider of 10 will run the model time 10 times faster than real time.)\\ | ||
+ | The next field is the Client update frequency in model minutes: 1...60. Default is every model minute.\\ | ||
+ | ====Hour/ | ||
+ | This is the start time for the clock service.\\ | ||
+ | The computer time is used if the values are set to 24:60.\\ | ||
+ | |||
+ | ====Semi real time==== | ||
+ | With this option all fast clock options are available if the divider is set to one. (Otherwise clock commands are rejected.)\\ | ||
+ | __Note:__ //The clock will no longer be in sync with the hardware computer clock.//\\ | ||
+ | ====Stop clock at power off==== | ||
+ | Stop the fast clock in case of a power off event. (Short cut)\\ | ||
+ | \\ | ||
+ | |||
+ | ===== Client Service ===== | ||
+ | This is the port at which Rocview clients must connect to become all data and events needed to function. | ||
+ | |||
+ | ==== Client Port ==== | ||
+ | The official assigned port by IANA is **[[iana-rcs|8051]]**. \\ | ||
+ | |||
+ | |||
+ | ==== Only first can control ==== | ||
+ | Prevent secondary clients controlling the Rocrail server; only the first one connected has control.\\ | ||
+ | A better solution is the use of Control or Slave Code. | ||
+ | ==== Control code ==== | ||
+ | The client must provide this control code to get write access if set.\\ | ||
+ | * This overrules the "Only first can control" | ||
+ | * Leave blank for normal use. | ||
+ | * Supported Mobile Clients: | ||
+ | * Rocweb | ||
+ | * andRoc | ||
+ | |||
+ | \\ | ||
+ | =====WIO Watchdog===== | ||
+ | Enables monitoring of WIO reachability. The timeout ist defined in units of 10 ms.\\ | ||
+ | Default: 700 x 10 ms = 7 seconds.\\ | ||
+ | WIOs are sending every 4 seconds an alive message.\\ | ||
+ | ====Exclude==== | ||
+ | Excluding none relevant WIOs can be done as CSV list with IDs.\\ | ||
+ | Ranges are also allowed like: '' | ||
+ | |||
+ | \\ | ||
+ | ===== Slave code ===== | ||
+ | If the slave code is set, and a connected client **cannot** provide this code, the following selected features will be rejected: | ||
+ | * System (Includes automatic and power commands.) | ||
+ | * Shutdown Server | ||
+ | * Switches | ||
+ | * Signals | ||
+ | * Outputs | ||
+ | * Routes | ||
+ | * Locomotives | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |||
+ | ===== SRCP Service ===== | ||
+ | {{ : | ||
+ | Optional service for **[[http:// | ||
+ | The objects addressed by those clients must be defined in the Rocrail track plan.\\ | ||
+ | * http:// | ||
+ | * [[: | ||
+ | ====Device==== | ||
+ | Optional serial device to service SRCP.\\ | ||
+ | Line settings are fixed: | ||
+ | * 115200 bps | ||
+ | * 8N1 | ||
+ | \\ | ||
+ | |||
+ | ===== SNMP Service ===== | ||
+ | Activates the **[[http:// | ||
+ | :!: By default port 161 is used for the SNMP service which requires extra user privilege: \\ | ||
+ | < | ||
+ | OSNMP 0658 SNMP bind | ||
+ | OSocket | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Config ==== | ||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | ==== GetRequest example ==== | ||
+ | Direct ObjectID: | ||
+ | < | ||
+ | $ snmpget -v 2c -c public localhost 1.3.6.1.2.1.1.1.0 | ||
+ | iso.3.6.1.2.1.1.1.0 = STRING: " | ||
+ | </ | ||
+ | Symbolic OjectID: | ||
+ | < | ||
+ | $ snmpget -v2c -c public localhost SNMPv2-MIB:: | ||
+ | SNMPv2-MIB:: | ||
+ | $ snmpget -v2c -c public localhost SNMPv2-MIB:: | ||
+ | SNMPv2-MIB:: | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====Supported commands ==== | ||
+ | * GetRequest | ||
+ | * GetNextRequest | ||
+ | * SetRequest | ||
+ | * BulkRequest | ||
+ | * Trap | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== IANA ==== | ||
+ | {{ : | ||
+ | * Rocrail PEN **[[http:// | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== MIB ==== | ||
+ | // | ||
+ | {{ : | ||
+ | * {{: | ||
+ | === Free MIB Browser === | ||
+ | * http:// | ||
+ | \\ | ||
+ | |||
+ | ==== Traps ==== | ||
+ | * Cold boot | ||
+ | * Link up: new client connection | ||
+ | * Link down: client disconnected | ||
+ | * User: | ||
+ | * Shutdown | ||
+ | * Exception | ||
+ | |||
+ | \\ | ||
+ | =====@Box===== | ||
+ | The location of the __**[[: | ||
+ | |||
+ | \\ | ||
+ | =====MQTT Service===== | ||
+ | Clients can use the __**[[http:// | ||
+ | ^ MQTT Topic ^ Description ^ | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | \\ | ||
+ | The payload of the MQTT messages are in __**[[: | ||
+ | The Rocrail Server uses the __**[[http:// | ||
+ | ====Hostname==== | ||
+ | The DNS name or TCPIP address of the MQTT Broker.\\ | ||
+ | ====Port==== | ||
+ | The service port number of the MQTT Broker.\\ | ||
+ | The default port number used by [[https:// | ||
+ | |||
+ | ====Group==== | ||
+ | //Topic grouping// | ||
+ | Use the Item Names in the Broadcast Topic.\\ | ||
+ | |||
+ | ====User CS Libraries==== | ||
+ | With both topics, //field// and // | ||
+ | |||
+ | ====Clients==== | ||
+ | Only __**[[http:// | ||
+ | Clients may use QoS 0, but we strongly recommend QoS 1.\\ | ||
+ | The only known Client for this service is the command line utility of Mosquitto: | ||
+ | <code bash> | ||
+ | mosquitto_pub -p 60123 -t rocrail/ | ||
+ | </ | ||
+ | Broker response: | ||
+ | <code bash> | ||
+ | 1467710159: New connection from 127.0.0.1. | ||
+ | 1467710159: New client connected from 127.0.0.1 as mosq_pub_2323_rob-Virt. | ||
+ | 1467710159: Sending CONNACK to mosq_pub_2323_rob-Virt (0) | ||
+ | 1467710159: Received PUBLISH from mosq_pub_2323_rob-Virt (d0, q1, r0, m1, ' | ||
+ | 1467710159: Sending PUBACK to mosq_pub_2323_rob-Virt (Mid: 1) | ||
+ | 1467710159: Sending PUBLISH to RocrailService (d0, q1, r0, m1, ' | ||
+ | 1467710159: Received DISCONNECT from mosq_pub_2323_rob-Virt | ||
+ | 1467710159: Received PUBACK from RocrailService (Mid: 1) | ||
+ | 1467710159: Received PUBLISH from RocrailService (d0, q1, r0, m3, ' | ||
+ | 1467710159: Sending PUBACK to RocrailService (Mid: 3) | ||
+ | 1467710159: Received PUBLISH from RocrailService (d0, q1, r0, m4, ' | ||
+ | 1467710159: Sending PUBACK to RocrailService (Mid: 4) | ||
+ | 1467710160: Received PUBLISH from RocrailService (d0, q1, r0, m5, ' | ||
+ | 1467710160: Sending PUBACK to RocrailService (Mid: 5) | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | ====Discovery==== | ||
+ | An UDP Multicast discovery service is also available for other devices which wants to use the same broker.\\ | ||
+ | | Host | 224.0.0.1 | | ||
+ | | Port | 8051 | | ||
+ | |||
+ | The device must send a message withe the following content: | ||
+ | | **BROKER-GET** | | ||
+ | It will get the following reply: | ||
+ | | **BROKER-HOST:< | ||
+ | Both lines ends with a linefeed: '' | ||
+ | |||
+ | \\ | ||
+ | ====Last Will==== | ||
+ | If the Rocrail MQTT-Broker connection get lost, the //Last Will// can be observed in topic '' | ||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | =====Location===== | ||
+ | Location information for calculating sunrise and sunset.\\ | ||
+ | ====Example==== | ||
+ | Speyer(D): | ||
+ | |< >| | ||
+ | | latitude | 49.32083 | | ||
+ | | longitude | 8.43111 | | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||