All,
I would like to get an opinion from you all about whether these “architectures” are appropriate for StreamDevice. I’ve been looking at some posts on Tech-Talk about the general use for StreamDevice, specifically when there are multiple
commands. Suppose I need to implement EPICS drivers for an instrument that has two commands: cmd1, cmd2, and cmd3. Here are some “architectures” I’ve tried and used:
- “Processing chain” method
record(ao, “cmd_1_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd1 $(PORT)”)
field(FLNK, “cmd_1_get”)
}
record(ao, “cmd_2_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd2 $(PORT)”)
field(FLNK, “cmd_2_get”)
}
record(ao, “cmd_3_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd3 $(PORT)”)
field(FLNK, “cmd_3_get”)
}
record(ai, “cmd_1_get”)
{
field(SCAN, “1 second”)
field(INP, “@instrument.proto getCmd1 $(PORT)”)
field(FLNK, “cmd_2_get”)
}
record(ai, “cmd_2_get”)
{
field(SCAN, “Passive”)
field(INP, “@instrument.proto getCmd2 $(PORT)”)
field(FLNK, “cmd_3_get”)
}
record(ai, “cmd_3_get”)
{
field(SCAN, “Passive”)
field(INP, “@instrument.proto getCmd3 $(PORT)”)
}
- Fanout method
record(fanout, “slow_scan”)
{
field(SCAN, “1 second”)
field(LNK0, “cmd_1_get”)
field(LNK1, “cmd_2_get”)
field(LNK2, “cmd_3_get”)
}
record(ao, “cmd_1_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd1 $(PORT)”)
field(FLNK, “cmd_1_get”)
}
record(ao, “cmd_2_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd2 $(PORT)”)
field(FLNK, “cmd_2_get”)
}
record(ao, “cmd_3_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd3 $(PORT)”)
field(FLNK, “cmd_3_get”)
}
record(ai, “cmd_1_get”)
{
field(SCAN, “Passive”)
field(INP, “@instrument.proto getCmd1 $(PORT)”)
}
record(ai, “cmd_2_get”)
{
field(SCAN, “Passive”)
field(INP, “@instrument.proto getCmd2 $(PORT)”)
}
record(ai, “cmd_3_get”)
{
field(SCAN, “Passive”)
field(INP, “@instrument.proto getCmd3 $(PORT)”)
}
- Record scan method
record(ao, “cmd_1_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd1 $(PORT)”)
}
record(ao, “cmd_2_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd2 $(PORT)”)
}
record(ao, “cmd_3_set”)
{
field(SCAN, “Passive”)
field(DTYP, “stream”)
field(OUT, “@instrument.proto setCmd3 $(PORT)”)
}
record(ai, “cmd_1_get”)
{
field(SCAN, “1 second”)
field(INP, “@instrument.proto getCmd1 $(PORT)”)
}
record(ai, “cmd_2_get”)
{
field(SCAN, “1 second”)
field(INP, “@instrument.proto getCmd2 $(PORT)”)
}
record(ai, “cmd_3_get”)
{
field(SCAN, “1 second”)
field(INP, “@instrument.proto getCmd3 $(PORT)”)
}
Are all valid or is there one that is better than the other. Or is there an even better one that I haven’t thought of…
Thanks,
Andy
|