6. cc_proxy

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

_cc_close()[source]

Close proxy channel.

Return type

None

_cc_open()[source]

Open proxy channel.

Return type

None

_cc_receive(timeout=0.1, raw=False)[source]

Depopulate the queue out of the proxy connector.

Parameters
  • timeout (float) – not used

  • raw (bool) – not used

Return type

Union[Dict[str, Union[bytes, int]], Dict[str, Optional[bytes]], Dict[str, Optional[Message]], Dict[str, None]]

Returns

raw bytes and source when it exist. if queue timeout is reached return None

_cc_send(*args, **kwargs)[source]

Populate the queue in of the proxy connector.

Parameters
  • args (tuple) – tuple containing positionnal arguments

  • kwargs (dict) – dictionary containing named arguments

Return type

None

attach_tx_callback(func)[source]

Attach to a callback to the _cc_send method.

Parameters

func (Callable) – function to call when _cc_send is called

Return type

None

detach_tx_callback()[source]

Detach the current callback.

Return type

None