10 #ifdef QXTRM_DRIVER_EXPORTS
11 #define QXTRM_DRIVER_API __declspec(dllexport)
13 #define QXTRM_DRIVER_API __declspec(dllimport)
16 #include "Poco/SharedPtr.h"
17 #include "../newicp/isisbase.h"
26 Poco::SharedPtr<Quixtream>
m_qx;
29 void channelStatsHelper(
int chan, qxtrmTransStatsCmd cmd,
const char* mess, std::ostream& oss)
const;
31 Qxtrm_channel(Poco::SharedPtr<Quixtream> qx,
const std::string& chan_name);
33 void RDMAWrite(uint32_t value,
unsigned int remote_address) {
RDMAWrite(&value,
sizeof(value), remote_address); }
34 void RDMARead(uint32_t& value,
unsigned int remote_address) {
RDMARead(&value,
sizeof(value), remote_address); }
35 void RDMARead(
void* buffer,
unsigned int len,
unsigned int remote_address);
36 void RDMAWrite(
const void* buffer,
unsigned int len,
unsigned int remote_address);
37 void blockSend(
const void* buffer,
unsigned int len);
38 void blockReceive(
void* buffer,
unsigned int len);
39 void streamSend(
const void* buffer,
unsigned int len);
40 void streamReceive(qxtrmStreamCallbackFunc pCallback,
unsigned int interval);
42 void RDMARegisterMemory(
void* local_address,
unsigned int len,
unsigned int rdmaAddr);
43 void RDMAUnregisterMemory(
unsigned int rdmaAddr);
44 std::string channelStatus()
const;
45 std::ostream& channelTransferStats(std::ostream& os)
const;
46 std::ostream& channelStatus(std::ostream& os)
const;
47 static void outputStreamDataCallback(
char* pDataBuffer,
unsigned int callbackSize,
bool segmentEnd);
57 Poco::SharedPtr<Quixtream>
m_qx;
58 typedef std::map< std::string, Poco::SharedPtr<Qxtrm_channel> >
chan_map_t;
62 static void getNetworkDetails(
const std::string& ip_prefix, std::string& ip_addr, std::string& mac_addr);
63 void loadConfigData(
const std::string& config_file,
int ethernet_id,
bool do_remote_config, std::string& config_data);
64 static std::string qxtrmStatusMessage(
int qxtrm_status, Quixtream* qx = NULL,
int chan =
INVALID_QXTRM_CHANNEL);
65 static std::string qxtrmChannelStatusMessage(
int qxtrm_channel_status);
66 static std::string qxtrmChannelStatusMessage(Quixtream* qx,
int chan);
67 std::ostream& channelStatus(std::ostream& os)
const;
68 std::ostream& channelTransferStats(std::ostream& os)
const;
69 Poco::SharedPtr<Qxtrm_channel> createChannel(
const std::string& chan_name);
70 Qxtrm_driver(
const std::string& config_file,
const std::string& node_name,
int ethernet_id,
int process_number,
bool do_remote_config);
78 explicit qxtrmException(
const char* message) : std::runtime_error(message) { }
79 explicit qxtrmException(
const std::string& message) : std::runtime_error(message) { }
85 std::runtime_error(message +
"(Quixtream: " +
Qxtrm_driver::qxtrmStatusMessage(qxtrm_status, qx, chan) +
")") { }
static FILE * m_outstream
Poco::SharedPtr< Quixtream > m_qx
qxtrmException(const char *message)
static const int INVALID_QXTRM_CHANNEL
qxtrmException(const std::string &message)
void RDMAWrite(uint32_t value, unsigned int remote_address)
std::map< std::string, Poco::SharedPtr< Qxtrm_channel > > chan_map_t
Poco::SharedPtr< Quixtream > m_qx
qxtrmException(int qxtrm_status, const std::string &message="", Quixtream *qx=NULL, int chan=INVALID_QXTRM_CHANNEL)
void RDMARead(uint32_t &value, unsigned int remote_address)
static int m_outstream_word_size
Exception class recording an error raised by a Quixtream API function.
static int m_outstream_columns