Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Protected Member Functions | Private Attributes

mrpt::hwdrivers::CNTRIPEmitter Class Reference


Detailed Description

This "virtual driver" encapsulates a NTRIP client (see CNTRIPClient) but adds the functionality of dumping the received datastream to a given serial port.

Used within rawlog-grabber, along CGPSInterface, this class allows to build a powerful & simple RTK-capable GPS receiver system.

Therefore, this sensor will never "collect" any observation via the CGenericSensor interface.

See also the example configuration file for rawlog-grabber in "share/mrpt/config_files/rawlog-grabber".

  PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
 -------------------------------------------------------
   [supplied_section_name]
   COM_port_WIN = COM1         // Serial port where the NTRIP stream will be dumped to.
   COM_port_LIN = ttyUSB0
   baudRate     = 38400   

   server   = 143.123.9.129    // NTRIP caster IP
   port     = 2101
   mountpoint = MYPOINT23
   //user = pepe            // User & password optional.
   //password = loco
See also:
CGPSInterface, CNTRIPClient

Definition at line 65 of file CNTRIPEmitter.h.

#include <mrpt/hwdrivers/CNTRIPEmitter.h>

Inheritance diagram for mrpt::hwdrivers::CNTRIPEmitter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CNTRIPEmitter ()
 Constructor.
virtual ~CNTRIPEmitter ()
 Destructor.
void setOutputSerialPort (const std::string &port)
 Changes the serial port to connect to (call prior to 'doProcess'), for example "COM1" or "ttyS0".
void initialize ()
 Set up the NTRIP communications, raising an exception on fatal errors.
void doProcess ()
 The main loop, which must be called in a timely fashion in order to process the incomming NTRIP data stream and dump it to the serial port.

Protected Member Functions

void loadConfig_sensorSpecific (const mrpt::utils::CConfigFileBase &configSource, const std::string &iniSection)
 Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes) See hwdrivers::CNTRIPEmitter for the possible parameters.

Private Attributes

CNTRIPClient::NTRIPArgs m_ntrip_args
CNTRIPClient m_client
 The NTRIP comms object.
CSerialPort m_out_COM
 The output serial port.
std::string m_com_port
 If set to non-empty, the serial port will be attempted to be opened automatically when this class is first used to request data from the laser.
int m_com_bauds

Constructor & Destructor Documentation

mrpt::hwdrivers::CNTRIPEmitter::CNTRIPEmitter ( )

Constructor.

virtual mrpt::hwdrivers::CNTRIPEmitter::~CNTRIPEmitter ( ) [virtual]

Destructor.


Member Function Documentation

void mrpt::hwdrivers::CNTRIPEmitter::doProcess ( ) [virtual]

The main loop, which must be called in a timely fashion in order to process the incomming NTRIP data stream and dump it to the serial port.

This method is called automatically when used within rawlog-grabber.

Implements mrpt::hwdrivers::CGenericSensor.

void mrpt::hwdrivers::CNTRIPEmitter::initialize ( ) [virtual]

Set up the NTRIP communications, raising an exception on fatal errors.

Called automatically by rawlog-grabber. If used manually, call after "loadConfig" and before "doProcess".

Reimplemented from mrpt::hwdrivers::CGenericSensor.

void mrpt::hwdrivers::CNTRIPEmitter::loadConfig_sensorSpecific ( const mrpt::utils::CConfigFileBase configSource,
const std::string &  iniSection 
) [protected, virtual]

Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes) See hwdrivers::CNTRIPEmitter for the possible parameters.

Implements mrpt::hwdrivers::CGenericSensor.

void mrpt::hwdrivers::CNTRIPEmitter::setOutputSerialPort ( const std::string &  port) [inline]

Changes the serial port to connect to (call prior to 'doProcess'), for example "COM1" or "ttyS0".

This is not needed if the configuration is loaded with "loadConfig".

Definition at line 96 of file CNTRIPEmitter.h.


Member Data Documentation

The NTRIP comms object.

Definition at line 72 of file CNTRIPEmitter.h.

Definition at line 76 of file CNTRIPEmitter.h.

If set to non-empty, the serial port will be attempted to be opened automatically when this class is first used to request data from the laser.

Definition at line 75 of file CNTRIPEmitter.h.

Definition at line 70 of file CNTRIPEmitter.h.

The output serial port.

Definition at line 73 of file CNTRIPEmitter.h.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:16:28 UTC 2011