SatCat5
satcat5::udp::AeroFtpClient Class Referencefinal

Detailed Description

Implement AeroFTP protocol over UDP.

Note: Unidirectional UDP requires some care because of ARP prerequisites. In some cases, proxy-ARP or manual routing tables may be required.

Definition at line 118 of file net_aeroftp.h.

#include <net_aeroftp.h>

Inheritance diagram for satcat5::udp::AeroFtpClient:
[legend]
Collaboration diagram for satcat5::udp::AeroFtpClient:
[legend]

Public Member Functions

 AeroFtpClient (satcat5::udp::Dispatch *udp)
 Constructor links to the UDP stack.
 
void connect (const satcat5::udp::Addr &addr, const satcat5::udp::Port &port=satcat5::udp::PORT_AEROFTP)
 Set the destination address before calling send().
 
bool ready () const
 Is the connection ready to transmit?
 
satcat5::ip::Addr dstaddr () const
 
satcat5::eth::MacAddr dstmac () const
 
satcat5::udp::Port dstport () const
 
satcat5::eth::Dispatcheth () const
 
satcat5::net::Dispatchiface () const
 
satcat5::ip::Addr gateway () const
 
satcat5::udp::Port srcport () const
 
satcat5::udp::Dispatchudp () const
 
bool busy () const
 Is there already a transfer in progress?
 
bool done () const
 Is the current transfer completed?
 
bool send (u32 file_id, satcat5::io::Readable *src, satcat5::io::Readable *aux=0)
 Begin transmission of the designated file. More...
 
void close ()
 Close connection and abort transfer in progress.
 
void throttle (unsigned msec_per_pkt)
 Set throttle (one packet every N msec).
 

Protected Member Functions

void end_of_file ()
 End-of-file cleanup.
 
void skip_ahead ()
 Skip to next requested block.
 
void timer_event () override
 Callback for timer events.
 

Protected Attributes

satcat5::udp::Address m_addr
 
satcat5::net::Address *const m_dst
 
satcat5::io::Readablem_src
 Source for file data.
 
satcat5::io::Readablem_aux
 Source for retransmit control.
 
u32 m_file_id
 ID for this file.
 
u32 m_file_len
 Length (bytes)
 
u32 m_file_pos
 Current read index (bytes)
 
u32 m_bytes_sent
 Count transmission length.
 
unsigned m_throttle
 Delay per packet (msec)
 

Private Member Functions

void timer_once (unsigned msec)
 Configure a one-time notification after X milliseconds.
 
void timer_every (unsigned msec)
 Configure a repeating notification every X milliseconds.
 
void timer_stop ()
 Stop all future notifications.
 
unsigned timer_interval () const
 Accessor for recurring timer interval, if one is set.
 
unsigned timer_remaining () const
 Accessor for time to next event, if one is set.
 
void query (unsigned elapsed_msec)
 

Static Private Member Functions

static unsigned count_timer ()
 Count all objects of this type, including idle timers.
 

Private Attributes

satcat5::poll::Timerm_next
 
unsigned m_trem
 
unsigned m_tnext
 

Member Function Documentation

◆ send()

bool AeroFtpClient::send ( u32  file_id,
satcat5::io::Readable src,
satcat5::io::Readable aux = 0 
)
inherited

Begin transmission of the designated file.

The "src" stream contains the file data. The optional "aux" stream indicates whether to transmit each 1,024-byte block (0 = no, 1+ = yes). If no aux source is provided, then the client transmits the entire file.

Definition at line 73 of file net_aeroftp.cc.


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