ait.dsn.sle.raf module

RAF Interface Module

The ait.dsn.sle.raf module provides SLE Return All Frames (RAF) interface classes, methods, and attributes.

Classes:
RAF: An extension of the generic ait.dsn.sle.common.SLE class which

implements the RAF standard.

class ait.dsn.sle.raf.RAF(*args, **kwargs)

Bases: SLE

SLE Return All Frames (RAF) interface class

The RAF class extends the ait.dsn.sle.common.SLE base interface class and implements the RAF specification.

The RAF class can respond to a number of returns from the SLE interface. The following are a list of the events to which handlers can be bound along with an explanation for when they would be encountered. The interface provides default handlers for each of these events which generally log information received via ait.core.log.

Handlers will receive an instance of the received and decoded PDU. If you would like to see the specification for each possible you can view the class for each option in ait.dsn.sle.pdu.raf.RafProvidertoUserPdu

RafBindReturn:

Response back from the provider after a bind request has been sent to the interface.

RafUnbindReturn

Response back from the provider after a unbind request has been sent to the interface.

RafStartReturn

Response back from the provider after a start data request has been sent to the interface.

RafStopReturn

Response back from the provider after a stop data request has been sent to the interface.

RafTransferBuffer

Response from the provider container a data transfer or notification.

AnnotatedFrame

A potential component of the PDU received by the RafTransferBuffer handler. If the provider is sending data to the user this is the handler that will fire to process the PDU.

SyncNotification

A potential component of the PDU received by the RafTransferBuffer handler. If the provider is sending a notification to the user this is the handler that will fire to process the PDU.

RafScheduleStatusReportReturn

Response back from the provider after a schedule status report request has been sent to the interface.

RafStatusReportInvocation

Response from the provider containing a status report.

RafGetParameterReturn

Response back from the provider after a Get Parameter request has been sent to the interface.

RafPeerAbortInvocation

Received from the provider to abort the connection.

bind(inst_id=None)

Bind to a RAF interface

Arguments:
inst_id:

The instance id for the RAF interface to bind.

decode(message)

Decode an ASN.1 encoded RAF PDU

Arguments:
message (bytearray):

The ASN.1 encoded RAF PDU to decode

Returns:

The decoded RAF PDU as an instance of the ait.dsn.sle.pdu.raf.RafProvidertoUserPdu class.

get_parameter()
peer_abort(reason=127)

Send a peer abort notification to the RAF interface

Arguments:
reason (optional integer):

An integer representing the reason for the peer abort. Valid values are defined in ait.dsn.sle.pdu.common.PeerAbortDiagnostic

schedule_status_report(report_type='immediately', cycle=None)

Send a status report schedule request to the RAF interface

Arguments:
report_type (string):

The type of report type. One of ‘immediately’, ‘periodically’, or ‘stop’. If the report type requested is ‘periodically’ a report will be sent every ‘cycle’ seconds.

cycle (integer):

How often in seconds a report of type ‘periodically’ should be sent. This value is required if report_type is ‘periodically’ and ignored otherwise. Valid values are 2 - 600 inclusive.

start(start_time, end_time, frame_quality=2)

Send data start request to the RAF interface

Arguments:
start_time (datetime.datetime):

The start time (In ERT) for the data to be returned from the interface.

end_time (datetime.datetime):

The end time (In ERT) for the data to be returned from the interface.

frame_quality (optional integer):

The quality of data to be returned from the interface. Valid options are defined in ait.dsn.sle.pdu.raf.RequestedFrameQuality

stop()

Send data stop request to the RAF interface

unbind(reason=0)

Unbind from the RAF interface

Arguments:
reason:

An optional integer indicating the reason for the unbind. The valid integer values are defined in ait.dsn.sle.pdu.binds.UnbindReason