10 #include <satcat5/eth_dispatch.h>
13 #include <satcat5/udp_core.h>
49 unsigned regaddr,
unsigned count, u32* result)
override;
52 unsigned regaddr,
unsigned count, u32* result)
override;
55 unsigned regaddr,
unsigned count,
const u32* data)
override;
58 unsigned regaddr,
unsigned count,
const u32* data)
override;
77 void frame_rcvd(satcat5::io::LimitedRead& src) override;
84 u8 opcode,
unsigned addr,
85 unsigned len, const u32* ptr,
unsigned timeout);
89 u8 opcode,
unsigned addr,
90 unsigned len, const u32* ptr);
96 satcat5::net::Address* const
m_dst;
99 unsigned m_timeout_rd;
100 unsigned m_timeout_wr;
105 u8 m_response_opcode;
107 unsigned m_response_len;
108 satcat5::cfg::
IoStatus m_response_status;
123 inline void close() {m_addr.close();}
124 inline bool ready()
const {
return m_addr.ready();}
141 inline void close() {m_addr.close();}
142 inline bool ready()
const {
return m_addr.ready();}
ConfigBus core definitions.
IoStatus
Status codes for ConfigBus read/write operations.
Controller for a remote ConfigBus, connected over network.
satcat5::cfg::IoStatus read_array(unsigned regaddr, unsigned count, u32 *result) override
Bulk read from consecutive registers.
satcat5::cfg::IoStatus write_repeat(unsigned regaddr, unsigned count, const u32 *data) override
Repeated write to the same register.
void set_timeout_rd(unsigned usec)
Adjust read timeout (0 = Non-blocking).
satcat5::net::Address *const m_dst
MAC address for the remote interface.
satcat5::cfg::IoStatus wait_response(unsigned timeout)
Busywait until response is received.
void timer_event() override
Child class MUST override this method.
void frame_rcvd(satcat5::io::LimitedRead &src) override
Dispatch calls frame_rcvd(...) for each incoming frame with with a matching net::Type value.
void set_irq_polling(unsigned msec)
Adjust polling rate for interrupt status (0 = None).
void set_timeout_wr(unsigned usec)
Adjust write timeout (0 = Non-blocking).
bool send_command(u8 opcode, unsigned addr, unsigned len, const u32 *ptr)
Send the specified opcode.
satcat5::cfg::IoStatus read_repeat(unsigned regaddr, unsigned count, u32 *result) override
Repeated read from the same register.
satcat5::cfg::IoStatus send_and_wait(u8 opcode, unsigned addr, unsigned len, const u32 *ptr, unsigned timeout)
Send, then wait if requested.
ConfigBusRemote(satcat5::net::Address *dst, const satcat5::net::Type &ack)
Create a link to the designated remote address, with commands and replies routed through the designat...
satcat5::cfg::IoStatus write(unsigned regaddr, u32 wrval) override
Basic read and write operations (ConfigBus API).
satcat5::cfg::IoStatus write_array(unsigned regaddr, unsigned count, const u32 *data) override
Bulk write to consecutive registers.
satcat5::cfg::IoStatus read(unsigned regaddr, u32 &rdval) override
Basic read and write operations (ConfigBus API).
Inheritable container for a eth::Address.
Implemention of "net::Dispatch" for Ethernet frames.
Defines a generic API for sending data to a specific destination, such as a MAC address,...
A net::Protocol is the counterpart to net::Dispatch that handles a particular data stream,...
Timer objects are polled after a fixed delay or at a regular interval.
void timer_every(unsigned msec)
Configure a repeating notification every X milliseconds.
Inheritable container for a udp::Address.
Dispatcher sorts incoming UDP messages by port index.
Generic network Dispatch API.
Core event-processing loop for SatCat5 software.
An Ethernet MAC address (with serializable interface).
IPv4 address is a 32-bit unsigned integer.
Multipurpose filter for matching fields in network packets.