SatCat5
satcat5::ccsds_aos::Channel Class Referencefinal

Detailed Description

CCSDS-AOS Virtual Channel.

See also
ccsds_aos.h, ccsds::Dispatch. A "channel" object represents a single virtual channel, bound to a unique Satellite ID and Virtual Channel ID. It may be configured in M_PDU (SPP packets) or B_PDU (byte-stream) mode. Each channel requires its own transmit and receive buffers, which are not provided as part of this object.

Definition at line 109 of file ccsds_aos.h.

#include <ccsds_aos.h>

Inheritance diagram for satcat5::ccsds_aos::Channel:
[legend]
Collaboration diagram for satcat5::ccsds_aos::Channel:
[legend]

Public Member Functions

 Channel (satcat5::ccsds_aos::Dispatch *iface, satcat5::io::Readable *src, satcat5::io::Writeable *dst, u8 scid, u8 vcid, bool pkt)
 Create a virtual channel, bound to an AOS interface. More...
 
void desync ()
 Force resynchronization after an error.
 
void frame_rcvd (satcat5::io::LimitedRead &src) override
 Process each received AOS frame.
 
void set_wildcard ()
 Enable wildcard mode, ignoring incoming SCID and VCID. More...
 

Protected Types

enum class  State {
  RAW , RESYNC , HEADER , DATA ,
  SKIP
}
 

Protected Member Functions

void data_rcvd (satcat5::io::Readable *src) override
 The data_rcvd() callback is polled whenever data is available. More...
 
void data_unlink (satcat5::io::Readable *src) override
 Unlink this EventListener from the designated source, because the designated Readable object is being destroyed. More...
 
u8 idle_filler (satcat5::io::Writeable *dst, unsigned req)
 
bool read_header (satcat5::io::Readable *src)
 

Protected Attributes

satcat5::ccsds_aos::Dispatch *const m_iface
 
satcat5::io::Readablem_src
 
satcat5::io::Writeable *const m_dst
 
satcat5::io::ArrayWrite m_rx_spp
 
satcat5::ccsds_aos::Header m_rx_next
 
satcat5::ccsds_aos::Header m_tx_next
 
satcat5::ccsds_aos::Channel::State m_rx_state
 
unsigned m_rx_rem
 
u8 m_tx_busy
 
u8 m_tx_irem
 
u16 m_tx_iseq
 
u8 m_rx_tmp [6]
 
satcat5::net::Type m_filter
 Incoming packet filter.
 

Private Attributes

satcat5::net::Protocolm_next
 Linked list of Protocols.
 

Constructor & Destructor Documentation

◆ Channel()

Channel::Channel ( satcat5::ccsds_aos::Dispatch iface,
satcat5::io::Readable src,
satcat5::io::Writeable dst,
u8  scid,
u8  vcid,
bool  pkt 
)

Create a virtual channel, bound to an AOS interface.

Unidirectional channels may use null "src" or "dst".

Definition at line 68 of file ccsds_aos.cc.

Member Function Documentation

◆ data_rcvd()

void Channel::data_rcvd ( satcat5::io::Readable src)
overrideprotectedvirtual

The data_rcvd() callback is polled whenever data is available.

A pointer is provided to assist handlers with multiple sources. Child objects of io::EventListener MUST override this method.

Implements satcat5::io::EventListener.

Definition at line 179 of file ccsds_aos.cc.

◆ data_unlink()

void Channel::data_unlink ( satcat5::io::Readable src)
overrideprotectedvirtual

Unlink this EventListener from the designated source, because the designated Readable object is being destroyed.

Child objects of io::EventListener MAY override this method if action is required.

Reimplemented from satcat5::io::EventListener.

Definition at line 233 of file ccsds_aos.cc.

◆ set_wildcard()

void Channel::set_wildcard ( )

Enable wildcard mode, ignoring incoming SCID and VCID.

Do not call this method if the AOS link may contain more than one virtual channel. Outgoing packets will continue to use the SCID and VCID set by the constructor.

Definition at line 110 of file ccsds_aos.cc.


The documentation for this class was generated from the following files: