7. cc_raw_loopback

7.1. 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.

Parameters:

processing – deprecated, will not be taken into account.

_cc_close()[source]

Close loopback channel.

Return type:

None

_cc_open()[source]

Open loopback channel.

Return type:

None

_cc_receive(timeout)[source]

Read message by simply removing an element from the left side of deque.

Parameters:

timeout (float) – timeout applied on receive event

Return type:

Dict[str, Optional[bytes]]

Returns:

dictionary containing the received bytes if successful, otherwise None

_cc_send(msg)[source]

Send a message by simply putting message in deque.

Parameters:

msg (Union[Message, bytes, str]) – message to send, should be Message type or bytes.

Return type:

None