Included Connectors

pykiso comes with some ready to use implementations of different connectors.

collection of ready to use connectors

module

connectors

CChannels

Virtual Communication Channel for tests

module

cc_example

class pykiso.lib.connectors.cc_example.CCExample(name=None, **kwargs)[source]

Only use for development purpose.

This channel simply handle basic TestApp response mechanism.

Initialize attributes.

Parameters

name (Optional[str]) – name of the communication channel

Loopback CChannel

module

cc_raw_loopback

synopsis

Loopback CChannel for testing purposes.

class pykiso.lib.connectors.cc_raw_loopback.CCLoopback(**kwargs)[source]

Loopback CChannel for testing purposes.

Whatever gets sent via cc_send will land in a FIFO and can be received via cc_receive.

constructor

Communication Channel Via Uart

module

cc_uart

synopsis

Uart communication channel

class pykiso.lib.connectors.cc_uart.CCUart(serialPort, baudrate=9600, **kwargs)[source]

UART implementation of the coordination channel.

constructor

exception pykiso.lib.connectors.cc_uart.IncompleteCCMsgError(value)[source]

Communication Channel Via Udp

module

cc_udp

synopsis

Udp communication channel

class pykiso.lib.connectors.cc_udp.CCUdp(dest_ip, dest_port, **kwargs)[source]

UDP implementation of the coordination channel.

Initialize attributes.

Parameters
  • dest_ip (str) – destination ip address

  • dest_port (int) – destination port

Communication Channel via UDP server

module

cc_udp_server

synopsis

basic UDP server

Warning

if multiple clients are connected to this server, ensure that each client receives all necessary responses before receiving messages again. Otherwise the responses may be sent to the wrong client

class pykiso.lib.connectors.cc_udp_server.CCUdpServer(dest_ip, dest_port, **kwargs)[source]

Connector channel used to set up an UDP server.

Initialize attributes.

Parameters
  • dest_ip (str) – destination port

  • dest_port (int) – destination port

Communication Channel Via Usb

module

cc_usb

synopsis

Usb communication channel

class pykiso.lib.connectors.cc_usb.CCUsb(serial_port)[source]

constructor

Communication Channel Via lauterbach

module

cc_fdx_lauterbach

synopsis

CChannel implementation for lauterbach(FDX)

class pykiso.lib.connectors.cc_fdx_lauterbach.CCFdxLauterbach(t32_exc_path=None, t32_config=None, t32_main_script_path=None, t32_reset_script_path=None, t32_fdx_clr_buf_script_path=None, t32_in_test_reset_script_path=None, t32_api_path=None, port=None, node='localhost', packlen='1024', device=1, **kwargs)[source]

Lauterbach connector using the FDX protocol.

Constructor: initialize attributes with configuration data.

Parameters
  • t32_exc_path (Optional[str]) – full path of Trace32 app to execute

  • t32_config (Optional[str]) – full path of Trace32 configuration file

  • t32_main_script_path (Optional[str]) – full path to the main cmm script to execute

  • t32_reset_script_path (Optional[str]) – full path to the reset cmm script to execute

  • t32_fdx_clr_buf_script_path (Optional[str]) – full path to the FDX reset cmm script to execute

  • t32_in_test_reset_script_path (Optional[str]) – full path to the board reset cmm script to execute

  • t32_api_path (Optional[str]) – full path of remote api

  • port (Optional[str]) – port number used for UDP communication

  • node (str) – node name (default localhost)

  • packlen (str) – data pack length for UDP communication (default 1024)

  • device (int) – configure device number given by Trace32 (default 1)

load_script(script_path)[source]

Load a cmm script.

Parameters

script_path (str) – cmm file path

Returns

error status

reset_board()[source]

Executes the board reset.

Return type

None

start()[source]

Override clicking on “go” in the Trace32 application.

The channel must have been successfully opened (Trace32 application opened and script loaded).

Return type

None

class pykiso.lib.connectors.cc_fdx_lauterbach.PracticeState(value)[source]

Available state for any scripts loaded into TRACE32.

Proxy Channel

module

cc_proxy

synopsis

CChannel implementation for multi-auxiliary usage.

CCProxy channel was created, in order to enable the connection of multiple auxiliaries on one and only one CChannel. This CChannel has to be used with a so called proxy auxiliary.

class pykiso.lib.connectors.cc_proxy.CCProxy(**kwargs)[source]

Proxy CChannel for multi auxiliary usage.

Initialize attributes.

Communication Channel using VISA protocol

module

cc_visa

synopsis

VISA communication channel to communicate to instruments using SCPI protocol.

class pykiso.lib.connectors.cc_visa.VISAChannel(**kwargs)[source]

VISA Interface for devices communicating with SCPI

Initialize channel settings.

query(query_command)[source]

Send a query request to the instrument

Parameters

query_command (str) – query command to send

Return type

str

Returns

Response message, None if the request expired with a timeout.

class pykiso.lib.connectors.cc_visa.VISASerial(serial_port, baud_rate=9600, **kwargs)[source]

Connector used to communicate with an instrument via Serial.

Initialize channel attributes.

Parameters
  • serial_port (int) – COM port to use to connect to the instrument

  • baud_rate – baud rate used to communicate with the instrument

class pykiso.lib.connectors.cc_visa.VISATcpip(ip_address, protocol='INSTR', **kwargs)[source]

Connector used to communicate with an instrument via TCPIP

Initialize channel attributes.

Parameters
  • ip_address (str) – target instrument’s ip address

  • protocol – communication protocol to use

Communication Channel via socket

module

cc_socket

synopsis

connector for communication via socket

class pykiso.lib.connectors.cc_tcp_ip.CCTcpip(dest_ip, dest_port, max_msg_size=256, **kwargs)[source]

Connector channel used to communicate via socket

Initialize channel settings.

Parameters
  • dest_ip (str) – destination ip address

  • dest_port (int) – destination port

  • max_msg_size (int) – the maximum amount of data to be received at once