#include <link.h>
Definition at line 63 of file link.h.
◆ link_type
| Enumerator |
|---|
| LINK_TYPE_UNKNOWN | |
| LINK_TYPE_SIBO | |
| LINK_TYPE_EPOC | |
Definition at line 66 of file link.h.
◆ Link()
| Link::Link |
( |
const char * |
fname, |
|
|
int |
baud, |
|
|
NCP * |
ncp, |
|
|
unsigned short |
verbose, |
|
|
const int |
cancellationFd |
|
) |
| |
Construct a new link instance.
- Parameters
-
| fname | Name of serial device. |
| baud | Speed of serial device. |
| ncp | The calling NCP instance. |
| verbose | Verbosity (for debugging/troubleshooting) |
| cancellationFd | File descriptor that can be used to signal that the Link should shutdown. |
Definition at line 59 of file link.cc.
◆ ~Link()
Disconnects from device and destroys instance.
Definition at line 85 of file link.cc.
◆ flush()
Wait, until all outstanding packets are acknowledged or timed out.
Definition at line 635 of file link.cc.
◆ getLinkType()
Get the current link type.
- Returns
- One of LINK_TYPE_... values.
Definition at line 659 of file link.cc.
◆ getSpeed()
Get current speed of the serial device.
- Returns
- The current speed in baud.
Definition at line 665 of file link.cc.
◆ getVerbose()
| unsigned short Link::getVerbose |
( |
| ) |
|
Get current verbosity of Link.
- Returns
- The verbosity, specified at construction or last call to setVerbosity();
Definition at line 116 of file link.cc.
◆ hasFailed()
Query connection failure.
- Returns
- true, if the peer could not be contacted or did not response, false if everything is ok.
Definition at line 647 of file link.cc.
◆ multiAck()
| void Link::multiAck |
( |
struct timeval |
refstamp | ) |
|
|
private |
◆ purgeAllQueues()
| void Link::purgeAllQueues |
( |
| ) |
|
|
private |
◆ purgeQueue()
| void Link::purgeQueue |
( |
int |
channel | ) |
|
Purge all outstanding packets for a specified remote channel.
- Parameters
-
| channel | The of the channel for which to remove outstanding packets. |
Definition at line 147 of file link.cc.
◆ receive()
Effectively a delegate method that accepts data from our packet instance.
Called on the packet's internal thread.
Definition at line 238 of file link.cc.
◆ reset()
Reset connection and attempt to reconnect to the peer.
Definition at line 100 of file link.cc.
◆ retransmit()
| void Link::retransmit |
( |
| ) |
|
|
private |
◆ retransTimeout()
| unsigned long Link::retransTimeout |
( |
| ) |
|
|
private |
◆ send()
Send a PLP packet to the Peer.
- Parameters
-
| buff | The contents of the PLP packet. |
Definition at line 129 of file link.cc.
◆ sendAck()
| void Link::sendAck |
( |
int |
seq | ) |
|
|
private |
◆ sendReq()
◆ sendReqCon()
| void Link::sendReqCon |
( |
| ) |
|
|
private |
◆ sendReqReq()
| void Link::sendReqReq |
( |
| ) |
|
|
private |
◆ setVerbose()
| void Link::setVerbose |
( |
unsigned short |
_verbose | ) |
|
Set verbosity of Link and underlying packet instance.
- Parameters
-
| _verbose | Verbosity (a bitmapped value, see LINK_DEBUG_.. constants) |
Definition at line 122 of file link.cc.
◆ stuffToSend()
| bool Link::stuffToSend |
( |
| ) |
|
Query outstanding packets.
- Returns
- true, if packets are outstanding (not yet acknowledged), false otherwise.
Definition at line 641 of file link.cc.
◆ transmit()
◆ transmitHoldQueue()
| void Link::transmitHoldQueue |
( |
int |
channel | ) |
|
|
private |
◆ transmitWaitQueue()
| void Link::transmitWaitQueue |
( |
| ) |
|
|
private |
◆ expire_check
| void * expire_check |
( |
void * |
| ) |
|
|
friend |
◆ packet
◆ ackWaitQueue
◆ checkthread
| pthread_t Link::checkthread |
|
private |
◆ conMagic
| unsigned long Link::conMagic |
|
private |
◆ failed
◆ holdQueue
◆ linkType
◆ maxOutstanding
◆ queueMutex
| pthread_mutex_t Link::queueMutex |
|
private |
◆ rxSequence
◆ seqMask
◆ theNCP
◆ txSequence
◆ verbose
| unsigned short Link::verbose |
|
private |
◆ waitQueue
◆ xoff
The documentation for this class was generated from the following files: