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
Definition at line 58 of file CNTRIPEmitter.h.
#include <mrpt/hwdrivers/CNTRIPEmitter.h>
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 |
mrpt::hwdrivers::CNTRIPEmitter::CNTRIPEmitter | ( | ) |
Constructor.
virtual mrpt::hwdrivers::CNTRIPEmitter::~CNTRIPEmitter | ( | ) | [virtual] |
Destructor.
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 62 of file CNTRIPEmitter.h.
References DEFINE_GENERIC_SENSOR.
The NTRIP comms object.
Definition at line 38 of file CNTRIPEmitter.h.
int mrpt::hwdrivers::CNTRIPEmitter::m_com_bauds [private] |
Definition at line 42 of file CNTRIPEmitter.h.
std::string mrpt::hwdrivers::CNTRIPEmitter::m_com_port [private] |
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 41 of file CNTRIPEmitter.h.
Definition at line 36 of file CNTRIPEmitter.h.
The output serial port.
Definition at line 39 of file CNTRIPEmitter.h.
Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011 |