#include "wibmod/WIB1/BNL_UDP.hh"
#include "wibmod/WIB1/BNL_UDP_Exception.hh"
#include <sys/socket.h>
#include <string.h>
#include <errno.h>
#include <string>
#include <fcntl.h>
#include <sstream>
#include <iomanip>
#include <netdb.h>
#include <algorithm>
Go to the source code of this file.
|
static std::string | dump_packet (uint8_t *data, size_t size) |
|
◆ TIMEOUT_MICROSECONDS
#define TIMEOUT_MICROSECONDS 0 |
◆ TIMEOUT_SECONDS
#define TIMEOUT_SECONDS 2 |
◆ WIB_PACKET_KEY
#define WIB_PACKET_KEY 0xDEADBEEF |
◆ WIB_RD_BASE_PORT
#define WIB_RD_BASE_PORT 32001 |
◆ WIB_REQUEST_PACKET_TRAILER
#define WIB_REQUEST_PACKET_TRAILER 0xFFFF |
◆ WIB_RPLY_BASE_PORT
#define WIB_RPLY_BASE_PORT 32002 |
◆ WIB_RPLY_PACKET_SIZE
#define WIB_RPLY_PACKET_SIZE 12 |
◆ WIB_WR_BASE_PORT
#define WIB_WR_BASE_PORT 32000 |
◆ dump_packet()
static std::string dump_packet |
( |
uint8_t * | data, |
|
|
size_t | size ) |
|
static |
Definition at line 37 of file BNL_UDP.cpp.
37 {
38
39 std::stringstream ss;
40 for(
size_t iWord = 0; iWord <
size;iWord++){
41 ss << "0x" << std::hex << std::setfill('0') << std::setw(4) << iWord;
42 ss <<
": 0x" << std::hex << std::setfill(
'0') << std::setw(2) <<
int(data[iWord]);
43 iWord++;
44 if(iWord < size){
45 ss << std::hex << std::setfill(
'0') << std::setw(2) <<
int(data[iWord]);
46 }
47 ss << std::endl;
48 }
49
50 return ss.str();
51}
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk size