class SCPIsession

Introduction

SCPIsession manages network connections and connection state for SPCI sessions.

SCPIsession State Parameters

The object is controlled via changing the object’s state parameters. I know, that’s not much to go on. It’s really pretty simple. A few examples are probably the best way to understand it. See the mrSCPI readme.

SCPIsession State Parameters: Global behavior

SCPIsession State Parameters: Command string specification

SCPIsession State Parameters: Instrument I/O tuning

SCPIsession State Parameters: Connection Parameters

Connection parameters may only be set when an SCPIsession object is created (via new).

SCPIsession State Parameters: Output Control

SCPIsession State Parameters: Result processing

Strings returned from instruments can be processed via a standard set of transformations controlled by the options in this section. The actions occur in the order they are documented in this section. For example, operations after :result_split are applied each array element resulting from the split. If :result_type is nil, none of these actions are taken.

SCPIsession State Parameters: Result storage

SCPIsession State Parameters: Macros

The following pseudo-options are provided for connivance, and are equivalent to setting several other options simultaneously. Like all option-like entities, these pseudo-options take an argument. This argument must be provided even if the macro ignores it.

- Result processing & Output Control Macros
                                 :result_extract_block :result_split :result_chomp :result_strip :result_last_word :result_type :print_max_len :print_debug
  - :result_macro_bin (P) ....... false                 nil           false         false         false             :string      nil            false
  - :result_macro_block (P) ..... true                  nil           false         false         false             :string      nil            false
  - :result_macro_ascii (P) ..... false                 nil           true          true          false             :string      nil            false
  - :result_macro_debug (P) ..... false                 nil           true          true          false             :string      256            true
  - :result_macro_csv (P) ....... false                 ','           true          true          false             :string      nil            false