libcyberradio  22.01.24
TransmitSocket Class Reference

Transmit socket class. More...

#include <TransmitSocket.h>

Public Member Functions

 TransmitSocket (const std::string &ifname, unsigned int sport)
 Constructs a TransmitSocket object. More...
 
virtual ~TransmitSocket ()
 Destroys a TransmitSocket object.
 
std::string getMacAddress ()
 Gets the MAC address. More...
 
std::string getIpAddress ()
 Gets the IP address. More...
 
std::string getIpBroadcastAddress ()
 Gets the IP broadcast address. More...
 
bool sendFrame (unsigned char *frame, const int &frameLen)
 Sends a frame of data. More...
 

Detailed Description

Transmit socket class.

Definition at line 32 of file TransmitSocket.h.

Constructor & Destructor Documentation

◆ TransmitSocket()

TransmitSocket ( const std::string &  ifname,
unsigned int  sport 
)

Constructs a TransmitSocket object.

Parameters
ifnameEthernet interface name
sport

Definition at line 35 of file TransmitSocket.cpp.

Member Function Documentation

◆ getIpAddress()

std::string getIpAddress ( )

Gets the IP address.

Returns
The IP address string.

Definition at line 185 of file TransmitSocket.cpp.

◆ getIpBroadcastAddress()

std::string getIpBroadcastAddress ( )

Gets the IP broadcast address.

Returns
The IP broadcast address string.

Definition at line 196 of file TransmitSocket.cpp.

◆ getMacAddress()

std::string getMacAddress ( )

Gets the MAC address.

Returns
The MAC address string.

Definition at line 168 of file TransmitSocket.cpp.

◆ sendFrame()

bool sendFrame ( unsigned char *  frame,
const int &  frameLen 
)

Sends a frame of data.

Parameters
frameThe data to send
frameLenThe length of the data
Returns
True if the action succeeds, false otherwise.

Definition at line 214 of file TransmitSocket.cpp.


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