|
|
|
|
|
SrcpThe Simple Railroad Control Protocol, SRCP, is a TCP/IP protocol intended to cover all aspects of model railroading. It is ASCII-based and follows a strict command-response schema. In the world of SRCP, the server is the interface to the model railway system. Clients connect to the server and receive information about the state of any component (including the server) and sends commands to change the state of any component. While SRCP is fully multiuser, components may be locked to specific client sessions to prevent conflicts. SRCP defines an abstract layer above the model railroad system that is used to mask the differences between the various hardware providers such as DCC or MarklinMotorola. Client developers are not required to know which signalling types are being used. Even if a complete new system comes up: once a SRCP server implements it, any SRCP client can be used without any change. SRCP consists of command words and devices, on which the commands operate. Command words are SET, GET, WAIT, VERIFY, RESET, INIT and TERM. The most important devices are locomotive decoders (GL generic loco), impulse decoders (GA generic accessoire) and feedback sensors. To address decoder programming so-called Service Mode devices are defined. All components are structured in busses, which basically bundle components which are accessible through a shared device (e.g. a central unit). These busses will also be used to segment the adress space. One basic feature of SRCP is that it never changes the hardware address. E.g. can the NMRA "short" addresses and the "long" addresses be structured into two independent busses. It is the responsibility of the server developer to properly define the bus structure. A client developer is required to ensure that the address of any component contains two elements. Not all components exists on all systems. To get initial information, the server can inform the client about all devices it knows about. Some functionality can even be emulated by the server, if the target does not support the requested feature (e.g. get current speed: many railroad systems do not support this operation). Another feature allows it to be used as a central time source. SRCP contains a time "device", which keeps all clients with a current model time. This time can run at any ratio to the real time: 6 real time minutes can be 1 model hour. SRCP has evolved over time. The first usable revision, currently outdated, was called 0.7.3. It works well and numerous programs continue to use it. Developers are encouraged to use the current version, 0.8.2, which has stable for over a year. The most recent version is called 0.8.3-wip, which contains a few enhancements. They are not yet formally correct and may contain errors or can be changed in the future. Future versions of SRCP are intended to maintain compatibility with the current 0.8 specification. A client can request a special SRCP version during the initial handshake. The discussion around SRCP runs in the German newsgroup de.rec.modelle.bahn.
|
 |
|
| Copyright 2005-2009 OnPedia.com. All Rights Reserved |
|
|