Default IPowerSupply functions should throw an error instead of print a warning
The default implementations of power supply control in IPowerSupply
currently print a "not supported warning". This might not be the best choice and potentially dangerous, because a lot of the functionality is core and missing implementations might break future results.
For example, IPowerSupply::isOn
can return false
by default if not implemented. This can lead to dangerous results if the result is used to determine the next stage (ie: change voltage only if off).
The proposal is for the default implementation to throw an error to terminate the program if it is using an unimplemented functionality.
Another alternative is to make the core functions pure virtual and require all power supplies to implement them.