48 #ifndef CLEARPATH_TRANSPORT_H 49 #define CLEARPATH_TRANSPORT_H 108 static const char *counter_names[NUM_COUNTERS];
116 static const int RETRY_DELAY_MS = 200;
119 static const size_t MAX_QUEUE_LEN = 10000;
121 unsigned long counters[NUM_COUNTERS];
128 void enqueueMessage(
Message *msg);
130 int openComm(
const char *device);
134 void resetCounters();
144 void configure(
const char *device,
int retries);
161 Message *waitNext(
double timeout = 0.0);
165 void flush(std::list<Message *> *queue = 0);
167 void flush(
enum MessageTypes type, std::list<Message *> *queue = 0);
171 return counters[counter];
174 void printCounters(std::ostream &stream = std::cout);
179 #endif // CLEARPATH_TRANSPORT_H
std::list< Message * > rx_queue
TransportException(const char *msg, enum errors ex_type=ERROR_BASE)
unsigned long getCounter(enum counterTypes counter)