2. cc_example

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

_cc_close()[source]

Close the channel.

Return type

None

_cc_open()[source]

Open the channel.

Return type

None

_cc_receive(timeout=0.1)[source]

Craft a Message that would be received from the device under test.

Parameters

timeout (float) – not use

Return type

Dict[str, Optional[bytes]]

Returns

dictionary containing the received bytes if successful, otherwise None

_cc_send(msg)[source]

Sends the message on the channel.

Parameters

msg (bytes) – message to send.

Return type

None