16 #include <sys/types.h>
23 #define DEBUG_PRINT(x,...)
33 const char *
const compName
34 ) : UdpSenderComponentBase(compName),
50 UdpSenderComponentBase::init(queueDepth, msgSize, instance);
56 if (this->
m_fd != -1) {
69 this->
m_fd = socket(AF_INET, SOCK_DGRAM, 0);
70 if (-1 == this->
m_fd) {
72 this->log_WARNING_HI_US_SocketError(arg);
83 this->log_ACTIVITY_HI_US_PortOpened(arg,atoi(port));
93 void UdpSenderComponentImpl ::
107 void UdpSenderComponentImpl ::
114 if (-1 == this->
m_fd) {
133 ssize_t sendStat = sendto(this->
m_fd,
139 if (-1 == sendStat) {
141 this->log_WARNING_HI_US_SendError(arg);
155 UdpSenderComponentImpl::UdpSerialBuffer::UdpSerialBuffer(
162 UdpSenderComponentImpl::UdpSerialBuffer::UdpSerialBuffer(
163 const UdpSenderComponentImpl::UdpSerialBuffer& other) :
Fw::SerializeBufferBase() {
164 FW_ASSERT(
sizeof(this->m_buff)>= other.getBuffLength(),
sizeof(this->m_buff),other.getBuffLength());
165 memcpy(this->m_buff,other.m_buff,other.getBuffLength());
166 this->setBuffLen(other.getBuffLength());
169 UdpSenderComponentImpl::UdpSerialBuffer::UdpSerialBuffer():
Fw::SerializeBufferBase() {