Logo Search packages:      
Sourcecode: garmindev version File versions  Download package

Garmin::CSerial Class Reference

#include <CSerial.h>

Inheritance diagram for Garmin::CSerial:

Garmin::ILink

List of all members.


Detailed Description

Garmin's serial protocol.

This should be kept common to all serial devices. However if your device does not fit into the protocol implementation at all, subclass it and make your fixes.

Definition at line 46 of file CSerial.h.


Public Member Functions

void close ()
 see ILink::close()
 CSerial (const std::string &port)
uint16_t getDataType (int data_no, char tag, uint16_t protocol)
uint16_t getProductId ()
const std::string & getProductString ()
int16_t getSoftwareVersion ()
void open ()
 see ILink::open()
int read (char *data)
int read (Packet_t &data)
 see ILink::read()
void readTimeout (uint32_t milliseconds)
int setBitrate (uint32_t bitrate)
virtual int syncup (int responseCount=0)
 sync. up sequence
void write (const Packet_t &data)
 see ILink::write()

Protected Member Functions

virtual void debug (const char *mark, const Garmin::Packet_t &data)
int serial_char_read (uint8_t *byte, unsigned milliseconds)
int serial_check_ack (uint8_t cmd)
int serial_read (Packet_t &data, unsigned milliseconds=1000)
void serial_send_ack (uint8_t cmd)
void serial_send_nak (uint8_t cmd)
void serial_write (const Packet_t &data)

Protected Attributes

fd_set fds_read
struct termios gps_ttysave
int interface
std::string port
int port_fd
uint16_t productId
std::string productString
Protocol_Data_t protocolArray [GUSB_PAYLOAD_SIZE]
uint32_t protocolArraySize
uint32_t readtimeout_ms
int16_t softwareVersion

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

Generated by  Doxygen 1.6.0   Back to index