scpi_commands
¶
A collection of classes and other helpful objects to use when generating SCPI drivers.
THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.
Please report an issue if one is found.
DefaultDictDeviceCommunication
¶
Bases: ParentDefaultDictClass
A custom default dictionary that can be used to send/receive commands to/from a device.
The .query() method is used when __getitem__() is called and the result of the query is
returned instead of a standard value.
The .write() method is used when __setitem__() is called.
SCPICmdRead
¶
Bases: BaseSCPICmd
A class defining a queryable SCPI command.
query
¶
query() -> str
Return the result of the SCPI query.
Sends the query .cmd_syntax + '?'.
This method will query the device using the device.query() method and return the result
after stripping out leading and trailing whitespace.
| Returns: |
|
|---|
| Raises: |
|
|---|
verify
¶
Verify the return value from the SCPI query matches the value.
Sends the query .cmd_syntax + '?'.
This method will use the device.query_response() method to verify that the value
returned by the device matches the expected value. An AssertionError will be raised by
default if the values don’t match.
| Parameters: |
|---|
| Returns: |
|---|
| Raises: |
|
|---|
SCPICmdReadWithArguments
¶
Bases: BaseSCPICmd
A class defining a SCPI command that can be queried with arguments.
query
¶
Return the result of the SCPI query.
Sends the query .cmd_syntax + '? argument'.
This method will query the device using the device.query() method and return the result
after stripping out leading and trailing whitespace.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
verify
¶
Verify the return value from the SCPI query matches the value.
Sends the query .cmd_syntax + '? argument'.
This method will use the device.query_response() method to verify that the value
returned by the device matches the expected value. An AssertionError will be raised by
default if the values don’t match.
| Parameters: |
|---|
| Returns: |
|---|
| Raises: |
|
|---|
SCPICmdWrite
¶
Bases: BaseSCPICmd
A class defining a writable SCPI command.
write
¶
Send the SCPI command (.cmd_syntax) with the provided value to the device.
| Parameters: |
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
SCPICmdWriteNoArguments
¶
Bases: BaseSCPICmd
A class defining a writable SCPI command which doesn’t have any arguments.
write
¶
write() -> None
Send the SCPI command (.cmd_syntax) to the device.
This method will use the device.write() method to send the command.
| Raises: |
|
|---|
ValidatedChannel
¶
Bases: BaseCmd
A mixin class that is used to validate the channel is valid.
This class checks the channel number (or string) at the end of the syntax (.cmd_syntax
attribute) to determine if it is a valid channel number (within the range of the available
channels on the device).
ValidatedDigitalBit
¶
Bases: BaseSCPICmd
A mixin class that is used to validate the digital bit is valid.
This class checks the digital bit number at the end of the SCPI syntax (.cmd_syntax
attribute) to determine if it is a valid digital bit number (within the range of 0 to the
maximum number of digital bits on the device).