fdhwlib  2.0.25
GpsClock Class Reference

#include <gpsclock.h>

List of all members.

Public Member Functions

Public Attributes

Private Attributes


Detailed Description

Collection of variables and function for GPS Clock messages.

Todo:
Implement status message in this class and use it with different detail levels on both server and client side.

Definition at line 46 of file gpsclock.h.


Constructor & Destructor Documentation

GpsClock::GpsClock ( )
GpsClock::~GpsClock ( )

Member Function Documentation

int GpsClock::abs ( int  value)

Return the absolut value.

int GpsClock::closeDevice ( )

Close serial port.

void GpsClock::displayCaptureBuffer ( FILE *  fout,
int  leapSecs,
int  nCaptured,
captureTimeStamp tCapture,
int  n 
)

Display the last n values of the capture inputs.

void GpsClock::displayHeader ( FILE *  fout,
const char *  title 
)
void GpsClock::displayInifileEntry ( FILE *  fout,
char *  name,
long  latitude,
long  longitude,
long  height,
const char *  item = "position",
int  comment = 0 
)

Display a ini file entry.

void GpsClock::displayMsg ( FILE *  fout,
unsigned char *  buf,
int  len 
)

Display raw data of a gpsclock message.

void GpsClock::displaySelftest ( FILE *  fout,
unsigned char *  buf,
int  len 
)

display selftest result

void GpsClock::displayStatus ( FILE *  fout,
char *  msgEa 
)
int GpsClock::getNCmds ( )

Array of gps messages.

Get the number of commands

int GpsClock::openDevice ( const char *  device = "/dev/oncore.serial.0")

Open a console application for testing.

Call back function for read access Call back function for keyboard support Open serial port for communication with GpsClock

void GpsClock::receiveMessage ( char *  msg,
int  len 
)

Receive messages from the gpsclock.

void GpsClock::receiverId ( )

Receiver ID (@Cj)

void GpsClock::selftest ( )

Self test ()

int GpsClock::sendMessage ( std::string  msg)

Send message to GpsClock.

The function will automatically send a check sum if required and the messages termination characters for oncore and auger commands.

Returns:
Number of send bytes
void GpsClock::setLeapSeconds ( int  sec)

Set the number of leap seconds.

bool GpsClock::showMessage ( )

Display message depending on command name and debug level.

int GpsClock::sign ( double  value)

Determine the sign of the value.


Member Data Documentation

std::string GpsClock::actualCmd [private]

Buffer for incomplete messages.

Actual command in the buffer

Definition at line 155 of file gpsclock.h.

std::string::size_type GpsClock::actualCmdLen [private]

Length of the actual command in the buffer.

Definition at line 158 of file gpsclock.h.

Debug level (0 = no debug output)

Definition at line 119 of file gpsclock.h.

int GpsClock::fd [private]

Connection to the clock.

Definition at line 136 of file gpsclock.h.

cmds* GpsClock::instrSet[1] [private]

List of instruction sets.

Definition at line 149 of file gpsclock.h.

std::string GpsClock::line [private]

Input line buffer.

Definition at line 143 of file gpsclock.h.

Number of retries to open the gpsclock interface.

Definition at line 139 of file gpsclock.h.

shell* GpsClock::sh [private]

Shell object for the keyboard interface.

Definition at line 146 of file gpsclock.h.


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