plptools
Loading...
Searching...
No Matches
packet Class Reference

#include <packet.h>

Collaboration diagram for packet:

Public Member Functions

 packet (const char *fname, int baud, Link *_link, unsigned short verbose, const int cancellationFd)
 
 ~packet ()
 
void send (bufferStore &b)
 Send a buffer out to serial line. More...
 
void setEpoc (bool)
 
void setVerbose (short int)
 
short int getVerbose ()
 
int getSpeed ()
 
bool linkFailed ()
 
void reset ()
 

Private Member Functions

void addToCrc (unsigned char a, unsigned short *crc)
 
void findSync ()
 
void opByte (unsigned char a)
 
void opCByte (unsigned char a, unsigned short *crc)
 
void realWrite ()
 
void internalReset ()
 

Private Attributes

LinktheLINK
 
pthread_t datapump
 
pthread_t thisThread
 
unsigned int crc_table [256]
 
unsigned short crcOut
 
unsigned short crcIn
 
unsigned short receivedCRC
 
unsigned short inCRCstate
 
unsigned char * inBuffer
 
int inWrite
 
int inRead
 
unsigned char * outBuffer
 
int outWrite
 
int outRead
 
int startPkt
 
int lastSYN
 
bufferArray inQueue
 
bufferStore rcv
 
int foundSync
 
int fd
 
int serialStatus
 
int baud_index
 
int realBaud
 
short int verbose
 
bool esc
 
bool lastFatal
 
bool isEPOC
 
bool justStarted
 
char * devname
 
int baud
 
const int cancellationFd
 

Friends

void * pump_run (void *)
 

Detailed Description

Definition at line 37 of file packet.h.

Constructor & Destructor Documentation

◆ packet()

packet::packet ( const char *  fname,
int  baud,
Link _link,
unsigned short  verbose,
const int  cancellationFd 
)

Definition at line 162 of file packet.cc.

◆ ~packet()

packet::~packet ( )

Definition at line 210 of file packet.cc.

Member Function Documentation

◆ addToCrc()

void packet::addToCrc ( unsigned char  a,
unsigned short *  crc 
)
inlineprivate

Definition at line 58 of file packet.h.

◆ findSync()

void packet::findSync ( )
private

Definition at line 374 of file packet.cc.

◆ getSpeed()

int packet::getSpeed ( )

Definition at line 292 of file packet.cc.

◆ getVerbose()

short int packet::getVerbose ( )

Definition at line 274 of file packet.cc.

◆ internalReset()

void packet::internalReset ( )
private

Definition at line 241 of file packet.cc.

◆ linkFailed()

bool packet::linkFailed ( )

Definition at line 485 of file packet.cc.

◆ opByte()

void packet::opByte ( unsigned char  a)
private

Definition at line 342 of file packet.cc.

◆ opCByte()

void packet::opCByte ( unsigned char  a,
unsigned short *  crc 
)
private

Definition at line 351 of file packet.cc.

◆ realWrite()

void packet::realWrite ( )
private

Definition at line 361 of file packet.cc.

◆ reset()

void packet::reset ( )

Definition at line 224 of file packet.cc.

◆ send()

void packet::send ( bufferStore b)

Send a buffer out to serial line.

Definition at line 298 of file packet.cc.

◆ setEpoc()

void packet::setEpoc ( bool  _epoc)

Definition at line 286 of file packet.cc.

◆ setVerbose()

void packet::setVerbose ( short int  _verbose)

Definition at line 280 of file packet.cc.

Friends And Related Function Documentation

◆ pump_run

void * pump_run ( void *  )
friend

Definition at line 70 of file packet.cc.

Member Data Documentation

◆ baud

int packet::baud
private

Definition at line 103 of file packet.h.

◆ baud_index

int packet::baud_index
private

Definition at line 94 of file packet.h.

◆ cancellationFd

const int packet::cancellationFd
private

Definition at line 105 of file packet.h.

◆ crc_table

unsigned int packet::crc_table[256]
private

Definition at line 71 of file packet.h.

◆ crcIn

unsigned short packet::crcIn
private

Definition at line 74 of file packet.h.

◆ crcOut

unsigned short packet::crcOut
private

Definition at line 73 of file packet.h.

◆ datapump

pthread_t packet::datapump
private

Definition at line 69 of file packet.h.

◆ devname

char* packet::devname
private

Definition at line 102 of file packet.h.

◆ esc

bool packet::esc
private

Definition at line 97 of file packet.h.

◆ fd

int packet::fd
private

Definition at line 92 of file packet.h.

◆ foundSync

int packet::foundSync
private

Definition at line 91 of file packet.h.

◆ inBuffer

unsigned char* packet::inBuffer
private

Definition at line 78 of file packet.h.

◆ inCRCstate

unsigned short packet::inCRCstate
private

Definition at line 76 of file packet.h.

◆ inQueue

bufferArray packet::inQueue
private

Definition at line 89 of file packet.h.

◆ inRead

int packet::inRead
private

Definition at line 80 of file packet.h.

◆ inWrite

int packet::inWrite
private

Definition at line 79 of file packet.h.

◆ isEPOC

bool packet::isEPOC
private

Definition at line 99 of file packet.h.

◆ justStarted

bool packet::justStarted
private

Definition at line 100 of file packet.h.

◆ lastFatal

bool packet::lastFatal
private

Definition at line 98 of file packet.h.

◆ lastSYN

int packet::lastSYN
private

Definition at line 87 of file packet.h.

◆ outBuffer

unsigned char* packet::outBuffer
private

Definition at line 82 of file packet.h.

◆ outRead

int packet::outRead
private

Definition at line 84 of file packet.h.

◆ outWrite

int packet::outWrite
private

Definition at line 83 of file packet.h.

◆ rcv

bufferStore packet::rcv
private

Definition at line 90 of file packet.h.

◆ realBaud

int packet::realBaud
private

Definition at line 95 of file packet.h.

◆ receivedCRC

unsigned short packet::receivedCRC
private

Definition at line 75 of file packet.h.

◆ serialStatus

int packet::serialStatus
private

Definition at line 93 of file packet.h.

◆ startPkt

int packet::startPkt
private

Definition at line 86 of file packet.h.

◆ theLINK

Link* packet::theLINK
private

Definition at line 68 of file packet.h.

◆ thisThread

pthread_t packet::thisThread
private

Definition at line 70 of file packet.h.

◆ verbose

short int packet::verbose
private

Definition at line 96 of file packet.h.


The documentation for this class was generated from the following files: