moler.cmd.scpi.scpi package¶
Submodules¶
moler.cmd.scpi.scpi.exit_telnet module¶
Exit telnet command
-
class
moler.cmd.scpi.scpi.exit_telnet.
ExitTelnet
(connection, newline_chars=None, prompt=None, runner=None, expected_prompt='moler_bash#', set_timeout=None, set_prompt=None, target_newline='n', allowed_newline_after_prompt=False, prompt_after_login=None)¶
moler.cmd.scpi.scpi.genericscpistate module¶
SCPI generic module for commands in state SCPI.
-
class
moler.cmd.scpi.scpi.genericscpistate.
GenericScpiState
(connection, prompt=None, newline_chars=None, runner=None)¶
moler.cmd.scpi.scpi.idn module¶
SCPI command idn module.
-
class
moler.cmd.scpi.scpi.idn.
Idn
(connection, prompt=None, newline_chars=None, runner=None)¶ Bases:
moler.cmd.scpi.scpi.genericscpistate.GenericScpiState
-
build_command_string
()¶ Returns string with command constructed with parameters of object.
Returns: String with command.
-
on_new_line
(line, is_full_line)¶ Method to parse command output. Will be called after line with command echo. Write your own implementation but don’t forget to call on_new_line from base class in most cases.
Parameters: - line – Line to parse, new lines are trimmed
- is_full_line – True if new line character was removed from line, False otherwise
Returns: None
-
moler.cmd.scpi.scpi.read module¶
SCPI command READ.
-
class
moler.cmd.scpi.scpi.read.
Read
(connection, prompt=None, newline_chars=None, runner=None)¶ Bases:
moler.cmd.scpi.scpi.genericscpistate.GenericScpiState
-
build_command_string
()¶ Returns string with command constructed with parameters of object.
Returns: String with command.
-
on_new_line
(line, is_full_line)¶ Method to parse command output. Will be called after line with command echo. Write your own implementation but don’t forget to call on_new_line from base class in most cases.
Parameters: - line – Line to parse, new lines are trimmed
- is_full_line – True if new line character was removed from line, False otherwise
Returns: None
-
moler.cmd.scpi.scpi.run_command module¶
SCPI command to support command without interesting output.
-
class
moler.cmd.scpi.scpi.run_command.
RunCommand
(connection, command, error_regex=re.compile('ERROR', re.IGNORECASE), prompt=None, newline_chars=None, runner=None)¶ Bases:
moler.cmd.scpi.scpi.genericscpistate.GenericScpiState
-
build_command_string
()¶ Returns string with command constructed with parameters of object.
Returns: String with command.
-
on_new_line
(line, is_full_line)¶ Method to parse command output. Will be called after line with command echo. Write your own implementation but don’t forget to call on_new_line from base class in most cases.
Parameters: - line – Line to parse, new lines are trimmed
- is_full_line – True if new line character was removed from line, False otherwise
Returns: None
-
Module contents¶
Package for implementing SCPI in state SCPI commands.