Skip to content

Commit 4d7d33a

Browse files
authored
Merge pull request DCC-EX#177 from DCC-EX/sphinx
catchup
2 parents 0874e5d + 24f3bde commit 4d7d33a

7 files changed

Lines changed: 116 additions & 10 deletions

File tree

docs/include/include-l0.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464

6565
<span class="ex-suffix">TrackManager</span>
6666
..
67+
.. |DCC-EXP| raw:: html
68+
69+
<a href="./throttles/native-protocol-library.html"><span class="dccex-suffix">DCCEX</span><span class="dccex-prefix">Protocol</span></a>
70+
..
6771
.. ................................................
6872
..
6973
.. |EX-CSB1-LOGO-SMALL| image:: /_static/images/logos/product-logo-ex-csb1.png

docs/include/include-l1.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464

6565
<span class="ex-suffix">TrackManager</span>
6666
..
67+
.. |DCC-EXP| raw:: html
68+
69+
<a href="../throttles/native-protocol-library.html"><span class="dccex-suffix">DCCEX</span><span class="dccex-prefix">Protocol</span></a>
70+
..
6771
.. ................................................
6872
.. |EX-CSB1-LOGO-SMALL| image:: /_static/images/logos/product-logo-ex-csb1.png
6973
:alt: EX-CSB1 Logo

docs/include/include-l2.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464

6565
<span class="ex-suffix">TrackManager</span>
6666
..
67+
.. |DCC-EXP| raw:: html
68+
69+
<a href="../../throttles/native-protocol-library.html"><span class="dccex-suffix">DCCEX</span><span class="dccex-prefix">Protocol</span></a>
70+
..
6771
.. ................................................
6872
..
6973
.. |EX-CSB1-LOGO-SMALL| image:: /_static/images/logos/product-logo-ex-csb1.png

docs/include/include-l3.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464

6565
<span class="ex-suffix">TrackManager</span>
6666
..
67+
.. |DCC-EXP| raw:: html
68+
69+
<a href="../../../throttles/native-protocol-library.html"><span class="dccex-suffix">DCCEX</span><span class="dccex-prefix">Protocol</span></a>
70+
..
6771
.. ................................................
6872
..
6973
.. |EX-CSB1-LOGO-SMALL| image:: /_static/images/logos/product-logo-ex-csb1.png

docs/news/posts/20250313.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
.. include:: /include/include.rst
2+
.. include:: /include/include-l2.rst
3+
.. include:: /include/include-news.rst
4+
5+
:blogpost: true
6+
:date: 13 March, 2025
7+
:author: peteGSX
8+
:category: News
9+
:tags: release, dcc-ex, news, dccexprotocol
10+
:image: 0
11+
12+
.. image:: /_static/images/logos/product-logo-news.png
13+
:alt: DCC-EX News
14+
:scale: 40%
15+
:class: image-product-logo-float-right
16+
17+
|NATIVE-PROTOCOL_LIBRARY-LOGO|
18+
19+
Announcing DCCEXProtocol Library 1.2.0
20+
======================================
21+
22+
We've released the latest version of the |DCC-EXP| library version 1.2.0 today.
23+
24+
This release adds the ability to read/write CVs on both the main and programming tracks:
25+
26+
- handOffLoco(locoAddress, automationId)
27+
28+
- Use this to send a loco to an EXRAIL automation.
29+
- You must enable retrieving routes, and the automationId must match a valid EXRAIL automation ID to work.
30+
31+
- readCV(cv) and validateCV(cv, value)
32+
33+
- Read or validate a CV for a loco on the programming track.
34+
- The associated delegate method to implement is receivedValidateCV(int cv, int value) as both return the same response.
35+
36+
- writeLocoAddress(address)
37+
38+
- Write the provided address to a loco on the programming track.
39+
- The associated delegate method to implement is receivedWriteLoco(int address).
40+
41+
- validateCVBit(cv, bit, value)
42+
43+
- Validate the specified bit of a CV for a loco on the programming track.
44+
- The associated delegate method to implement is receivedValidateCVBit(int cv, int bit, int value).
45+
46+
- writeCV(cv, value)
47+
48+
- Write a CV to a loco on the programming track.
49+
- The associated delegate method to implement is receivedWriteCV(int cv, int value).
50+
51+
- writeCVBit(cv, bit, value)
52+
53+
- Write the specified value to the specified bit of a CV to a loco on the programming track.
54+
- There is no delegate method to implement for the response for this due to parser limitations, and we recommend writing full CVs.
55+
56+
- writeCVOnMain(address, cv, value)
57+
58+
- Write to the specified CV to the specified loco on the main track.
59+
60+
- writeCVBitOnMain(address, cv, bit, value)
61+
62+
- Write to the specified bit and CV to the specified loco on the main track.

docs/reference/software/command-summary-consolidated.rst

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ Writing CVs - Program on the main
12971297
|_| > **bit:** ??? |BR|
12981298
|_| > **value:** The value to be written to the Configuration Variable memory location (0-255)
12991299

1300-
*Response:* ???
1300+
*Response:* N/A
13011301

13021302
|hr-dashed|
13031303

@@ -1338,13 +1338,14 @@ By design, for safety reasons, the NMRA specification prevents locos from respon
13381338
|_| > **cv:** CV number
13391339

13401340
*Response:* |BR|
1341-
|_| ``<r cv value>`` |BR|
1342-
|_| > **cv:** The number of the Configuration Variable memory location in the decoder to write to (1-1024) |BR|
1341+
|_| ``<v cv value>`` |BR|
1342+
|_| > **cv:** The number of the Configuration Variable memory location in the decoder (1-1024) |BR|
13431343
|_| > **value:** one of |BR|
13441344
|_| |_| |_| |_| • value of the CV |BR|
13451345
|_| |_| |_| |_| • -1: if the write failed
13461346

1347-
*Example:* ``<r 3450>`` shows that Loco with ID **3450** is on the programming track.
1347+
*Example:* ``<v 1 3>`` shows that the value ``3`` is stored in CV ``1``. |BR|
1348+
*Example:* ``<v 1 -1>`` shows that reading the value stored in CV ``1`` failed.
13481349

13491350
|hr-dashed|
13501351

@@ -1384,9 +1385,17 @@ By design, for safety reasons, the NMRA specification prevents locos from respon
13841385
|_| |_| |_| |_| • 0=off
13851386

13861387
*Response:* |BR|
1387-
|_| Response (successful): **0 | 1** |BR|
1388-
|_| Response (fail): **<V -1>**
1388+
|_| ``<v cv bit onOff>`` |BR|
1389+
|_| > **cv:** CV number |BR|
1390+
|_| > **bit:** bit to verify in the CV |BR|
1391+
|_| > **onOff:** one of |BR|
1392+
|_| |_| |_| |_| • 1=on |BR|
1393+
|_| |_| |_| |_| • 0=off |BR|
1394+
|_| |_| |_| |_| • -1=error
13891395

1396+
*Example:* ``<v 1 3 1>`` shows that the value ``1`` is stored in bit ``3`` of CV ``1``. |BR|
1397+
*Example:* ``<v 1 3 -1>`` shows verifying the value stored in bit ``3`` of CV ``1`` failed.
1398+
13901399
*Notes:*
13911400

13921401
This command is designed to offer faster verification of the value held in a CV and can be used instead of the ``<R>`` commands. Instead of reading a bit value, it compares the bit to an expected value. It will attempt to verify the value first, an if it is successful, will return the value as if it was simply “read”. If the verify fails, it will perform a read bit command (see above) and return the value read.
@@ -1408,7 +1417,10 @@ By design, for safety reasons, the NMRA specification prevents locos from respon
14081417
|_| > **cv:** CV number |BR|
14091418
|_| > **value:** one of |BR|
14101419
|_| |_| |_| |_| • actual value of the CV |BR|
1411-
|_| |_| |_| |_| • -1: if the write failed
1420+
|_| |_| |_| |_| • -1: if the verify failed
1421+
1422+
*Example:* ``<v 1 3>`` shows that the value ``3`` is stored in CV ``1``. |BR|
1423+
*Example:* ``<v 1 -1>`` shows verifying the value stored in CV ``1`` failed.
14121424

14131425
*Notes:*
14141426

@@ -1428,7 +1440,20 @@ By design, for safety reasons, the NMRA specification prevents locos from respon
14281440
|_| |_| |_| |_| • 1=on |BR|
14291441
|_| |_| |_| |_| • 0=off
14301442

1431-
*Response:* ???
1443+
*Response:* |BR|
1444+
|_| ``<r0|0|cv bit onOff>`` |BR|
1445+
|_| > **cv:** CV number |BR|
1446+
|_| > **bit:** bit changed |BR|
1447+
|_| > **onOff:** one of |BR|
1448+
|_| |_| |_| |_| • 0|1 |BR|
1449+
|_| |_| |_| |_| • -1: if the write failed
1450+
1451+
*Example:* ``<r0|0|1 3 1>`` shows that the value ``1`` was written to bit ``3`` of CV ``1``. |BR|
1452+
*Example:* ``<r0|0|1 3 -1>`` shows that writing to bit ``3`` of CV ``1`` failed.
1453+
1454+
*Notes:*
1455+
1456+
The response is a legacy DCC++ formatted response that is hard to parse, and it is recommended to write full CVs where possible.
14321457

14331458
|hr-dashed|
14341459

@@ -1442,12 +1467,15 @@ By design, for safety reasons, the NMRA specification prevents locos from respon
14421467
|_| > **value:** value to change the CV to
14431468

14441469
*Response:* |BR|
1445-
|_| ``<w cv value>`` |BR|
1470+
|_| ``<r cv value>`` |BR|
14461471
|_| > **cv:** CV number |BR|
14471472
|_| > **value:** one of |BR|
14481473
|_| |_| |_| |_| • value CV was changed to |BR|
14491474
|_| |_| |_| |_| • -1: if the write failed
14501475

1476+
*Example:* ``<r 1 3>`` shows that the value ``3`` was written to CV ``1``. |BR|
1477+
*Example:* ``<r 1 -1>`` shows writing a value to CV ``1`` failed.
1478+
14511479
|hr-dashed|
14521480

14531481
.. _native-command-w-address:

docs/throttles/native-protocol-library.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ A DCC-EX Native command protocol library is available to help develop throttle a
1313

1414
The library implements the DCC-EX Native command protocol (as used in the |DCC-EX| |EX-CS| ONLY), allowing a device to connect to the server and act as a client (such as a hardware based throttle).
1515

16-
Details of the library, including instructions and examples, `is available here <https://dcc-ex.com/DCCEXProtocol/index.html>`_ |EXTERNAL-LINK|.
16+
Details of the library, including instructions and examples, `is available here <https://dcc-ex.com/DCCEXProtocol/index.html>`__ |EXTERNAL-LINK|.

0 commit comments

Comments
 (0)