pe.monitor
Packet Engine Monitor Support
Helper implementation for monitor support, including a ReceiveHandler
and a simplified base class for monitor implementations.
Classes
Facilitates monitoring of received frames. |
|
Delegates monitoring events to a |
Module Contents
- class pe.monitor.Monitor
Facilitates monitoring of received frames.
A subclass of this class is used to provide monitoring, taking required actions on received frames. An instance is provided to the monitoring receive handler (see
MonitorReceiveHandler
) in order to effect monitoring.- monitored_connected(port, call_from, call_to, text, data)
Called when an AX.25 Information (I) frame is received, if monitoring is enabled.
Corresponding frame type: ‘I’
- Parameters:
port (int) – Port on which frame was received.
call_from (str) – Callsign of sending station.
call_to (str) – Callsign of destination station.
text (str) – Textual representation of frame, in AGWPE format.
data (bytearray) – Data associated with the frame.
- monitored_supervisory(port, call_from, call_to, text)
Called when an AX.25 Supervisory (S) frame is received, if monitoring is enabled.
Corresponding frame type: ‘S’
- Parameters:
port (int) – Port on which frame was received.
call_from (str) – Callsign of sending station.
call_to (str) – Callsign of destination station.
text (str) – Textual representation of frame, in AGWPE format.
- monitored_unproto(port, call_from, call_to, text, data)
Called when an AX.25 Unproto (U) frame is received, if monitoring is enabled.
Corresponding frame type: ‘U’
- Parameters:
port (int) – Port on which frame was received.
call_from (str) – Callsign of sending station.
call_to (str) – Callsign of destination station.
text (str) – Textual representation of frame, in AGWPE format.
data (bytearray) – Data associated with the frame.
- monitored_own(port, call_from, call_to, text, data)
Called when an AX.25 Unproto (U) frame has been sent by the client, if monitoring is enabled, allowing for confirmation of sent frames.
Corresponding frame type: ‘T’
- Parameters:
port (int) – Port on which frame was sent.
call_from (str) – Callsign of sending station.
call_to (str) – Callsign of destination station.
text (str) – Textual representation of frame, in AGWPE format.
data (bytearray) – Data associated with the frame.
- monitored_raw(port, data)
Called for all monitored frames when monitoring in raw format has been enabled.
Corresponding frame type: ‘K’
- Parameters:
port (int) – Port on which frame was received.
data (bytearray) – Raw AX.25 frame data.
- class pe.monitor.MonitorReceiveHandler
Bases:
pe.ReceiveHandler
Delegates monitoring events to a
Monitor
instance.A receive handler that accepts a monitor implementation and delegates all monitoring callbacks to that implementation, eliminating the need for a client to extend their own receive handler for this purpose.
- monitored_connected(port, call_from, call_to, text, data)
Called when an AX.25 Information (I) frame is received, if monitoring is enabled.
Corresponding frame type: ‘I’
- Parameters:
port (int) – Port on which frame was received.
call_from (str) – Callsign of sending station.
call_to (str) – Callsign of destination station.
text (str) – Textual representation of frame, in AGWPE format.
data (bytearray) – Data associated with the frame.
- monitored_supervisory(port, call_from, call_to, text)
Called when an AX.25 Supervisory (S) frame is received, if monitoring is enabled.
Corresponding frame type: ‘S’
- Parameters:
port (int) – Port on which frame was received.
call_from (str) – Callsign of sending station.
call_to (str) – Callsign of destination station.
text (str) – Textual representation of frame, in AGWPE format.
- monitored_unproto(port, call_from, call_to, text, data)
Called when an AX.25 Unproto (U) frame is received, if monitoring is enabled.
Corresponding frame type: ‘U’
- Parameters:
port (int) – Port on which frame was received.
call_from (str) – Callsign of sending station.
call_to (str) – Callsign of destination station.
text (str) – Textual representation of frame, in AGWPE format.
data (bytearray) – Data associated with the frame.
- monitored_own(port, call_from, call_to, text, data)
Called when an AX.25 Unproto (U) frame has been sent by the client, if monitoring is enabled, allowing for confirmation of sent frames.
Corresponding frame type: ‘T’
- Parameters:
port (int) – Port on which frame was sent.
call_from (str) – Callsign of sending station.
call_to (str) – Callsign of destination station.
text (str) – Textual representation of frame, in AGWPE format.
data (bytearray) – Data associated with the frame.
- monitored_raw(port, data)
Called for all monitored frames when monitoring in raw format has been enabled.
Corresponding frame type: ‘K’
- Parameters:
port (int) – Port on which frame was received.
data (bytearray) – Raw AX.25 frame data.