cis_interface.interface package¶
Subpackages¶
Submodules¶
cis_interface.interface.CisInterface module¶
-
cis_interface.interface.CisInterface.
CisAsciiArrayInput
(name, src_type=1, matlab=False, **kwargs)[source]¶ Get class for handling table-like formatted input as arrays.
Parameters: - name (str) – The path to the local file to read input from (if src_type == 0) or the name of the message queue input should be received from.
- src_type (int, optional) – If 0, input is read from a local file. Otherwise, the input is received from a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisAsciiArrayOutput
(name, fmt, dst_type=1, matlab=False, **kwargs)[source]¶ Get class for handling table-like formatted output.
Parameters: - name (str) – The path to the local file where output should be saved (if dst_type == 0) or the name of the message queue where the output should be sent.
- fmt (str) – A C style format string specifying how each ‘row’ of output should be formated. This should include the newline character.
- dst_type (int, optional) – If 0, output is sent to a local file. Otherwise, the output is sent to a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisAsciiFileInput
(name, src_type=1, matlab=False, **kwargs)[source]¶ Get class for generic ASCII input from either a file or message queue.
Parameters: - name (str) – Path to the local file that input should be read from (if src_type == 0) or the name of the input message queue that input should be received from.
- src_type (int, optional) – If 0, input is read from a local file. Otherwise input is received from a message queue. Defauts to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisAsciiFileOutput
(name, dst_type=1, matlab=False, **kwargs)[source]¶ Get class for generic ASCII output to either a local file or message queue.
Parameters: - name (str) – Path to the local file where output should be written (if dst_type == 0) or the name of the message queue where output should be sent.
- dst_type (int, optional) – If 0, output is written to a local file. Otherwise, output is sent to a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisAsciiTableInput
(name, as_array=False, src_type=1, matlab=False, **kwargs)[source]¶ Get class for handling table-like formatted input.
Parameters: - name (str) – The path to the local file to read input from (if src_type == 0) or the name of the message queue input should be received from.
- as_array (bool, optional) – If True, recv returns the entire table array and can only be called once. If False, recv returns row entries. Default to False.
- src_type (int, optional) – If 0, input is read from a local file. Otherwise, the input is received from a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisAsciiTableOutput
(name, fmt, as_array=False, dst_type=1, matlab=False, **kwargs)[source]¶ Get class for handling table-like formatted output.
Parameters: - name (str) – The path to the local file where output should be saved (if dst_type == 0) or the name of the message queue where the output should be sent.
- fmt (str) – A C style format string specifying how each ‘row’ of output should be formated. This should include the newline character.
- as_array (bool, optional) – If True, send expects and entire array. If False, send expects the entries for one table row. Defaults to False.
- dst_type (int, optional) – If 0, output is sent to a local file. Otherwise, the output is sent to a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisInput
(name, format_str=None, matlab=False)[source]¶ Get class for handling input from a message queue.
Parameters: - name (str) – The name of the message queue. Combined with the suffix ‘_IN’, it should match an environment variable containing a message queue key.
- format_str (str, optional) – C style format string that should be used to deserialize messages that are receieved into a list of python objects. Defaults to None and raw string messages are returned.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisMatlab
(_type, args=None)[source]¶ Short interface to identify functions called by Matlab.
Parameters: Returns: An instance of the requested class.
Return type: obj
-
cis_interface.interface.CisInterface.
CisOutput
(name, format_str=None, matlab=False)[source]¶ Get class for handling output to a message queue.
Parameters: - name (str) – The name of the message queue. Combined with the suffix ‘_OUT’, it should match an environment variable containing a message queue key.
- format_str (str, optional) – C style format string that should be used to create a message from a list of python ojbects. Defaults to None and raw string messages are sent.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisPandasInput
(name, src_type=1, matlab=False, **kwargs)[source]¶ Get class for handling Pandas input.
Parameters: - name (str) – The path to the local file to read input from (if src_type == 0) or the name of the message queue input should be received from.
- src_type (int, optional) – If 0, input is read from a local file. Otherwise, the input is received from a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisPandasOutput
(name, dst_type=1, matlab=False, **kwargs)[source]¶ Get class for handling pandasd output.
Parameters: - name (str) – The path to the local file where output should be saved (if dst_type == 0) or the name of the message queue where the output should be sent.
- dst_type (int, optional) – If 0, output is sent to a local file. Otherwise, the output is sent to a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisPickleInput
(name, src_type=1, matlab=False, **kwargs)[source]¶ Get class for handling pickled input.
Parameters: - name (str) – The path to the local file to read input from (if src_type == 0) or the name of the message queue input should be received from.
- src_type (int, optional) – If 0, input is read from a local file. Otherwise, the input is received from a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisPickleOutput
(name, dst_type=1, matlab=False, **kwargs)[source]¶ Get class for handling pickled output.
Parameters: - name (str) – The path to the local file where output should be saved (if dst_type == 0) or the name of the message queue where the output should be sent.
- dst_type (int, optional) – If 0, output is sent to a local file. Otherwise, the output is sent to a message queue. Defaults to 1.
- **kwargs – Additional keyword arguments are passed to the base comm.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisRpc
(outname, outfmt, inname, infmt, matlab=False)[source]¶ Get class for sending a message and then receiving a response.
Parameters: - outname (str) – The name of the output message queue.
- outfmt (str) – Format string used to format variables in a message sent to the output message queue.
- inname (str) – The name of the input message queue.
- infmt (str) – Format string used to recover variables from messages received from the input message queue.
Returns: Communication object.
Return type:
-
cis_interface.interface.CisInterface.
CisRpcClient
(name, outfmt='%s', infmt='%s', matlab=False)[source]¶ Get class for handling requests and response to an RPC Server from a client.
Parameters: Returns: Communication object.
Return type:
cis_interface.interface.PsiInterface module¶
Module contents¶
Routines for interfacing with framework from Python/C/C++/Matlab.
-
cis_interface.interface.
CisInput
(name, format_str=None, matlab=False)[source]¶ Get class for handling input from a message queue.
Parameters: - name (str) – The name of the message queue. Combined with the suffix ‘_IN’, it should match an environment variable containing a message queue key.
- format_str (str, optional) – C style format string that should be used to deserialize messages that are receieved into a list of python objects. Defaults to None and raw string messages are returned.
Returns: Communication object.
Return type:
-
cis_interface.interface.
CisOutput
(name, format_str=None, matlab=False)[source]¶ Get class for handling output to a message queue.
Parameters: - name (str) – The name of the message queue. Combined with the suffix ‘_OUT’, it should match an environment variable containing a message queue key.
- format_str (str, optional) – C style format string that should be used to create a message from a list of python ojbects. Defaults to None and raw string messages are sent.
Returns: Communication object.
Return type:
-
cis_interface.interface.
CisRpc
(outname, outfmt, inname, infmt, matlab=False)[source]¶ Get class for sending a message and then receiving a response.
Parameters: - outname (str) – The name of the output message queue.
- outfmt (str) – Format string used to format variables in a message sent to the output message queue.
- inname (str) – The name of the input message queue.
- infmt (str) – Format string used to recover variables from messages received from the input message queue.
Returns: Communication object.
Return type: