Versions in this module Expand all Collapse all v0 v0.4.0 Sep 2, 2026 Changes in this version + const DefaultBuffer + const DefaultWindow + const MaxUplinkVCID + const MaxVCID + var ErrInvalidConfig = errors.New("downlink configuration is not valid") + var ErrMissingOCF = errors.New("downlink carries an operational control field but no supplier") + var ErrUnknownChannel = errors.New("virtual channel is not configured") + type Commander struct + func NewCommander(config Uplink) (*Commander, error) + func (c *Commander) AcceptCLCW(encoded []byte) error + func (c *Commander) CLTUs() func(yield func([]byte, error) bool) + func (c *Commander) NextCLTU() ([]byte, bool, error) + func (c *Commander) Pending(vcid uint8) (int, error) + func (c *Commander) Send(vcid uint8, packet []byte) error + func (c *Commander) SendExpedited(vcid uint8, packet []byte) error + func (c *Commander) SendPacket(vcid uint8, packet *spp.SpacePacket) error + func (c *Commander) State(vcid uint8) (cop.FOPState, error) + type Downlink struct + ASM []byte + Channels []VC + FECF bool + FrameLength int + OCF bool + Randomize bool + SpacecraftID uint16 + func (d Downlink) Validate() error + type Onboard struct + func NewOnboard(config Uplink) (*Onboard, error) + func (o *Onboard) Accept(cltu []byte) (accepted bool, err error) + func (o *Onboard) CLCW(vcid uint8) ([]byte, error) + func (o *Onboard) Next(vcid uint8) ([]byte, bool, error) + func (o *Onboard) Packets(vcid uint8) func(yield func([]byte, error) bool) + func (o *Onboard) State(vcid uint8) (cop.FARMState, error) + type Receiver struct + func NewReceiver(config Downlink) (*Receiver, error) + func (r *Receiver) Accept(cadu []byte) error + func (r *Receiver) Next(vcid uint8) ([]byte, bool, error) + func (r *Receiver) NextOCF() ([]byte, bool) + func (r *Receiver) NextPacket(vcid uint8, options ...spp.DecodeOption) (*spp.SpacePacket, bool, error) + func (r *Receiver) OCFs() func(yield func([]byte) bool) + func (r *Receiver) Packets(vcid uint8) func(yield func([]byte, error) bool) + type Sender struct + func NewSender(config Downlink, options ...SenderOption) (*Sender, error) + func (s *Sender) CADUs() func(yield func([]byte, error) bool) + func (s *Sender) Flush() error + func (s *Sender) HasPending() bool + func (s *Sender) NextCADU() ([]byte, bool, error) + func (s *Sender) Send(vcid uint8, packet []byte) error + func (s *Sender) SendPacket(vcid uint8, packet *spp.SpacePacket) error + type SenderOption func(*senderOptions) + func WithOCF(supplier func() []byte) SenderOption + type Uplink struct + Channels []UplinkVC + Randomize bool + SpacecraftID uint16 + func (u Uplink) Validate() error + type UplinkVC struct + Buffer int + ID uint8 + MAPID uint8 + Window uint8 + type VC struct + Buffer int + ID uint8 + Priority int