From 5ec2d62b31748c53759cffae44ec12b652ee2c5d Mon Sep 17 00:00:00 2001 From: "Aubry, Kyllian" Date: Tue, 14 May 2024 09:27:34 +0200 Subject: [PATCH] SKA-490 default paths (#18) * SKA-490: update default paths in config files + update README * SKA-490: uncomment gpiochips * SKA-490: feedback took into account --- .gitignore | 2 ++ adapter/README.md | 6 +++--- adapter/demos/DevicesConfig.yaml | 8 ++++---- advalues/README.md | 10 +++++----- advalues/demos/DevicesConfig.yaml | 4 ++-- chardev/README.md | 10 +++++----- chardev/demos/DevicesConfig.yaml | 4 ++-- gpio/README.md | 2 +- 8 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index e3540ed..ac5aaca 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ *.vector /**/.run/ *.out +/adchips/ +/chardevs/ diff --git a/adapter/README.md b/adapter/README.md index a71a463..6eef26f 100644 --- a/adapter/README.md +++ b/adapter/README.md @@ -35,7 +35,7 @@ In order to match the above setup, you need to adapt Linux IO ``path`` attribute # Running the Demos Now is a good point to start the ``sil-kit-registry`` and the ``sil-kit-adapter-generic-linux-io``. In separate terminals: ``` -./path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501' +/path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501' ./bin/sil-kit-adapter-generic-linux-io --log Debug --adapter-configuration ./adapter/demos/DevicesConfig.yaml ``` @@ -78,9 +78,9 @@ First you can start each demo in separte terminals: You should see the following output in the GLIO Adapter window: ``` [2024-02-01 14:44:49.870] [SilKitAdapterGenericLinuxIO] [debug] New value received on toVoltage103 -[2024-02-01 14:44:49.870] [SilKitAdapterGenericLinuxIO] [debug] Updating /home/dev/temp/adchip0/in_voltage103 +[2024-02-01 14:44:49.870] [SilKitAdapterGenericLinuxIO] [debug] Updating ./adchips/adchip0/in_voltage103 [2024-02-01 14:44:55.738] [SilKitAdapterGenericLinuxIO] [debug] New value received on toFifo2 -[2024-02-01 14:44:55.738] [SilKitAdapterGenericLinuxIO] [debug] Updating /home/dev/temp/chardevs/fifo2 +[2024-02-01 14:44:55.738] [SilKitAdapterGenericLinuxIO] [debug] Updating ./chardevs/fifo2 [2024-02-01 14:44:55.738] [SilKitAdapterGenericLinuxIO] [debug] Serializing data and publishing on topic: fromFifo2 [2024-02-01 14:45:01.437] [SilKitAdapterGenericLinuxIO] [debug] New values received on topic: toGpiochip1Line2 [2024-02-01 14:45:01.437] [SilKitAdapterGenericLinuxIO] [debug] Updating gpiochip1 line 2 diff --git a/adapter/demos/DevicesConfig.yaml b/adapter/demos/DevicesConfig.yaml index fc6329e..68f8cf2 100644 --- a/adapter/demos/DevicesConfig.yaml +++ b/adapter/demos/DevicesConfig.yaml @@ -12,7 +12,7 @@ # | `-- direction #  advalues: -- path: "/path/to/adchips/adchip0/" +- path: "./adchips/adchip0/" int16_t: - files: - name: in_voltage103 @@ -22,7 +22,7 @@ advalues: topic_publish: fromVoltage15 - name: out_voltage32 topic_publish: fromVoltage32 -- path: "/path/to/adchips/adchip1/" +- path: "./adchips/adchip1/" uint8_t: - files: - name: PIN12/value @@ -42,9 +42,9 @@ advalues: # /path/to/chardevs/fifo2 # chardevs: -- path: "/path/to/chardevs/fifo1" +- path: "./chardevs/fifo1" topic_publish: fromFifo1 -- path: "/path/to/chardevs/fifo2" +- path: "./chardevs/fifo2" topic_publish: fromFifo2 topic_subscribe: toFifo2 diff --git a/advalues/README.md b/advalues/README.md index f7c37ce..d3cd94e 100644 --- a/advalues/README.md +++ b/advalues/README.md @@ -47,7 +47,7 @@ Each file can also be configured to deal with a specific data type. The handled # Running the Demos Now is a good point to start the ``sil-kit-registry`` and the ``sil-kit-adapter-generic-linux-io``. In separate terminals: ``` -./path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501' +/path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501' ./bin/sil-kit-adapter-generic-linux-io --adapter-configuration ./advalues/demos/DevicesConfig.yaml --log Debug ``` @@ -106,19 +106,19 @@ The GLIO Adapter published the initial values, it means ``3`` is the initial val On the GLIO Adapter terminal you should see two new lines: ``` [2024-01-31 14:49:00.116] [SilKitAdapterGenericLinuxIO] [debug] New value received on toVoltage103 -[2024-01-31 14:49:00.116] [SilKitAdapterGenericLinuxIO] [debug] Updating /home/dev/temp/adchip0/in_voltage103 +[2024-01-31 14:49:00.116] [SilKitAdapterGenericLinuxIO] [debug] Updating ./adchips/adchip0/in_voltage103 ``` In your adchip0 folder you can see the updated value in ``in_voltage103``: ``` -cat /path/to/adchips/adchip0/in_voltage103 +cat ./adchips/adchip0/in_voltage103 3 ``` Then you can update ``out_voltage32``: ``` -echo 2 > /path/to/adchips/adchip0/out_voltage32 -cat /path/to/adchips/adchip0/in_voltage103 +echo 2 > ./adchips/adchip0/out_voltage32 +cat ./adchips/adchip0/in_voltage103 2 ``` diff --git a/advalues/demos/DevicesConfig.yaml b/advalues/demos/DevicesConfig.yaml index e5bf40a..9c93092 100644 --- a/advalues/demos/DevicesConfig.yaml +++ b/advalues/demos/DevicesConfig.yaml @@ -12,7 +12,7 @@ # | `-- direction #  advalues: -- path: "/path/to/adchips/adchip0/" +- path: "./adchips/adchip0/" int16_t: - files: - name: in_voltage103 @@ -22,7 +22,7 @@ advalues: topic_publish: fromVoltage15 - name: out_voltage32 topic_publish: fromVoltage32 -- path: "/path/to/adchips/adchip1/" +- path: "./adchips/adchip1/" uint8_t: - files: - name: PIN12/value diff --git a/chardev/README.md b/chardev/README.md index 9526875..43b3866 100644 --- a/chardev/README.md +++ b/chardev/README.md @@ -34,7 +34,7 @@ In order to match the above setup, you need to adapt the chardev ``path`` attrib # Running the Demos Now is a good point to start the ``sil-kit-registry`` and the ``sil-kit-adapter-generic-linux-io``. In separate terminals: ``` -./path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501' +/path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501' ./bin/sil-kit-adapter-generic-linux-io --log Debug --adapter-configuration ./chardev/demos/DevicesConfig.yaml ``` @@ -91,20 +91,20 @@ The GLIO Adapter published the initial data, it means ``message1`` is the initia On the GLIO Adapter window you should see three new lines: ``` [2024-02-01 10:17:59.853] [SilKitAdapterGenericLinuxIO] [debug] New value received on toFifo2 -[2024-02-01 10:17:59.853] [SilKitAdapterGenericLinuxIO] [debug] Updating /path/to/chardevs/fifo2 +[2024-02-01 10:17:59.853] [SilKitAdapterGenericLinuxIO] [debug] Updating ./chardevs/fifo2 [2024-02-01 10:17:59.853] [SilKitAdapterGenericLinuxIO] [debug] Serializing data and publishing on topic: fromFifo2 ``` In your chardevs folder you can see the updated value in ``fifo2``: ``` -cat /path/to/chardevs/fifo2 +cat ./chardevs/fifo2 message1 ``` Then you can update ``fifo1``: ``` -echo "new message" > /path/to/chardevs/fifo1 -cat /path/to/chardevs/fifo2 +echo "new message" > ./chardevs/fifo1 +cat ./chardevs/fifo2 new message ``` diff --git a/chardev/demos/DevicesConfig.yaml b/chardev/demos/DevicesConfig.yaml index 0829c86..200e4d1 100644 --- a/chardev/demos/DevicesConfig.yaml +++ b/chardev/demos/DevicesConfig.yaml @@ -4,8 +4,8 @@ # /path/to/chardevs/fifo2 # chardevs: -- path: "/path/to/chardevs/fifo1" +- path: "./chardevs/fifo1" topic_publish: fromFifo1 -- path: "/path/to/chardevs/fifo2" +- path: "./chardevs/fifo2" topic_publish: fromFifo2 topic_subscribe: toFifo2 diff --git a/gpio/README.md b/gpio/README.md index fa240c0..0ec228e 100644 --- a/gpio/README.md +++ b/gpio/README.md @@ -52,7 +52,7 @@ By default the GPIO chips are located under ``/dev/gpiochipX`` (with X a number) # Running the Demos Now is a good point to start the ``sil-kit-registry`` and the ``sil-kit-adapter-generic-linux-io``. In separate terminals: ``` -./path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501' +/path/to/SilKit-x.y.z-$platform/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501' ./bin/sil-kit-adapter-generic-linux-io --log Debug --adapter-configuration ./gpio/demos/DevicesConfig.yaml ```