I am currently attempting to extend the Scpi class to create a custom step that will return the query response as an output. Right now, I am just testing with returning a hard-coded value while maintaining the normal functionality of the original Scpi class. This is my code:
@attribute(OpenTap.Display("SCPI Query", "Returns SCPI response", "Custom"))
class SCPIQuery(Scpi):
# This is the output property that will be used by other steps
ReturnValue = property(String,"Test")\
.add_attribute(Display("Return Value", "", "Output", 0))\
.add_attribute(Output())
def __init__(self):
super().__init__()
def Run(self):
super().Run()
self.ReturnValue = self.ReturnValue + "10"
This is the log result:
How do I properly extend the Scpi class and use it in my Python plugin?