SatCat5
satcat5::test::DebugAddress Class Referenceabstract

Detailed Description

Dummy implementation of net::Address that writes data to a buffer.

Definition at line 189 of file sim_utils.h.

#include <sim_utils.h>

Inheritance diagram for satcat5::test::DebugAddress:
[legend]
Collaboration diagram for satcat5::test::DebugAddress:
[legend]

Public Member Functions

virtual void retry ()
 If this Address is not in the ready() state, reattempt any steps required to do so, such as MAC address resolution. More...
 
virtual bool is_multicast () const =0
 Is the destination a broadcast or multicast address? Child MUST override these method.
 
virtual bool matches_reply_address () const =0
 Does this Address object match the parent interface's current reply address? Multicast destinations should match any source address expected to receive the multicast message. More...
 
virtual bool reply_is_multicast () const =0
 Was the parent interface's incoming message sent to a multicast address? (i.e., Could that message have many other recipients?) Child MUST override this method.
 
virtual void save_reply_address ()=0
 Bind this Address object to the parent interface's current reply address, as provided in net::Dispatch::open_reply(). More...
 
bool write_packet (unsigned nbytes, const void *data)
 All-in-one call that writes an entire packet. More...
 

Private Member Functions

satcat5::net::Dispatchiface () const override
 Fetch a pointer to the underlying interface. More...
 
satcat5::io::Writeableopen_write (unsigned len) override
 Open a new frame to the designated address and type. More...
 
void close () override
 Close any open connections and revert to idle. More...
 
bool ready () const
 Is this address object ready for use? Child MUST override this method.
 

Private Attributes

satcat5::io::PacketBufferHeap m_rx
 Received-data buffer is directly accessible.
 

Member Function Documentation

◆ close()

void satcat5::test::DebugAddress::close ( )
inlineoverrideprivatevirtual

Close any open connections and revert to idle.

Child MUST override this method.

Implements satcat5::net::Address.

Definition at line 198 of file sim_utils.h.

◆ iface()

satcat5::net::Dispatch* satcat5::test::DebugAddress::iface ( ) const
inlineoverrideprivatevirtual

Fetch a pointer to the underlying interface.

Child MUST override this method.

Implements satcat5::net::Address.

Definition at line 194 of file sim_utils.h.

◆ matches_reply_address()

virtual bool satcat5::net::Address::matches_reply_address ( ) const
pure virtualinherited

Does this Address object match the parent interface's current reply address? Multicast destinations should match any source address expected to receive the multicast message.

Child MUST override this method.

Implemented in satcat5::udp::Address, satcat5::ip::Address, satcat5::eth::Address, and satcat5::ccsds_spp::Address.

◆ open_write()

satcat5::io::Writeable* satcat5::test::DebugAddress::open_write ( unsigned  len)
inlineoverrideprivatevirtual

Open a new frame to the designated address and type.

Child MUST override this method.

Returns
Zero if sending a frame is not currently possible.

Implements satcat5::net::Address.

Definition at line 196 of file sim_utils.h.

◆ retry()

virtual void satcat5::net::Address::retry ( )
inlinevirtualinherited

If this Address is not in the ready() state, reattempt any steps required to do so, such as MAC address resolution.

Child SHOULD override this method if applicable.

Reimplemented in satcat5::udp::Address, and satcat5::ip::Address.

Definition at line 52 of file net_address.h.

◆ save_reply_address()

virtual void satcat5::net::Address::save_reply_address ( )
pure virtualinherited

Bind this Address object to the parent interface's current reply address, as provided in net::Dispatch::open_reply().

Child MUST override this method.

Implemented in satcat5::udp::Address, satcat5::ip::Address, satcat5::eth::Address, and satcat5::ccsds_spp::Address.

◆ write_packet()

bool Address::write_packet ( unsigned  nbytes,
const void *  data 
)
inherited

All-in-one call that writes an entire packet.

Equivalent to open_write(), io::Writeable::write_bytes(), io::Writeable::write_finalize().

Definition at line 11 of file net_address.cc.


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