31 const U32 send_timeout_seconds,
32 const U32 send_timeout_microseconds) {
33 return m_socket.
configureSend(hostname, port, send_timeout_seconds, send_timeout_microseconds);
38 m_allocation_size = buffer_size;
58 return allocate_out(0,
static_cast<U32
>(m_allocation_size));
72 this->
recv_out(0, buffer, recvStatus);
PlatformIntType NATIVE_INT_TYPE
PlatformAssertArgType FwAssertArgType
PlatformSizeType FwSizeType
C++-compatible configuration header for fprime configuration.
Helper base-class for setting up Berkeley sockets.
Status associated with the received data.
@ RECV_OK
Receive worked as expected.
@ RECV_ERROR
Receive error occurred retrying may succeed.
@ RECV_NO_DATA
Receive worked, but there was no data.
Status returned by the send call.
@ SEND_ERROR
Send error occurred retrying may succeed.
@ SEND_RETRY
Data send should be retried.
@ SEND_OK
Send worked as expected.
SocketIpStatus send(const U8 *const data, const U32 size)
send data to the IP socket from the given buffer
Auto-generated base for Udp component.
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocate.
void recv_out(FwIndexType portNum, Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus)
Invoke output port recv.
void ready_out(FwIndexType portNum)
Invoke output port ready.
Fw::Buffer allocate_out(FwIndexType portNum, U32 size)
Invoke output port allocate.
bool isConnected_ready_OutputPort(FwIndexType portNum)
void sendBuffer(Fw::Buffer buffer, SocketIpStatus status)
sends a buffer to be filled with data
Fw::Buffer getBuffer()
returns a buffer to fill with data
IpSocket & getSocketHandler()
returns a reference to the socket handler
SocketIpStatus configureRecv(const char *hostname, const U16 port, FwSizeType buffer_size=1024)
Configures the Udp receive settings but does not open the connection.
void connected()
called when the IPv4 system has been connected
U16 getRecvPort()
get the port being received on
~UdpComponentImpl()
Destroy the component.
UdpComponentImpl(const char *const compName)
construct the TcpClient component.
SocketIpStatus configureSend(const char *hostname, const U16 port, const U32 send_timeout_seconds=SOCKET_SEND_TIMEOUT_SECONDS, const U32 send_timeout_microseconds=SOCKET_SEND_TIMEOUT_MICROSECONDS)
Configures the Udp send settings but does not open the connection.
U16 getRecvPort()
get the port being received on
SocketIpStatus configureRecv(const char *hostname, const U16 port)
configure the udp socket for incoming transmissions
SocketIpStatus configureSend(const char *hostname, const U16 port, const U32 send_timeout_seconds, const U32 send_timeout_microseconds)
configure the udp socket for outgoing transmissions
SocketIpStatus
Status enumeration for socket return values.
@ SOCK_SUCCESS
Socket operation successful.
@ SOCK_DISCONNECTED
Failed to read socket with disconnect.
@ SOCK_INTERRUPTED_TRY_AGAIN
Interrupted status for retries.
@ SOCK_NO_DATA_AVAILABLE
No data available or read operation would block.