Go to the documentation of this file.
191 const std::shared_ptr<mrpt::io::CStream>& external_stream,
192 const std::shared_ptr<std::mutex>& csOptionalExternalStream =
193 std::shared_ptr<std::mutex>());
272 std::make_shared<std::mutex>();
281 const std::string& iniSection)
override;
std::vector< std::string > m_setup_cmds
static struct FontData data
bool m_data_stream_is_external
void flushParsedMessagesNow()
Queue out now the messages in m_just_parsed_messages, leaving it empty.
~CGPSInterface() override
Dtor.
#define MRPT_ENUM_TYPE_END()
bool isGPS_connected()
Returns true if communications work, i.e.
static bool parse_NMEA(const std::string &cmd_line, mrpt::obs::CObservationGPS &out_obs, const bool verbose=false)
Parses one line of NMEA data from a GPS receiver, and writes the recognized fields (if any) into an o...
std::string getSerialPortName() const
Get the serial port to use (COM1, ttyUSB0, etc).
std::shared_ptr< std::mutex > m_data_stream_cs
double getSetupCommandsDelay() const
A class capable of reading GPS/GNSS/GNSS+IMU receiver data, from a serial port or from any input stre...
CGPSInterface()
Default ctor.
void setJAVAD_rtk_src_port(const std::string &s)
If not empty, will send a cmd "set,/par/pos/pd/port,...".
bool m_topcon_AIMConfigured
Indicates if the AIM has been properly set up.
bool m_custom_cmds_append_CRLF
void enableSetupCommandsAppendCRLF(const bool enable)
void parseBuffer()
Process data in "m_buffer" to extract GPS messages, and remove them from the buffer.
bool unsetJAVAD_AIM_mode()
Unset Advanced Input Mode for the primary port and use it only as a command port.
void setJAVAD_rtk_src_baud(unsigned int baud)
Only used when "m_JAVAD_rtk_src_port" is not empty.
unsigned int m_JAVAD_rtk_src_baud
Only used when "m_JAVAD_rtk_src_port" is not empty.
bool setJAVAD_AIM_mode()
Set Advanced Input Mode for the primary port.
Contains classes for various device interfaces.
MRPT_FILL_ENUM_MEMBER(CGPSInterface, NONE)
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
bool legacy_topcon_setup_commands()
double m_topcon_data_period
The period in seconds which the data should be provided by the GPS.
bool tryToOpenTheCOM()
Returns true if the COM port is already open, or try to open it in other case.
#define MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS)
bool(CGPSInterface::*)(size_t &out_minimum_rx_buf_to_decide) ptr_parser_t
void setSerialPortName(const std::string &COM_port)
Set the serial port to use (COM1, ttyUSB0, etc).
mrpt::containers::circular_buffer< uint8_t > m_rx_buffer
Auxiliary buffer for readings.
void setParser(PARSERS parser)
Select the parser for incomming data, among the options enumerated in CGPSInterface.
const std::vector< std::string > & getShutdownCommands() const
std::string m_last_GGA
Used in getLastGGA()
std::vector< std::string > m_shutdown_cmds
std::string m_raw_dump_file_prefix
std::string getRawDumpFilePrefix() const
bool OnConnectionEstablished()
Implements custom messages to be sent to the GPS unit just after connection and before normal use.
bool m_topcon_useAIMMode
Use this mode for receive RTK corrections from a external source through the primary port.
void setSetupCommandsDelay(const double delay_secs)
PARSERS getParser() const
void bindStream(const std::shared_ptr< mrpt::io::CStream > &external_stream, const std::shared_ptr< std::mutex > &csOptionalExternalStream=std::shared_ptr< std::mutex >())
This enforces the use of a given user stream, instead of trying to open the serial port set in this c...
void setRawDumpFilePrefix(const std::string &filePrefix)
If set to non-empty, RAW GPS serial data will be also dumped to a separate file.
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection) override
See the class documentation at the top for expected parameters.
bool useExternalStream() const
This class allows loading and storing values and vectors of different types from a configuration text...
void setSetupCommands(const std::vector< std::string > &cmds)
double m_custom_cmds_delay
void JAVAD_sendMessage(const char *str, bool waitForAnswer=true)
Private auxiliary method.
mrpt::io::CFileOutputStream m_raw_output_file
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
bool OnConnectionShutdown()
Like OnConnectionEstablished() for sending optional shutdown commands.
poses::CPose3D m_sensorPose
mrpt::Clock::time_point TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
mrpt::obs::CObservationGPS m_just_parsed_messages
A private copy of the last received gps datum.
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
std::shared_ptr< mrpt::io::CStream > m_data_stream
Typically a CSerialPort created by this class, but may be set externally.
bool isGPS_signalAcquired()
Returns true if the last message from the GPS indicates that the signal from sats has been acquired.
bool implement_parser_NOVATEL_OEM6(size_t &out_minimum_rx_buf_to_decide)
This CStream derived class allow using a file as a write-only, binary stream.
Versatile class for consistent logging and management of output messages.
const std::vector< std::string > & getSetupCommands() const
bool m_sensorLabelAppendMsgType
This class stores messages from GNSS or GNSS+IMU devices, from consumer-grade inexpensive GPS receive...
bool sendCustomCommand(const void *data, const size_t datalen)
Send a custom data block to the GNSS device right now.
bool isEnabledSetupCommandsAppendCRLF() const
std::string m_JAVAD_rtk_src_port
If not empty, will send a cmd "set,/par/pos/pd/port,...".
std::string getLastGGA(bool reset=true)
Gets the latest GGA command or an empty string if no newer GGA command was received since the last ca...
void setJAVAD_rtk_format(const std::string &s)
Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK corrections: "cmr",...
bool implement_parser_NMEA(size_t &out_minimum_rx_buf_to_decide)
PARSERS
Read about parser selection in the documentation for CGPSInterface.
mrpt::system::TTimeStamp m_last_timestamp
std::string m_JAVAD_rtk_format
Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK corrections: "cmr",...
void enableAppendMsgTypeToSensorLabel(bool enable)
void setShutdownCommands(const std::vector< std::string > &cmds)
void doProcess() override
This method will be invoked at a minimum rate of "process_rate" (Hz)
std::shared_ptr< std::mutex > m_data_stream_mine_cs
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sat Jun 27 14:00:59 UTC 2020 | |