Modules | |
ErrorCodes-Py | |
Proxy values for underlying C values from ErrorCodes. | |
ErrorExceptionMap-Py | |
This maps error return codes to the corresponding python exception. | |
HopRateSettings-Py | |
Proxy values for underlying C values from HopRateSettings. | |
AttenuationSettings-Py | |
Proxy values for underlying C values from AttenuationSettings. | |
TaskState-Py | |
Proxy values for underlying C values from TaskState. | |
SParameterSelector-Py | |
Proxy values for underlying C values from SParameterSelector. | |
CalibrationStepSelector-Py | |
Proxy values for underlying C values from CalibrationStep. | |
Data Structures | |
class | HardwareDetails |
CTypes proxy for the HardwareDetails struct. More... | |
class | RAW_VNA |
Minimal wrapper for the VNA Dll. More... | |
Functions | |
def | ComplexDataFactory |
Factory function for creating ctypes-compatible ComplexData array class definitions. More... | |
def | ComplexDataArrayFromNumpyArray |
def | DoubleArrayFactory |
Factory function for creating ctypes-compatible double-array class definitions. More... | |
def | versionString |
Returns a string describing the version of the DLL and its components. More... | |
Variables | |
dictionary | __doubleArrayDefinitions |
dictionary | __complexDataDefinitions |
This is the "basic" API wrapper for the AKELA VNA interface. It's basically a thin layer over the underlying C API, doing only basic type conversion of some of the more involved data-structures.
Functionally, all calls here act almost identically to how the corresponding functions in the C-API behave.
If you want a cleaner, more pythonic interface, please use the Python-OOP-API class, which tries to hide the underlying complexity as much as possible.
def VNA.vnalibrary.ComplexDataFactory | ( | data_len | ) |
Factory function for creating ctypes-compatible ComplexData array class definitions.
Due to some vagaries of how the parameter-type validation works in ctypes, this must be a factory function rather then a class definition.
This factory uses some global-state tricks to ensure that only one instance of each array-length-n class definition exists, which is required to keep ctypes happy.
This function is idempotent.
data_len | Length of complex data array (integer) |
data_len
This function will generally be chain-called, e.g.:
ComplexDataFactory(5)()
The first call (5)
creates the class definition for a ComplexData array with a length of 5. The second call ()
instantiates a instance of that class definition.
Idempotency guarantees that ComplexDataFactory(5) == ComplexDataFactory(5)
, as if there was not some internal state, it would construct two different class defintions with the same properties, and then the parameter/return type checking in ctypes
would throw errors as the classes would not compare as equal.
def VNA.vnalibrary.DoubleArrayFactory | ( | data_len | ) |
Factory function for creating ctypes-compatible double-array class definitions.
Due to some vagaries of how the parameter-type validation works in ctypes, this must be a factory function rather then a class definition.
This factory uses some global-state tricks to ensure that only one instance of each array-length-n class definition exists, which is required to keep ctypes happy.
This function is idempotent.
data_len | Length of data array (integer) |
data_len
This function will generally be chain-called, e.g.:
DoubleArrayFactory(5)()
The first call (5)
creates the class definition for a double array with a length of 5. The second call ()
instantiates a instance of that class definition.
Idempotency guarantees that DoubleArrayFactory(5) == DoubleArrayFactory(5)
, as if there was not some internal state, it would construct two different class defintions with the same properties, and then the parameter/return type checking in ctypes
would throw errors as the classes would not compare as equal.
This function, and ComplexDataFactory() are basically identical in function, except the type they return.
def VNA.vnalibrary.versionString | ( | ) |
Returns a string describing the version of the DLL and its components.