39 #ifndef SAWYER_TRANSPORT_H 40 #define SAWYER_TRANSPORT_H 100 static const char *counter_names[NUM_COUNTERS];
109 static const int RETRY_DELAY_MS = 200;
112 static const size_t MAX_QUEUE_LEN = 10000;
114 unsigned long counters[NUM_COUNTERS];
119 void enqueueMessage(
Message *msg);
121 int openComm(
const char *device);
125 void resetCounters();
136 void configure(
const char *device,
int retries);
154 Message *waitNext(
double timeout = 0.0);
158 void flush(std::list<Message *> *queue = 0);
160 void flush(
enum MessageTypes type, std::list<Message *> *queue = 0);
164 return counters[counter];
167 void printCounters(std::ostream &stream = std::cout);
172 #endif // sawyer_TRANSPORT_H
unsigned long getCounter(enum counterTypes counter)
roch_driver::RawData getdata()
std::list< Message * > rx_queue
TransportException(const char *msg, enum errors ex_type=ERROR_BASE)