|  | F´ Flight Software - C/C++ Documentation
    NASA-v1.6.0
    A framework for building embedded system applications to NASA flight quality standards. | 
 
 
 
Go to the documentation of this file.
   15 #include "Fw/Types/BasicTypes.hpp" 
   16 #include "Fw/Types/Assert.hpp" 
   26     : ByteStreamDriverModelComponentBase(compName),
 
   30     ByteStreamDriverModelComponentBase::init(instance);
 
   35                                                  const U32 send_timeout_seconds,
 
   36                                                  const U32 send_timeout_microseconds) {
 
   37     return m_socket.
configureSend(hostname, port, send_timeout_seconds, send_timeout_microseconds);
 
   55     return allocate_out(0, 1024);
 
   59     Drv::RecvStatus recvStatus = (status == 
SOCK_SUCCESS) ? RecvStatus::RECV_OK : RecvStatus::RECV_ERROR;
 
   60     this->recv_out(0, buffer, recvStatus);
 
   64     if (isConnected_ready_OutputPort(0)) {
 
   76     deallocate_out(0, fwBuffer);
 
   78         return SendStatus::SEND_RETRY;
 
   80         return SendStatus::SEND_ERROR;
 
   82     return SendStatus::SEND_OK;
 
   87     return PollStatus::POLL_ERROR;
 
  
 
IpSocket & getSocketHandler()
returns a reference to the socket handler
SocketIpStatus configureRecv(const char *hostname, const U16 port)
Configures the Udp receive settings but does not open the connection.
@ SOCK_INTERRUPTED_TRY_AGAIN
Interrupted status for retries.
Helper base-class for setting up Berkley sockets.
void sendBuffer(Fw::Buffer buffer, SocketIpStatus status)
sends a buffer to be filled with data
supports a task to read a given socket adaptation
~UdpComponentImpl()
Destroy the component.
SocketIpStatus send(const U8 *const data, const U32 size)
send data out the IP socket from the given buffer
@ SOCK_SUCCESS
Socket operation successful.
void connected()
called when the IPv4 system has been connected
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
void init(const NATIVE_INT_TYPE instance=0)
Initialize this component.
SocketIpStatus
Status enumeration for socket return values.
UdpComponentImpl(const char *const compName)
construct the TcpClient component.
@ SOCK_DISCONNECTED
Failed to read socket with disconnect.
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=SOCKET_SEND_TIMEOUT_SECONDS, const U32 send_timeout_microseconds=SOCKET_SEND_TIMEOUT_MICROSECONDS)
Configures the Udp send settings but does not open the connection.
Drv::PollStatus poll_handler(const NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
not supported
Fw::Buffer getBuffer()
returns a buffer to fill with data