F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Drv::SocketHelper Class Reference

#include <Drv/SocketIpDriver/SocketHelper.hpp>

Public Member Functions

 SocketHelper ()
 
virtual ~SocketHelper ()
 
SocketIpStatus configure (const char *hostname, const U16 port, const bool send_udp, const U32 timeout_seconds, const U32 timeout_microseconds)
 
bool isOpened (void)
 
SocketIpStatus open (void)
 
void send (BYTE *data, const U32 size)
 
SocketIpStatus recv (BYTE *data, I32 &size)
 
void close (void)
 

Public Attributes

PRIVATE __pad0__: SocketIpStatus openProtocol(NATIVE_INT_TYPE protocol
 
PRIVATE bool isInput = true)
 
SocketStatem_state
 
NATIVE_INT_TYPE m_socketInFd
 Input file descriptor, always TCP. More...
 
NATIVE_INT_TYPE m_socketOutFd
 Output file descriptor, always UDP. More...
 
bool m_sendUdp
 
U32 m_timeoutSeconds
 
U32 m_timeoutMicroseconds
 
char m_hostname [MAX_HOSTNAME_SIZE]
 Hostname to supply. More...
 
U16 m_port
 IP address port used. More...
 

Detailed Description

Definition at line 20 of file SocketHelper.hpp.

Constructor & Destructor Documentation

◆ SocketHelper()

Drv::SocketHelper::SocketHelper ( )

Definition at line 54 of file SocketHelper.cpp.

◆ ~SocketHelper()

Drv::SocketHelper::~SocketHelper ( )
virtual

Definition at line 64 of file SocketHelper.cpp.

Member Function Documentation

◆ close()

void Drv::SocketHelper::close ( void  )

Definition at line 90 of file SocketHelper.cpp.

◆ configure()

SocketIpStatus Drv::SocketHelper::configure ( const char *  hostname,
const U16  port,
const bool  send_udp,
const U32  timeout_seconds,
const U32  timeout_microseconds 
)

Definition at line 68 of file SocketHelper.cpp.

◆ isOpened()

bool Drv::SocketHelper::isOpened ( void  )

Definition at line 86 of file SocketHelper.cpp.

◆ open()

SocketIpStatus Drv::SocketHelper::open ( void  )

Definition at line 98 of file SocketHelper.cpp.

◆ recv()

SocketIpStatus Drv::SocketHelper::recv ( BYTE data,
I32 &  size 
)

Definition at line 243 of file SocketHelper.cpp.

◆ send()

void Drv::SocketHelper::send ( BYTE data,
const U32  size 
)

Definition at line 200 of file SocketHelper.cpp.

Member Data Documentation

◆ __pad0__

PRIVATE Drv::SocketHelper::__pad0__

Definition at line 38 of file SocketHelper.hpp.

◆ isInput

PRIVATE bool Drv::SocketHelper::isInput = true)

Definition at line 40 of file SocketHelper.hpp.

◆ m_hostname

char Drv::SocketHelper::m_hostname[MAX_HOSTNAME_SIZE]

Hostname to supply.

Definition at line 48 of file SocketHelper.hpp.

◆ m_port

U16 Drv::SocketHelper::m_port

IP address port used.

Definition at line 49 of file SocketHelper.hpp.

◆ m_sendUdp

bool Drv::SocketHelper::m_sendUdp

Definition at line 45 of file SocketHelper.hpp.

◆ m_socketInFd

NATIVE_INT_TYPE Drv::SocketHelper::m_socketInFd

Input file descriptor, always TCP.

Definition at line 43 of file SocketHelper.hpp.

◆ m_socketOutFd

NATIVE_INT_TYPE Drv::SocketHelper::m_socketOutFd

Output file descriptor, always UDP.

Definition at line 44 of file SocketHelper.hpp.

◆ m_state

SocketState* Drv::SocketHelper::m_state

Definition at line 42 of file SocketHelper.hpp.

◆ m_timeoutMicroseconds

U32 Drv::SocketHelper::m_timeoutMicroseconds

Definition at line 47 of file SocketHelper.hpp.

◆ m_timeoutSeconds

U32 Drv::SocketHelper::m_timeoutSeconds

Definition at line 46 of file SocketHelper.hpp.


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