 |
F´ Flight Software - C/C++ Documentation
NASA-v2.0.1
A framework for building embedded system applications to NASA flight quality standards.
|
Go to the documentation of this file.
23 : ByteStreamDriverModelComponentBase(compName),
27 ByteStreamDriverModelComponentBase::init(instance);
32 const U32 send_timeout_seconds,
33 const U32 send_timeout_microseconds) {
34 return m_socket.
configure(hostname, port, send_timeout_seconds, send_timeout_microseconds);
40 return this->m_socket.
startup();
56 return allocate_out(0, 1024);
60 this->recv_out(0, buffer, (status ==
SOCK_SUCCESS) ? RECV_OK : RECV_ERROR);
70 deallocate_out(0, fwBuffer);
81 return Drv::POLL_ERROR;
TcpServerComponentImpl(const char *const compName)
construct the TcpClient component.
@ SOCK_SUCCESS
Socket operation successful.
@ SOCK_INTERRUPTED_TRY_AGAIN
Interrupted status for retries.
SocketIpStatus configure(const char *hostname, const U16 port, const U32 send_timeout_seconds, const U32 send_timeout_microseconds)
configure the ip socket with host and transmission timeouts
Fw::Buffer getBuffer()
returns a buffer to fill with data
Helper base-class for setting up Berkley sockets.
void shutdown()
shutdown the TcpServer
IpSocket & getSocketHandler()
returns a reference to the socket handler
~TcpServerComponentImpl(void)
Destroy the component.
void sendBuffer(Fw::Buffer buffer, SocketIpStatus status)
sends a buffer to filled with data
SocketIpStatus startup()
startup the TcpServer
void init(const NATIVE_INT_TYPE instance=0)
Initialize this component.
SocketIpStatus startup(void)
Opens the server socket and listens, does not block.
supports a task to read a given socket adaptation
SocketIpStatus send(const U8 *const data, const U32 size)
send data out the IP socket from the given buffer
void shutdown(void)
Shutdown client socket, and listening server socket.
SocketIpStatus
Status enumeration for socket return values.
SocketIpStatus configure(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 TcpClient settings but does not open the connection.
Declares ISF basic types.
@ SOCK_DISCONNECTED
Failed to read socket with disconnect.
int NATIVE_INT_TYPE
native integer type declaration