ISISComputingGroup / ISISComputingGroup/IBEX
TPGx00: Further features
- Dominant language
- No language data
- Stars
- 6
- Forks
- 2
- Avg merge
- 16h 40m
- Merged PRs (30d)
- 2
Description
As a developer, there are some further features I'd like to be implemented for the [TPGx00](https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/TPGx00) IOC to ensure its robustness for use with TPG300 and TPG500s.
These concern the use of invalid commands between TPG devices: for example, sending a `UNI,6` to a TPG300, or a `SPB` to a TPG500. This would need to be implemented in two places: the emulator and the Db files:
- Currently, the **emulator** allows all variations of commands from both devices, but `commands` should be redefined to be more general, and have methods defined in each protocol to specify the exact available commands. I.e. instead of
```
commands = {
CmdBuilder("acknowledge_pressure").escape("P").arg("A1|A2|B1|B2").eos().build(),
CmdBuilder("acknowledge_units").escape("UNI").eos().build(),
CmdBuilder("acknowledge_set_units").escape("UNI").escape(",").arg("0|1|2|3|4|5|6").eos().build(),
...
```
we have
```
commands = {
CmdBuilder("acknowledge_pressure").escape("P").arg("A1|A2|B1|B2").eos().build(),
CmdBuilder("acknowledge_units").escape("UNI").eos().build(),
CmdBuilder("acknowledge_set_units").escape("UNI").escape(",").arg(self.get_units_command()).eos().build(),
...
```
where `self.get_units_command()` on a TPG500 would return `"0|1|2|3|4|5|6"` and a 300 would return `"1|2|3|4"` etc.
- On the **database** level, I would like to see `UNITS:SP` and `FUNCTION` being raised to severity `INVALID` if they are assigned a state which is not defined for their model. This is so it is made explicitly clear to scientists who may not be aware of the differences between the models.
- Note: on a TPG300, `UNITS:SP` already goes into alarm if given a value outside of its defined states. This is probably due to the fact it has no defined zero-state, unlike the TPG500 (which defaults to zero so does not raise an `INVALID` alarm).
### Acceptance Criteria
_What is the acceptance criteria?_
- [ ] Illegal commands for each device are rejected by the emulator
- [ ] Values set on PVs `UNITS:SP` and `FUNCTION` raise `INVALID` alarms when illegal for their `UNI` and `SPx` commands respectively
- [ ] Wiki is updated with these changes
- [ ] IOC Tests are written to cover these changes
### Extra Information
- See [TPGx00 | Differences between the 300 and 500](https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/TPGx00#differences-between-the-300-and-500) for a nice overview of the differences between the commands that we're tackling above.
- You can find the manuals on the share; both live in their folders`\ISIS_Experiment_Controls\Manuals\Pfeiffer TPGxxx`. In the manuals titled 'Operating Instructions' you can find the specifications for each command; especially useful to read through the ones for `SPx` and `UNI`.
## How to Test
_verbose instructions for reviewer to test changes
(**Add before making a PR**)_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.