nidas v1.2.3
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TeeI2C Class Reference

Public Member Functions

 TeeI2C ()
 
 ~TeeI2C ()
 
int parseRunstring (int argc, char **argv)
 
int run () throw ()
 
void writeOutput (const unsigned char *buf, int len)
 
void setFIFOPriority (int val)
 
int usage ()
 
void writeFilteredOutput (const char *input, int len, const fd_set &wfds)
 Check NMEA message for good checksum, date and time fields.
 
bool checkNMEA (const char *input, const char *eom)
 
void readNMEAFile ()
 Read NMEA messages from text file.
 

Private Member Functions

 TeeI2C (const TeeI2C &)
 
TeeI2Coperator= (const TeeI2C &)
 

Private Attributes

string progname
 
string _i2cname
 
unsigned int _i2caddr
 
int _i2cfd
 
vector< string > _ptynames
 
vector< bool > _filterGPS
 
bool _doFilterGPS
 
char _filterBuffer [4096]
 
char * _fbhead
 
char * _fbtail
 
char * _fbend
 
vector< int > _ptyfds
 
bool asDaemon
 
int priority
 
sigset_t _signalMask
 
fd_set _writefdset
 
int _maxwfd
 
NidasApp _app
 
NidasAppArg Priority
 
NidasAppArg Foreground
 
NidasAppArg KeepMSB
 
NidasAppArg BlockingWrites
 
NidasAppArg OutputToFile
 
string _inputFile
 
string _filterOutputFileName
 
FILE * _outputFp
 
unsigned int _badChecksums
 
unsigned int _badFields
 
std::map< std::string, unsigned int > _badRMCFields
 
std::map< std::string, unsigned int > _badGGAFields
 
const int LOG_PERIOD_SECS = 3600
 
long long _lastLog
 

Constructor & Destructor Documentation

◆ TeeI2C() [1/2]

TeeI2C::TeeI2C ( )

◆ ~TeeI2C()

TeeI2C::~TeeI2C ( )

References _i2cfd, _outputFp, _ptyfds, _ptynames, and fclose().

◆ TeeI2C() [2/2]

TeeI2C::TeeI2C ( const TeeI2C & )
private

Member Function Documentation

◆ checkNMEA()

bool TeeI2C::checkNMEA ( const char * input,
const char * eom )

References _badGGAFields, _badRMCFields, GGA, RMC, and VLOG.

Referenced by writeFilteredOutput().

◆ operator=()

TeeI2C & TeeI2C::operator= ( const TeeI2C & )
private

◆ parseRunstring()

int TeeI2C::parseRunstring ( int argc,
char ** argv )

◆ readNMEAFile()

void TeeI2C::readNMEAFile ( )

Read NMEA messages from text file.

Used to test the filter capability.

References _inputFile, fclose(), fp, len, and writeOutput().

Referenced by run().

◆ run()

int TeeI2C::run ( )
throw ( )

◆ setFIFOPriority()

void TeeI2C::setFIFOPriority ( int val)

References progname, and WLOG.

Referenced by run().

◆ usage()

int TeeI2C::usage ( )

◆ writeFilteredOutput()

void TeeI2C::writeFilteredOutput ( const char * input,
int len,
const fd_set & wfds )

◆ writeOutput()

void TeeI2C::writeOutput ( const unsigned char * buf,
int len )

Member Data Documentation

◆ _app

NidasApp TeeI2C::_app
private

Referenced by parseRunstring(), and usage().

◆ _badChecksums

unsigned int TeeI2C::_badChecksums
private

Referenced by writeFilteredOutput().

◆ _badFields

unsigned int TeeI2C::_badFields
private

Referenced by writeFilteredOutput().

◆ _badGGAFields

std::map<std::string, unsigned int> TeeI2C::_badGGAFields
private

Referenced by checkNMEA(), and writeFilteredOutput().

◆ _badRMCFields

std::map<std::string, unsigned int> TeeI2C::_badRMCFields
private

Referenced by checkNMEA(), and writeFilteredOutput().

◆ _doFilterGPS

bool TeeI2C::_doFilterGPS
private

Referenced by parseRunstring(), and writeOutput().

◆ _fbend

char * TeeI2C::_fbend
private

Referenced by writeFilteredOutput().

◆ _fbhead

char* TeeI2C::_fbhead
private

Referenced by writeFilteredOutput().

◆ _fbtail

char * TeeI2C::_fbtail
private

Referenced by writeFilteredOutput().

◆ _filterBuffer

char TeeI2C::_filterBuffer[4096]
private

Referenced by writeFilteredOutput().

◆ _filterGPS

vector<bool> TeeI2C::_filterGPS
private

◆ _filterOutputFileName

string TeeI2C::_filterOutputFileName
private

◆ _i2caddr

unsigned int TeeI2C::_i2caddr
private

Referenced by parseRunstring(), and run().

◆ _i2cfd

int TeeI2C::_i2cfd
private

Referenced by run(), and ~TeeI2C().

◆ _i2cname

string TeeI2C::_i2cname
private

Referenced by parseRunstring(), and run().

◆ _inputFile

string TeeI2C::_inputFile
private

Referenced by parseRunstring(), and readNMEAFile().

◆ _lastLog

long long TeeI2C::_lastLog
private

Referenced by writeFilteredOutput().

◆ _maxwfd

int TeeI2C::_maxwfd
private

Referenced by run(), and writeOutput().

◆ _outputFp

FILE* TeeI2C::_outputFp
private

Referenced by run(), writeFilteredOutput(), and ~TeeI2C().

◆ _ptyfds

vector<int> TeeI2C::_ptyfds
private

◆ _ptynames

vector<string> TeeI2C::_ptynames
private

◆ _signalMask

sigset_t TeeI2C::_signalMask
private

Referenced by writeOutput().

◆ _writefdset

fd_set TeeI2C::_writefdset
private

Referenced by run(), and writeOutput().

◆ asDaemon

bool TeeI2C::asDaemon
private

◆ BlockingWrites

NidasAppArg TeeI2C::BlockingWrites
private

Referenced by parseRunstring(), and writeOutput().

◆ Foreground

NidasAppArg TeeI2C::Foreground
private

Referenced by parseRunstring().

◆ KeepMSB

NidasAppArg TeeI2C::KeepMSB
private

Referenced by parseRunstring().

◆ LOG_PERIOD_SECS

const int TeeI2C::LOG_PERIOD_SECS = 3600
private

Referenced by writeFilteredOutput().

◆ OutputToFile

NidasAppArg TeeI2C::OutputToFile
private

Referenced by parseRunstring().

◆ priority

int TeeI2C::priority
private

Referenced by parseRunstring(), and run().

◆ Priority

NidasAppArg TeeI2C::Priority
private

Referenced by parseRunstring().

◆ progname

string TeeI2C::progname
private

Referenced by run(), and setFIFOPriority().


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