Skip to content

Commit fc0b429

Browse files
committed
better xrefs and adapt sources stored here to new spec
1 parent df898d8 commit fc0b429

File tree

4 files changed

+43
-46
lines changed

4 files changed

+43
-46
lines changed

secop_sphinx.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@ def handle_signature(self, sig, signode):
1616
signode.insert(0, addnodes.desc_addname('', 'Property',
1717
addnodes.desc_sig_space()))
1818
if self.name == 'node-property':
19-
fullname = 'node:' + fullname
19+
fullname = 'node.' + fullname
2020
elif self.name == 'mod-property':
21-
fullname = 'mod:' + fullname
21+
fullname = 'mod.' + fullname
2222
return fullname, prefix
2323

2424
def get_index_text(self, modname, name_cls):
25+
name = name_cls[0].rpartition('.')[2]
2526
if self.name == 'node-property':
26-
return '%s (node property)' % name_cls[0]
27+
return f'{name} (node property)'
2728
elif self.name == 'mod-property':
28-
return '%s (module property)' % name_cls[0]
29+
return f'{name} (module property)'
2930
elif self.name == 'acc-property':
30-
return '%s (accessible property)' % name_cls[0]
31+
return f'{name} (accessible property)'
3132
else:
32-
return '%s (property)' % name_cls[0]
33+
return f'{name} (property)'
3334

3435

3536
class Parameter(PyVariable):

source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
# -- General configuration ---------------------------------------------------
3636

3737
default_role = 'obj'
38+
nitpicky = True
3839

3940
highlight_language = 'secop'
4041

source/getting-started/first-use.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ Talking to a SEC node
1717

1818
So you have never used SECoP, and want to interact with a node? For exploring
1919
the protocol, all you need is a program that can talk tcp or serial, depending
20-
on your device. Connect to your device and send the :ref:`identification
21-
message <message-identification>` ``*IDN?`` to start communication ('>' and '<'
22-
show who is sending the message):
20+
on your device. Connect to your device and send the `*IDN?` identification
21+
message to start communication ('>' and '<' show who is sending the message):
2322

2423
.. code::
2524
@@ -30,7 +29,7 @@ speak:
3029

3130
.. code::
3231
33-
< ISSE,SECoP,V2019-09-16,v1.0
32+
< ISSE,SECoP,,v2.0
3433
3534
Great! So we know that we are talking to something that knows SECoP, but we do
3635
not know yet what we are talking to. That is what we will find out with next
@@ -265,8 +264,8 @@ module.
265264
The ``accessibles`` field lists all parameters that are defined on the module
266265
and can be accessed over SECoP. In the block above, you can see ``value`` and
267266
``status`` two parameters which almost all modules will have. The precise
268-
semantics of all such parameters are defined in :ref:`the specification
269-
<accessibles>`.
267+
semantics of all such parameters are defined in :doc:`the specification
268+
</specification/accessibles>`.
270269

271270
The value is the current value of the module, and the status is a two-element
272271
tuple of a status code and a message that can give more information about the
@@ -333,8 +332,8 @@ knowledge, we can interact with specific parts of it.
333332
Reading values
334333
^^^^^^^^^^^^^^
335334

336-
The most basic command to access a module is the :ref:`read <message-read>`
337-
message, where we can retrieve the value of a parameter:
335+
The most basic command to access a module is the `read` message, where we can
336+
retrieve the value of a parameter:
338337

339338
.. code::
340339
@@ -351,7 +350,7 @@ Writing values
351350
^^^^^^^^^^^^^^
352351

353352
If we want to set a value, for example the ``_maxheaterpower`` of the ``heater``
354-
we can use the :ref:`change <message-change>` message:
353+
we can use the `change` message:
355354

356355
.. code::
357356
@@ -375,7 +374,7 @@ error string giving more information, and some qualifiers (in this case, none).
375374
Running commands
376375
^^^^^^^^^^^^^^^^
377376

378-
Running a command is done with the :ref:`do <message-do>` message:
377+
Running a command is done with the `do` message:
379378

380379
.. code::
381380
@@ -400,8 +399,8 @@ have a look at the status. It will go ``BUSY`` until the change is done. When
400399
it returns to ``IDLE`` then the action is finished.
401400

402401
The other commands won't be discussed here, but as a pointer have a look at
403-
:ref:`activate <message-activate>` which enables asynchronous mode. That gives
404-
you a stream of updates for all parameters of a SEC node without polling.
402+
`activate` which enables asynchronous mode. That gives you a stream of updates
403+
for all parameters of a SEC node without polling.
405404

406405

407406
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

source/getting-started/with-shall.rst

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,39 @@ Getting started: SHALL-LabVIEW
33

44
This section will give you an overview of the SHALL-LabVIEW integration for SECoP
55

6-
The package allows the creation of SEC nodes in LabVIEW. It's interface is designed
7-
to be easily integrated into existing projects. The package uses the
8-
`SHALL <https://github.com/SampleEnvironment/SHALL>`_ libraries at its core to handle
6+
The package allows the creation of SEC nodes in LabVIEW. It's interface is designed
7+
to be easily integrated into existing projects. The package uses the
8+
`SHALL <https://github.com/SampleEnvironment/SHALL>`_ libraries at its core to handle
99
all SECoP communication and message handling.
1010

11-
**Note: The VIs in this project have been built using LabVIEW 2023. The Releases
11+
**Note: The VIs in this project have been built using LabVIEW 2023. The Releases
1212
are also available for LabVIEW2019 in the Release Assets.**
1313

1414
Installation
1515
------------
1616

17-
1. Getting the Source
17+
1. Getting the Source
1818
~~~~~~~~~~~~~~~~~~~~~
1919

20-
You can either clone the project directly, which will give you the latest version of
21-
the project, or select a `Release <https://github.com/SampleEnvironment/SHALL-LabVIEW/releases>`_ ,
20+
You can either clone the project directly, which will give you the latest version of
21+
the project, or select a `Release <https://github.com/SampleEnvironment/SHALL-LabVIEW/releases>`_ ,
2222
where you can also download a version that has been exported for LabVIEW 2019.
2323

2424
Clone the Repository:
2525
.. code:: bash
26-
26+
2727
git clone https://github.com/SampleEnvironment/SHALL-LabVIEW.git
2828
29-
Depending on your LabVIEW version you will able to use the Project as is, or export it
30-
for the specific version of LabVIEW you have installed.
29+
Depending on your LabVIEW version you will able to use the Project as is, or export it
30+
for the specific version of LabVIEW you have installed.
3131

32-
2. Setting Up the Platforms Folder
32+
2. Setting Up the Platforms Folder
3333
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3434

35-
In order for the Qt libraries to work properly, a **softlink** must be created to the **platforms** folder
36-
(``PLATFORMS_PATH = ./shall-labview/[32bit|64bit]/platforms``) inside your LabVIEW installation directory.
35+
In order for the Qt libraries to work properly, a **softlink** must be created to the **platforms** folder
36+
(``PLATFORMS_PATH = ./shall-labview/[32bit|64bit]/platforms``) inside your LabVIEW installation directory.
3737

38-
First, determine if you have the 32-bit or 64-bit version of LabVIEW installed. And where the installation
38+
First, determine if you have the 32-bit or 64-bit version of LabVIEW installed. And where the installation
3939
directory is. From here on I will refer to the installation directory as ``LABVIEW_PATH``:
4040

4141
- **32bit** is usually located under:
@@ -52,46 +52,42 @@ Next you also need the path ``PLATFORMS_PATH`` to the correct platforms folder :
5252

5353
Finally, create the symbolic link inside the LabVIEW installation directory
5454

55-
.. code::
55+
.. code::
5656
5757
mklink /d LABVIEW_PATH\platforms PLATFORMS_PATH
5858
59-
3. Check your installation
59+
3. Check your installation
6060
~~~~~~~~~~~~~~~~~~~~~~~~~~
6161

62-
To check if your installation was successful, you can open the ``SECoP.lvproj`` project file and
63-
open ``random-demo/dcy03.vi`` before running the VI, the correct DLL path must be entered.
62+
To check if your installation was successful, you can open the ``SECoP.lvproj`` project file and
63+
open ``random-demo/dcy03.vi`` before running the VI, the correct DLL path must be entered.
6464

6565

6666

6767

68-
It is the same as `PLATFORMS_PATH` minus the `/platforms` postfix.
68+
It is the same as ``PLATFORMS_PATH`` minus the ``/platforms`` postfix.
6969
It should look something like this:
7070

7171
.. image:: https://github.com/user-attachments/assets/8659c9a4-fd4a-4949-a38d-d4110855eadf
7272

7373

74-
.. code::
74+
.. code::
7575
7676
D:\shall-repos\shall-labview\64bit
7777
7878
or
7979

80-
.. code::
81-
80+
.. code::
81+
8282
D:\shall-repos\shall-labview\32bit
8383
8484
85-
If you entered the DLL path correctly and run the Vi, a small `SECoP Status` window should open.
85+
If you entered the DLL path correctly and run the Vi, a small "SECoP Status" window should open.
8686

8787

8888

8989
Creating a SEC Node
9090
-------------------
9191

92-
For a detailed tutorial on how to create and manage SEC nodes using SHALL-LabVIEW
92+
For a detailed tutorial on how to create and manage SEC nodes using SHALL-LabVIEW
9393
please refer to the SHALL-LabVIEW `Wiki <https://github.com/SampleEnvironment/SHALL-LabVIEW/wiki>`_.
94-
95-
96-
97-

0 commit comments

Comments
 (0)