81 Link(
const char *fname,
int baud,
NCP *ncp,
unsigned short verbose,
const int cancellationFd);
Wrapper class featuring range-checking and string representation of enumerated values.
void reset()
Reset connection and attempt to reconnect to the peer.
std::vector< bufferStore > waitQueue
unsigned short getVerbose()
Get current verbosity of Link.
void transmit(bufferStore buf)
std::vector< ackWaitQueueElement > ackWaitQueue
friend void * expire_check(void *)
void flush()
Wait, until all outstanding packets are acknowledged or timed out.
void send(const bufferStore &buff)
Send a PLP packet to the Peer.
Enum< link_type > linkType
pthread_mutex_t queueMutex
~Link()
Disconnects from device and destroys instance.
Enum< link_type > getLinkType()
Get the current link type.
void purgeQueue(int channel)
Purge all outstanding packets for a specified remote channel.
int getSpeed()
Get current speed of the serial device.
void receive(bufferStore buf)
Effectively a delegate method that accepts data from our packet instance.
void transmitHoldQueue(int channel)
void multiAck(struct timeval)
bool hasFailed()
Query connection failure.
std::vector< bufferStore > holdQueue
unsigned long retransTimeout()
void setVerbose(unsigned short _verbose)
Set verbosity of Link and underlying packet instance.
bool stuffToSend()
Query outstanding packets.
A generic container for an array of bytes.
static void * expire_check(void *)
Describes a transmitted packet which has not yet been acknowledged by the peer.
int seq
Original sequence number.
bufferStore data
Packet content.
int txcount
Number of remaining transmit retries.