adding documentation and renaming

This commit is contained in:
2026-04-29 16:28:01 +02:00
parent 92e58253d2
commit 52d00d09f8
7 changed files with 67 additions and 21 deletions
+46
View File
@@ -13,6 +13,52 @@ For a device with 8 outlets
```bash
$ startioc.sh 8
```
# Documentation
## Setters
the stream device expose 4 or 8 individual setters record.
```
$(DEVICE)_set_$(PARAMETER_NAME)_$(PARAMETER_ID)
```
By default, it should look like :
```
ePowerSwitch_get_outlet_0
ePowerSwitch_get_outlet_1
ePowerSwitch_get_outlet_2
ePowerSwitch_get_outlet_3
```
## Getters
The stream device expose 4 or 8 individual getters record named :
```
$(DEVICE)_get_$(PARAMETER_NAME)_$(PARAMETER_ID)
```
By default, it should look like :
```
ePowerSwitch_set_outlet_0
ePowerSwitch_set_outlet_1
ePowerSwitch_set_outlet_2
ePowerSwitch_set_outlet_3
```
Furthermore, a record expose the number of socket of this device
It **should not** be overwrite
```
$(DEVICE)_config_$(CONFIG_PARAMETER_NAME)
```
By default, it should be called
```
ePowerSwitch_config_maxOutlet
```
# Test
TODO
+4 -4
View File
@@ -22,10 +22,10 @@ get8 {
in "M0:O2=%(BB)s";
in "M0:O3=%(CC)s";
in "M0:O4=%(DD)s";
in "M0:O1=%(EE)s";
in "M0:O2=%(FF)s";
in "M0:O3=%(GG)s";
in "M0:O4=%(HH)s";
in "M0:O5=%(EE)s";
in "M0:O6=%(FF)s";
in "M0:O7=%(GG)s";
in "M0:O8=%(HH)s";
disconnect;
}
+3 -2
View File
@@ -1,4 +1,4 @@
record(longout, "$(DEVICE)_config_$(PARAMETER_NAME)") {
record(longout, "$(DEVICE)_config_$(CONFIG_PARAMETER_NAME)") {
field(VAL, "$(OUTLET_NUMBER)")
}
@@ -6,6 +6,7 @@ record(scalcout, "$(DEVICE)_outlet_getter") {
field(DTYP, "stream")
field(SCAN, "1 second")
field(CALC, "0")
field(OUT, "@command.proto get$(OUTLET_NUMBER)($(DEVICE)_get_$(GETTER_OUTPUT_PARAMETER_NAME)) $(PORT)")
field(OUT, "@command.proto get$(OUTLET_NUMBER)() $(PORT)")
field(FLNK, "$(DEVICE)_get_outlet_0")
}
+1 -2
View File
@@ -8,7 +8,6 @@ record(stringout, "$(DEVICE)_set_$(PARAMETER_NAME)_$(PARAMETER_ID)") {
}
record(stringin, "$(DEVICE)_get_$(PARAMETER_NAME)_$(PARAMETER_ID)") {
field(PINI, "NO")
field(INP, "$(DEVICE)_outlet_getter_fanout.$(FANOUT_FIELD_NAME) NPP MS")
field(INP, "$(DEVICE)_outlet_getter.$(SCALCOUT_FIELD_INPUT) NPP MS")
field(FLNK, "$(DEVICE)_get_$(PARAMETER_NAME)_$(FORWARDED_ID)")
}
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
#!bin/bash
#!/bin/bash
if [ $1 -eq 4 -o $1 -eq 8 ]
then
+2 -2
View File
@@ -1,7 +1,7 @@
file socket_record.db
{
pattern
{ DEVICE, PARAMETER_NAME, PARAMETER_ID, FANOUT_FIELD_NAME, FORWARDED_ID}
{ DEVICE, PARAMETER_NAME, PARAMETER_ID, SCALCOUT_FIELD_INPUT, FORWARDED_ID}
{ "ePowerSwitch", "outlet", 0, "AA", 1}
{ "ePowerSwitch", "outlet", 1, "BB", 2}
{ "ePowerSwitch", "outlet", 2, "CC", 3}
@@ -11,6 +11,6 @@ file socket_record.db
file feedback_records.db
{
pattern
{DEVICE, PARAMETER_NAME, OUTLET_NUMBER, GETTER_OUTPUT_PARAMETER_NAME}
{DEVICE, CONFIG_PARAMETER_NAME, OUTLET_NUMBER, GETTER_OUTPUT_PARAMETER_NAME}
{ "ePowerSwitch", "maxOutlet", 4, "outlet"}
}
+10 -10
View File
@@ -1,20 +1,20 @@
file socket_record.db
{
pattern
{ DEVICE, PARAMETER_NAME, PARAMETER_ID}
{ "ePowerSwitch", "outlet", 0 }
{ "ePowerSwitch", "outlet", 1 }
{ "ePowerSwitch", "outlet", 2 }
{ "ePowerSwitch", "outlet", 3 }
{ "ePowerSwitch", "outlet", 4 }
{ "ePowerSwitch", "outlet", 5 }
{ "ePowerSwitch", "outlet", 6 }
{ "ePowerSwitch", "outlet", 7 }
{ DEVICE, PARAMETER_NAME, PARAMETER_ID, SCALCOUT_FIELD_INPUT, FORWARDED_ID}
{ "ePowerSwitch", "outlet", 0, "AA", 1}
{ "ePowerSwitch", "outlet", 1, "BB", 2}
{ "ePowerSwitch", "outlet", 2, "CC", 3}
{ "ePowerSwitch", "outlet", 3, "DD", 4}
{ "ePowerSwitch", "outlet", 4, "EE", 5}
{ "ePowerSwitch", "outlet", 5, "FF", 6}
{ "ePowerSwitch", "outlet", 6, "GG", 7}
{ "ePowerSwitch", "outlet", 7, "HH", 7}
}
file feedback_records.db
{
pattern
{DEVICE, PARAMETER_NAME, OUTLET_NUMBER, GETTER_OUTPUT_PARAMETER_NAME}
{DEVICE, CONFIG_PARAMETER_NAME, OUTLET_NUMBER, GETTER_OUTPUT_PARAMETER_NAME}
{ "ePowerSwitch", "maxOutlet", 8, "outlet"}
}