cis_interface.interface package

Submodules

cis_interface.interface.CisInterface module

cis_interface.interface.CisInterface.CisAsciiArrayInput(name, **kwargs)[source]

Get class for handling table-like formatted input as arrays.

Parameters:
  • name (str) – The name of the input message queue that input should be received from.
  • **kwargs – Additional keyword arguments are passed to CisAsciiTableInput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisAsciiArrayOutput(name, fmt, **kwargs)[source]

Get class for handling table-like formatted output as arrays.

Parameters:
  • name (str) – The name of the message queue where 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.
  • **kwargs – Additional keyword arguments are passed to CisAsciiTableOutput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisAsciiFileInput(name, **kwargs)[source]

Get class for generic ASCII input.

Parameters:
  • name (str) – The name of the input message queue that input should be received from.
  • **kwargs – Additional keyword arguments are passed to CisInput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisAsciiFileOutput(name, **kwargs)[source]

Get class for generic ASCII output.

Parameters:
  • name (str) – The name of the message queue where output should be sent.
  • **kwargs – Additional keyword arguments are passed to CisOutput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisAsciiTableInput(name, as_array=False, **kwargs)[source]

Get class for handling table-like formatted input.

Parameters:
  • name (str) – The name of the input message queue that 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.
  • **kwargs – Additional keyword arguments are passed to CisInput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisAsciiTableOutput(name, fmt, as_array=False, **kwargs)[source]

Get class for handling table-like formatted output.

Parameters:
  • name (str) – The name of the message queue where 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.
  • **kwargs – Additional keyword arguments are passed to CisOutput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisInput(name, format_str=None, **kwargs)[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.
  • **kwargs – Additional keyword arguments are passed to the underlying comm.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisMatlab(_type, args=None)[source]

Short interface to identify functions called by Matlab.

Parameters:
  • _type (str) – Name of class that should be returned.
  • args (list) – Additional arguments that should be passed to class initializer.
Returns:

An instance of the requested class.

Return type:

obj

cis_interface.interface.CisInterface.CisObjInput(name, **kwargs)[source]

Get class for handling Obj input.

Parameters:
  • name (str) – The name of the input message queue that input should be received from.
  • **kwargs – Additional keyword arguments are passed to CisInput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisObjOutput(name, **kwargs)[source]

Get class for handling Obj output.

Parameters:
  • name (str) – The name of the message queue where output should be sent.
  • **kwargs – Additional keyword arguments are passed to CisOutput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisOutput(name, format_str=None, **kwargs)[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.
  • **kwargs – Additional keyword arguments are passed to the underlying comm.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisPandasInput(name, **kwargs)[source]

Get class for handling Pandas input.

Parameters:
  • name (str) – The name of the input message queue that input should be received from.
  • **kwargs – Additional keyword arguments are passed to CisInput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisPandasOutput(name, **kwargs)[source]

Get class for handling pandasd output.

Parameters:
  • name (str) – The name of the message queue where output should be sent.
  • **kwargs – Additional keyword arguments are passed to CisOutput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisPickleInput(name, **kwargs)[source]

Get class for handling pickled input.

Parameters:
  • name (str) – The name of the input message queue that input should be received from.
  • **kwargs – Additional keyword arguments are passed to CisInput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisPickleOutput(name, **kwargs)[source]

Get class for handling pickled output.

Parameters:
  • name (str) – The name of the message queue where output should be sent.
  • **kwargs – Additional keyword arguments are passed to CisOutput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisPlyInput(name, **kwargs)[source]

Get class for handling Ply input.

Parameters:
  • name (str) – The name of the input message queue that input should be received from.
  • **kwargs – Additional keyword arguments are passed to CisInput.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisInterface.CisPlyOutput(name, **kwargs)[source]

Get class for handling Ply output.

Parameters:
  • name (str) – The name of the message queue where output should be sent.
  • **kwargs – Additional keyword arguments are passed to CisOutput.
Returns:

Communication object.

Return type:

DefaultComm

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:
  • name (str) – The name of the server queues.
  • outfmt (str, optional) – Format string used to format variables in a message sent to the request queue. Defautls to ‘%s’.
  • infmt (str, optional) – Format string used to recover variables from messages received from the response queue. Defautls to ‘%s’.
Returns:

class:.ClientComm: Communication object.

cis_interface.interface.CisInterface.CisRpcServer(name, infmt='%s', outfmt='%s', matlab=False)[source]

Get class for handling requests and response for an RPC Server.

Parameters:
  • name (str) – The name of the server queues.
  • infmt (str, optional) – Format string used to recover variables from messages received from the request queue. Defaults to ‘%s’.
  • outfmt (str, optional) – Format string used to format variables in a message sent to the response queue. Defautls to ‘%s’.
Returns:

class:.ServerComm: Communication object.

cis_interface.interface.CisInterface.bufMsgSize()[source]

int: Buffer size for average message.

cis_interface.interface.CisInterface.eof_msg()[source]

str: Message signalling end of file.

cis_interface.interface.CisInterface.maxMsgSize()[source]

int: The maximum message size.

Module contents

Routines for interfacing with framework from Python/C/C++/Matlab.

cis_interface.interface.CisInput(name, format_str=None, **kwargs)[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.
  • **kwargs – Additional keyword arguments are passed to the underlying comm.
Returns:

Communication object.

Return type:

DefaultComm

cis_interface.interface.CisOutput(name, format_str=None, **kwargs)[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.
  • **kwargs – Additional keyword arguments are passed to the underlying comm.
Returns:

Communication object.

Return type:

DefaultComm