cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
Class UDP Datagram. More...
#include <SimUdpDatagram.hpp>
Public Member Functions | |
SimUdpDatagram (int dgmLen) | |
SimUdpDatagram () | |
void | pushChunk (AxisUdp udpChunk) |
AxisUdp | pullChunk () |
int | length () |
int | size () |
void | clone (SimUdpDatagram &udpDgm) |
Clone a UDP datagram. More... | |
void | cloneHeader (SimUdpDatagram &udpDgm) |
Clone the header of a UDP datagram. More... | |
SimUdpDatagram | pullHeader () |
Pull the header of this datagram. More... | |
void | setUdpSourcePort (int port) |
int | getUdpSourcePort () |
void | setUdpDestinationPort (int port) |
int | getUdpDestinationPort () |
void | setUdpLength (UdpLen len) |
UdpLen | getUdpLength () |
void | setUdpChecksum (UdpCsum csum) |
UdpCsum | getUdpChecksum () |
void | addUdpPayload (string pldStr) |
UdpCsum | calculateUdpChecksum (Ip4Addr ipSa, Ip4Addr ipDa) |
Calculate the UDP checksum of the datagram. More... | |
UdpCsum | reCalculateUdpChecksum (Ip4Addr ipSa, Ip4Addr ipDa) |
Recalculate the UDP checksum of a datagram. More... | |
bool | isWellFormed (const char *callerName, Ip4Addr ipSa, Ip4Addr ipDa) |
Checks if the datagram header fields are properly set. More... | |
bool | writeAxisUdpToFile (AxisUdp *axisUdp, ofstream &outFileStream) |
Dump an AxisUdp chunk to a file. More... | |
bool | writeToDatFile (ofstream &outFileStream) |
Dump this UDP datagram as raw AxisUdp chunks into a file. More... | |
bool | writePayloadToDatFile (ofstream &outFileStream) |
Dump the payload of this datagram as AxisUdp chunks into a file. More... | |
Class UDP Datagram.
This class defines an UDP datagram as a stream of 'AxisUdp' data chunks. Such an UDP datagram consists of a double-ended queue that is used to accumulate all these data chunks. For the 10GbE MAC, the UDP chunks are 64 bits wide.
Definition at line 47 of file SimUdpDatagram.hpp.
|
inline |
Definition at line 83 of file SimUdpDatagram.hpp.
|
inline |
Definition at line 95 of file SimUdpDatagram.hpp.
|
inline |
Definition at line 189 of file SimUdpDatagram.hpp.
Calculate the UDP checksum of the datagram.
@Warning The checksum is computed on the double-ended queue which holds the UDP chunks in little-endian order (see AxisUdp) !
Definition at line 240 of file SimUdpDatagram.hpp.
|
inline |
Clone a UDP datagram.
[in] | udpDgm | A reference to the datagram to clone. |
Definition at line 132 of file SimUdpDatagram.hpp.
|
inline |
Clone the header of a UDP datagram.
[in] | udpDgm | A reference to the datagram to clone. |
Definition at line 145 of file SimUdpDatagram.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
Checks if the datagram header fields are properly set.
[in] | callerName | The name of the calling function or process. |
[in] | ipSa | The IP source address. |
[in] | ipDa | The IP destination address. |
Definition at line 305 of file SimUdpDatagram.hpp.
|
inline |
|
inline |
Definition at line 111 of file SimUdpDatagram.hpp.
|
inline |
Pull the header of this datagram.
Definition at line 166 of file SimUdpDatagram.hpp.
|
inline |
Definition at line 101 of file SimUdpDatagram.hpp.
Recalculate the UDP checksum of a datagram.
Definition at line 289 of file SimUdpDatagram.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Dump an AxisUdp chunk to a file.
[in] | axisUdp | A pointer to the AxisUdp chunk to write. |
[in] | outFileStream | A reference to the file stream to write. |
Definition at line 333 of file SimUdpDatagram.hpp.
|
inline |
Dump the payload of this datagram as AxisUdp chunks into a file.
[in] | outFileStream | A reference to the file stream to write. |
Definition at line 363 of file SimUdpDatagram.hpp.
|
inline |
Dump this UDP datagram as raw AxisUdp chunks into a file.
[in] | outFileStream | A reference to the file stream to write. |
Definition at line 348 of file SimUdpDatagram.hpp.