81 Link(
const char *fname,
int baud,
NCP *ncp,
bool noDSRCheck,
unsigned short verbose,
const int cancellationFd);
A generic container for an array of bytes.
Thread-safe class responsible for managing the underlying serial device and data link framing.
Wrapper class featuring range-checking and string representation of enumerated values.
void reset()
Reset connection and attempt to reconnect to the peer.
friend void * expire_check(void *)
const unsigned short verbose_
void transmit(BufferStore buf)
void sendAck(int seq, Enum< link_type > linkType)
void sendReq(Enum< link_type > linkType)
~Link()
Disconnects from device and destroys instance.
Enum< link_type > linkType_
Enum< link_type > getLinkType()
Get the current link type.
pthread_mutex_t queueMutex_
void purgeQueue(int channel)
Purge all outstanding packets for a specified remote channel.
int getSpeed()
Get current speed of the serial device.
std::vector< BufferStore > holdQueue_
void send(const BufferStore &buff)
Send a PLP packet to the Peer.
void transmitHoldQueue(int channel)
void multiAck(struct timeval)
bool hasFailed()
Query connection failure.
std::vector< BufferStore > waitQueue_
void receive(BufferStore buf)
Effectively a delegate method that accepts data from our DataLink instance.
unsigned long retransTimeout()
bool stuffToSend()
Query outstanding packets.
std::vector< AckWaitQueueElement > ackWaitQueue
const int cancellationFd_
Used to signal cancellation.
static void * expire_check(void *)
Describes a transmitted packet which has not yet been acknowledged by the peer.
BufferStore data
Packet content.
int txcount
Number of remaining transmit retries.
int seq
Original sequence number.