Protocol
Definition of abstract protocol type.
This module defines the protocol type inherited by all protocol code implementations. Also defined is the stack protocol, which adds push and pop functionality.
- class sequence.protocol.Protocol(owner: Node, name: str)
Abstract protocol class for code running on network nodes.
- name
label for protocol instance.
- Type:
str
- protocol_type
type of protocol instance (e.g. ‘single_heralded’).
- Type:
str
- class sequence.protocol.StackProtocol(owner: Node, name: str)
Abstract protocol class for protocols in a stack structure.
Adds interfaces for push and pop functions.
- name
label for protocol instance.
- Type:
str
- upper_protocols
Protocols to pop to.
- Type:
list[StackProtocol]
- lower_protocols
Protocols to push to.
- Type:
list[StackProtocol]
- abstractmethod pop(*args, **kwargs)
Method to receive information from protocols lower on stack (abstract).
- abstractmethod push(*args, **kwargs)
Method to receive information from protocols higher on stack (abstract).