Status¶
-
class
nifpga.status.
Status
(code, code_string, function_name, argument_names, function_args)[source]¶ Bases:
exceptions.BaseException
-
__init__
(code, code_string, function_name, argument_names, function_args)[source]¶ Base exception class for when an NiFpga function returns a non-zero status.
Parameters: - code (int) – e.g. -52000
- code_string (str) – e.g. ‘MemoryFull’
- function_name (string) – the function that returned the error or warning status. e.g. ‘NiFpga_ConfigureFifo’
- argument_names (list) – a list of the names of the arguments to the function. e.g. [“session”, “fifo”, “requested depth”]
- function_args (tuple) – a tuple of the arguments passed to the function. The order of argument_names should correspond to the order of function_args. e.g. ‘(session, fifo, depth)’
-
__str__
()[source]¶ Returns the function name, status code, and arguments used. Example:
Error: FifoTimeout (-50400) when calling 'Dummy Function Name' with arguments: session: 0xbeef fifo: 0xf1f0L data: 0xda7aL number of elements: 0x100L timeout ms: 0x200L elements remaining: 0x300L a bogus string argument: 'I am a string'
-
-
class
nifpga.status.
WarningStatus
(code, code_string, function_name, argument_names, function_args)[source]¶ Bases:
nifpga.status.Status
,exceptions.RuntimeWarning
Base warning class for when an NiFpga function returns a warning (> 0) status.
Useful if trying to catch warning and error status exceptions separately
-
class
nifpga.status.
ErrorStatus
(code, code_string, function_name, argument_names, function_args)[source]¶ Bases:
nifpga.status.Status
,exceptions.RuntimeError
Base Error class for when an NiFpga function returns an error (< 0) status.
Useful if trying to catch warning and error status exceptions separately