MRPT
2.0.4
|
Header: #include <mrpt/system/os.h>
.
Library: [mrpt-system]
Enumerations | |
enum | mrpt::system::TConsoleColor { mrpt::system::CONCOL_NORMAL = 0, mrpt::system::CONCOL_BLUE = 1, mrpt::system::CONCOL_GREEN = 2, mrpt::system::CONCOL_RED = 4 } |
For use in setConsoleColor. More... | |
Functions | |
int | mrpt::system::os::sprintf (char *buf, size_t bufSize, const char *format,...) noexcept MRPT_printf_format_check(3 |
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers) More... | |
int int | mrpt::system::os::vsprintf (char *buf, size_t bufSize, const char *format, va_list args) noexcept |
An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers) More... | |
int | mrpt::system::os::vsnprintf (char *buf, size_t bufSize, const char *format, va_list args) noexcept |
An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers) More... | |
FILE * | mrpt::system::os::fopen (const char *fileName, const char *mode) noexcept |
An OS-independent version of fopen. More... | |
FILE * | mrpt::system::os::fopen (const std::string &fileName, const char *mode) noexcept |
An OS-independent version of fopen (std::string version) More... | |
int | mrpt::system::os::fprintf (FILE *fil, const char *format,...) noexcept MRPT_printf_format_check(2 |
An OS-independent version of fprintf. More... | |
int void | mrpt::system::os::fclose (FILE *f) |
An OS-independent version of fclose. More... | |
char * | mrpt::system::os::strcat (char *dest, size_t destSize, const char *source) noexcept |
An OS-independent version of strcat. More... | |
char * | mrpt::system::os::strcpy (char *dest, size_t destSize, const char *source) noexcept |
An OS-independent version of strcpy. More... | |
int | mrpt::system::os::_strcmp (const char *str1, const char *str2) noexcept |
An OS-independent version of strcmp. More... | |
int | mrpt::system::os::_strcmpi (const char *str1, const char *str2) noexcept |
An OS-independent version of strcmpi. More... | |
int | mrpt::system::os::_strncmp (const char *str, const char *subStr, size_t count) noexcept |
An OS-independent version of strncmp. More... | |
int | mrpt::system::os::_strnicmp (const char *str, const char *subStr, size_t count) noexcept |
An OS-independent version of strnicmp. More... | |
int64_t | mrpt::system::os::_strtoll (const char *nptr, char **endptr, int base) |
An OS-independent version of strtoll. More... | |
uint64_t | mrpt::system::os::_strtoull (const char *nptr, char **endptr, int base) |
An OS-independent version of strtoull. More... | |
time_t | mrpt::system::os::timegm (struct tm *tm) |
An OS-independent version of timegm (which is not present in all compilers): converts a time structure into an UTM time_t. More... | |
void | mrpt::system::os::memcpy (void *dest, size_t destSize, const void *src, size_t copyCount) noexcept |
An OS and compiler independent version of "memcpy". More... | |
int | mrpt::system::os::getch () noexcept |
An OS-independent version of getch, which waits until a key is pushed. More... | |
bool | mrpt::system::os::kbhit () noexcept |
An OS-independent version of kbhit, which returns true if a key has been pushed. More... | |
void | mrpt::system::pause (const std::string &msg=std::string("Press any key to continue...")) noexcept |
Shows the message "Press any key to continue" (or other custom message) to the current standard output and returns when a key is pressed. More... | |
void | mrpt::system::clearConsole () |
Clears the console window. More... | |
std::string | mrpt::system::MRPT_getCompilationDate () |
Returns the MRPT source code timestamp, according to the Reproducible-Builds specifications: https://reproducible-builds.org/specs/source-date-epoch/. More... | |
std::string | mrpt::system::MRPT_getVersion () |
Returns a string describing the MRPT version. More... | |
const std::string & | mrpt::system::getMRPTLicense () |
Returns a const ref to a text with the same text that appears at the beginning of each MRPT file (useful for displaying the License text in GUIs) More... | |
std::string | mrpt::system::find_mrpt_shared_dir () |
Finds the "[MRPT]/share/mrpt/" directory, if available in the system. More... | |
void | mrpt::system::setConsoleColor (TConsoleColor color, bool changeStdErr=false) |
Changes the text color in the console for the text written from now on. More... | |
int | mrpt::system::executeCommand (const std::string &command, std::string *output=nullptr, const std::string &mode="r") |
Execute Generic Shell Command. More... | |
bool | mrpt::system::launchProcess (const std::string &command) |
Executes the given command (which may contain a program + arguments), and waits until it finishes. More... | |
bool | mrpt::system::loadPluginModule (const std::string &moduleFileName, mrpt::optional_ref< std::string > outErrorMsgs=std::nullopt) |
Loads a dynamically-linked "plug-in" module (Windows: .dll, GNU/Linux: .so). More... | |
bool | mrpt::system::unloadPluginModule (const std::string &moduleFileName, mrpt::optional_ref< std::string > outErrorMsgs=std::nullopt) |
Unloads "plug-in" modules loaded with loadPluginModule(). More... | |
bool | mrpt::system::loadPluginModules (const std::string &moduleFileNames, mrpt::optional_ref< std::string > outErrorMsgs=std::nullopt) |
Like loadPluginModule(), but loads a comma (, ) separated list of "plug-in" modules. More... | |
bool | mrpt::system::unloadPluginModules (const std::string &moduleFileNames, mrpt::optional_ref< std::string > outErrorMsgs=std::nullopt) |
Unloads "plug-in" modules loaded with loadPluginModules(). More... | |
|
noexcept |
An OS-independent version of strcmp.
Definition at line 323 of file os.cpp.
Referenced by mrpt::system::strCmp().
|
noexcept |
An OS-independent version of strcmpi.
Definition at line 331 of file os.cpp.
Referenced by mrpt::obs::CSensoryFrame::eraseByLabel(), mrpt::system::CDirectoryExplorer::filterByExtension(), mrpt::hmtslam::CPropertiesValuesList::get(), mrpt::hmtslam::CMHPropertiesValuesList::get(), mrpt::hmtslam::CMHPropertiesValuesList::getAnyHypothesis(), mrpt::hmtslam::CHierarchicalMapMHPartition::getNodeByLabel(), mrpt::obs::CSensoryFrame::getObservationBySensorLabel(), mrpt::config::CConfigFileBase::keyExists(), mrpt::hwdrivers::CGPSInterface::OnConnectionEstablished(), mrpt::hmtslam::CMHPropertiesValuesList::remove(), mrpt::config::CConfigFileBase::sectionExists(), mrpt::hmtslam::CPropertiesValuesList::set(), mrpt::hmtslam::CMHPropertiesValuesList::set(), mrpt::hwdrivers::CGPSInterface::setJAVAD_AIM_mode(), mrpt::hmtslam::CMHPropertiesValuesList::setMemoryReference(), mrpt::system::strCmpI(), and mrpt::hwdrivers::CGPSInterface::unsetJAVAD_AIM_mode().
|
noexcept |
An OS-independent version of strncmp.
Definition at line 347 of file os.cpp.
Referenced by mrpt::system::strStarts().
|
noexcept |
An OS-independent version of strnicmp.
Definition at line 355 of file os.cpp.
Referenced by mrpt::system::strStartsI().
int64_t mrpt::system::os::_strtoll | ( | const char * | nptr, |
char ** | endptr, | ||
int | base | ||
) |
uint64_t mrpt::system::os::_strtoull | ( | const char * | nptr, |
char ** | endptr, | ||
int | base | ||
) |
An OS-independent version of strtoull.
Definition at line 477 of file os.cpp.
Referenced by mrpt::config::CConfigFileBase::read_uint64_t().
void mrpt::system::clearConsole | ( | ) |
int mrpt::system::executeCommand | ( | const std::string & | command, |
std::string * | output = nullptr , |
||
const std::string & | mode = "r" |
||
) |
Execute Generic Shell Command.
[in] | command | Command to execute |
[out] | output | Pointer to string containing the shell output |
[in] | mode | read/write access |
Definition at line 670 of file os.cpp.
References winerror2str().
Referenced by mrpt::comms::net::Ping().
void mrpt::system::os::fclose | ( | FILE * | f | ) |
An OS-independent version of fclose.
std::exception | On trying to close a nullptr file descriptor. |
Definition at line 286 of file os.cpp.
References THROW_EXCEPTION.
Referenced by mrpt::maps::CGasConcentrationGridMap2D::build_Gaussian_Wind_Grid(), mrpt::system::copyFile(), mrpt::maps::CLandmarksMap::fuseWith(), mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::system::getMemoryUsage(), mrpt::config::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::LoadFile(), ply_close(), mrpt::apps::ICP_SLAM_App_Base::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), mrpt::maps::CPointsMap::save2D_to_text_file(), mrpt::maps::CColouredPointsMap::save3D_and_colour_to_text_file(), mrpt::maps::CPointsMap::save3D_to_text_file(), mrpt::maps::CRandomFieldGridMap2D::saveAsMatlab3DGraph(), mrpt::tfest::TMatchingPairList::saveAsMATLABScript(), mrpt::maps::CMultiMetricMapPDF::saveCurrentPathEstimationToTextFile(), mrpt::math::saveEigenSparseTripletsToFile(), mrpt::config::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::SaveFile(), mrpt::slam::CRangeBearingKFSLAM2D::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::slam::CRangeBearingKFSLAM::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::maps::CBeaconMap::saveMetricMapRepresentationToFile(), mrpt::maps::CLandmarksMap::saveToMATLABScript2D(), mrpt::maps::CBeaconMap::saveToMATLABScript3D(), mrpt::maps::CLandmarksMap::saveToMATLABScript3D(), mrpt::poses::CPoint2DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFParticles::saveToTextFile(), mrpt::poses::CPosePDFGaussian::saveToTextFile(), mrpt::poses::CPose3DPDFParticles::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussian::saveToTextFile(), mrpt::poses::CPosePDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFSOG::saveToTextFile(), mrpt::poses::CPose3DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFSOG::saveToTextFile(), mrpt::poses::CPosePDFSOG::saveToTextFile(), mrpt::maps::CBeaconMap::saveToTextFile(), mrpt::math::MatrixVectorBase< T, CMatrixFixed< T, ROWS, COLS > >::saveToTextFile(), mrpt::maps::CLandmarksMap::saveToTextFile(), mrpt::vision::CMatchedFeatureList::saveToTextFile(), mrpt::math::CSparseMatrix::saveToTextFile_sparse(), mrpt::maps::CPointsMapXYZI::saveXYZI_to_text_file(), and mrpt::io::vectorToTextFile().
std::string mrpt::system::find_mrpt_shared_dir | ( | ) |
Finds the "[MRPT]/share/mrpt/" directory, if available in the system.
This searches in (1) source code tree, (2) install target paths.
Definition at line 621 of file os.cpp.
References dir, mrpt::system::directoryExists(), and mrpt::system::extractFileDirectory().
Referenced by run_rnav_test().
|
noexcept |
An OS-independent version of fopen.
Definition at line 268 of file os.cpp.
Referenced by mrpt::maps::CGasConcentrationGridMap2D::build_Gaussian_Wind_Grid(), mrpt::system::copyFile(), mrpt::system::os::fopen(), mrpt::maps::CLandmarksMap::fuseWith(), mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::system::getMemoryUsage(), mrpt::config::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::LoadFile(), ply_open_for_reading(), ply_open_for_writing(), mrpt::apps::ICP_SLAM_App_Base::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), mrpt::maps::CPointsMap::save2D_to_text_file(), mrpt::maps::CColouredPointsMap::save3D_and_colour_to_text_file(), mrpt::maps::CPointsMap::save3D_to_text_file(), mrpt::maps::CRandomFieldGridMap2D::saveAsMatlab3DGraph(), mrpt::tfest::TMatchingPairList::saveAsMATLABScript(), mrpt::maps::CMultiMetricMapPDF::saveCurrentPathEstimationToTextFile(), mrpt::math::saveEigenSparseTripletsToFile(), mrpt::config::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::SaveFile(), mrpt::slam::CRangeBearingKFSLAM2D::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::slam::CRangeBearingKFSLAM::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::maps::CBeaconMap::saveMetricMapRepresentationToFile(), mrpt::maps::CLandmarksMap::saveToMATLABScript2D(), mrpt::maps::CBeaconMap::saveToMATLABScript3D(), mrpt::maps::CLandmarksMap::saveToMATLABScript3D(), mrpt::poses::CPoint2DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFParticles::saveToTextFile(), mrpt::poses::CPosePDFGaussian::saveToTextFile(), mrpt::poses::CPose3DPDFParticles::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussian::saveToTextFile(), mrpt::poses::CPosePDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFSOG::saveToTextFile(), mrpt::poses::CPose3DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFSOG::saveToTextFile(), mrpt::poses::CPosePDFSOG::saveToTextFile(), mrpt::maps::CBeaconMap::saveToTextFile(), mrpt::math::MatrixVectorBase< T, CMatrixFixed< T, ROWS, COLS > >::saveToTextFile(), mrpt::maps::CLandmarksMap::saveToTextFile(), mrpt::vision::CMatchedFeatureList::saveToTextFile(), mrpt::math::CSparseMatrix::saveToTextFile_sparse(), mrpt::maps::CPointsMapXYZI::saveXYZI_to_text_file(), mrpt::io::vectorNumericFromTextFile(), and mrpt::io::vectorToTextFile().
|
noexcept |
An OS-independent version of fopen (std::string version)
Definition at line 260 of file os.cpp.
References mrpt::system::os::fopen().
|
noexcept |
An OS-independent version of fprintf.
Definition at line 419 of file os.cpp.
Referenced by mrpt::comms::CServerTCPSocket::accept(), binary_get_element(), mrpt::maps::CGasConcentrationGridMap2D::build_Gaussian_Wind_Grid(), mrpt::hwdrivers::CRoboPeakLidar::checkCOMMs(), mrpt::rtti::TRuntimeClassId::createObject(), mrpt::system::deleteFiles(), mrpt::maps::CLandmarksMap::fuseWith(), mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::hwdrivers::CRoboPeakLidar::getDeviceHealth(), mrpt::hwdrivers::CVelodyneScanner::internal_read_PCAP_packet(), nanoflann::PooledAllocator::malloc(), ply_describe_property(), ply_get_property(), ply_header_complete(), ply_put_element(), mrpt::rtti::registerClass(), mrpt::apps::ICP_SLAM_App_Base::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), mrpt::maps::CPointsMap::save2D_to_text_file(), mrpt::maps::CColouredPointsMap::save3D_and_colour_to_text_file(), mrpt::maps::CPointsMap::save3D_to_text_file(), mrpt::maps::CRandomFieldGridMap2D::saveAsMatlab3DGraph(), mrpt::tfest::TMatchingPairList::saveAsMATLABScript(), mrpt::maps::CMultiMetricMapPDF::saveCurrentPathEstimationToTextFile(), mrpt::math::saveEigenSparseTripletsToFile(), mrpt::slam::CRangeBearingKFSLAM2D::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::slam::CRangeBearingKFSLAM::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::maps::CBeaconMap::saveMetricMapRepresentationToFile(), mrpt::maps::CLandmarksMap::saveToMATLABScript2D(), mrpt::maps::CBeaconMap::saveToMATLABScript3D(), mrpt::maps::CLandmarksMap::saveToMATLABScript3D(), mrpt::poses::CPoint2DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFParticles::saveToTextFile(), mrpt::poses::CPosePDFGaussian::saveToTextFile(), mrpt::poses::CPose3DPDFParticles::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussian::saveToTextFile(), mrpt::poses::CPosePDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFSOG::saveToTextFile(), mrpt::poses::CPose3DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFSOG::saveToTextFile(), mrpt::poses::CPosePDFSOG::saveToTextFile(), mrpt::maps::CBeaconMap::saveToTextFile(), mrpt::math::MatrixVectorBase< T, CMatrixFixed< T, ROWS, COLS > >::saveToTextFile(), mrpt::maps::CLandmarksMap::saveToTextFile(), mrpt::vision::CMatchedFeatureList::saveToTextFile(), mrpt::math::CSparseMatrix::saveToTextFile_sparse(), mrpt::maps::CPointsMapXYZI::saveXYZI_to_text_file(), mrpt::system::setConsoleColor(), mrpt::system::CRateTimer::sleep(), mrpt::io::vectorToTextFile(), write_ascii_item(), and write_scalar_type().
|
noexcept |
An OS-independent version of getch, which waits until a key is pushed.
Definition at line 381 of file os.cpp.
Referenced by mrpt::apps::MonteCarloLocalization_Base::do_pf_localization(), mrpt::system::pause(), mrpt::apps::ICP_SLAM_App_Base::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), mrpt::apps::KFSLAMApp::Run_KF_SLAM(), and mrpt::gui::CBaseGUIWindow::waitForKey().
const std::string & mrpt::system::getMRPTLicense | ( | ) |
Returns a const ref to a text with the same text that appears at the beginning of each MRPT file (useful for displaying the License text in GUIs)
Definition at line 551 of file os.cpp.
References sLicenseTextF.
Referenced by CAboutBoxBase::license().
|
noexcept |
An OS-independent version of kbhit, which returns true if a key has been pushed.
Definition at line 403 of file os.cpp.
Referenced by mrpt::apps::MonteCarloLocalization_Base::do_pf_localization(), mrpt::apps::ICP_SLAM_App_Base::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), mrpt::apps::KFSLAMApp::Run_KF_SLAM(), mrpt::apps::RawlogGrabberApp::runImpl(), and mrpt::gui::CBaseGUIWindow::waitForKey().
bool mrpt::system::launchProcess | ( | const std::string & | command | ) |
Executes the given command (which may contain a program + arguments), and waits until it finishes.
Definition at line 591 of file os.cpp.
References winerror2str().
bool mrpt::system::loadPluginModule | ( | const std::string & | moduleFileName, |
mrpt::optional_ref< std::string > | outErrorMsgs = std::nullopt |
||
) |
Loads a dynamically-linked "plug-in" module (Windows: .dll, GNU/Linux: .so).
Useful to register mrpt-rtti
-based classes defined in external user code.
[in] | moduleFileName | Absolute or relative path to the module file. |
[in,out] | outErrorMsgs | If provided, error messages will be saved here. If not, errors will be dumped to std::cerr. |
bool mrpt::system::loadPluginModules | ( | const std::string & | moduleFileNames, |
mrpt::optional_ref< std::string > | outErrorMsgs = std::nullopt |
||
) |
Like loadPluginModule(), but loads a comma (,
) separated list of "plug-in" modules.
Referenced by mrpt::apps::RawlogGrabberApp::initialize().
|
noexcept |
An OS and compiler independent version of "memcpy".
Referenced by bit_cast(), mrpt::io::CMemoryStream::CMemoryStream(), mrpt::math::CSparseMatrix::construct_from_mrpt_mat(), mrpt::config::simpleini::SI_ConvertA< char >::ConvertFromStore(), mrpt::config::simpleini::SI_ConvertA< char >::ConvertToStore(), mrpt::math::CSparseMatrix::copy(), mrpt::config::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::CopyString(), mrpt::hwdrivers::CHokuyoURG::displaySensorInfo(), mrpt::comms::net::DNS_resolve_async(), KmTree::DoKMeansStep(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::math::fft_real(), mrpt::system::CFileSystemWatcher::getChanges(), mrpt::serialization::CMessage::getContentAsString(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::getLandmarkMean(), mrpt::hwdrivers::CBoardSonars::getObservation(), mrpt::hwdrivers::CEnoseModular::getObservation(), mrpt::hwdrivers::CBoardENoses::getObservation(), mrpt::comms::net::http_get(), mrpt::comms::net::http_request(), impl_stringListAsString(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF(), mrpt::maps::CRandomFieldGridMap2D::internal_clear(), mrpt::hwdrivers::CVelodyneScanner::internal_read_PCAP_packet(), mrpt::vision::pnp::p3p::jacobi_4x4(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::KF_aux_estimate_obs_Hx_jacobian(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::KF_aux_estimate_obs_Hy_jacobian(), mrpt::hwdrivers::CSickLaserSerial::LMS_sendMeasuringMode_cm_mm(), mrpt::obs::CObservation3DRangeScan::load(), mrpt::img::CImage::loadFromMemoryBuffer(), mrpt::img::CImage::loadFromStreamAsJPEG(), mrpt::gui::MRPTImage2wxImage(), mrpt::gui::CWindowDialogPlots::plot(), PointCopy(), mrpt::hwdrivers::CNTRIPClient::private_ntrip_thread(), mrpt::io::CMemoryStream::Read(), mrpt::serialization::CArchiveStreamBase< std::vector< uint8_t > >::read(), mrpt::serialization::CArchiveStreamBase< const std::vector< uint8_t > >::read(), mrpt::math::CMatrixDynamic< mrpt::math::TPoint3D_data< double > >::realloc(), mrpt::serialization::CArchive::receiveMessage(), mrpt::hwdrivers::CVelodyneScanner::receivePackets(), mrpt::maps::CRandomFieldGridMap2D::resize(), mrpt::maps::COccupancyGridMap2D::resizeGrid(), reverseBytesInPlace_2b(), reverseBytesInPlace_4b(), reverseBytesInPlace_8b(), RunKMeans(), RunKMeansOnce(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration(), KmTree::SeedKMeansPlusPlus(), mrpt::hwdrivers::CNTRIPClient::sendBackToServer(), mrpt::hwdrivers::CCANBusReader::sendCommandToCANReader(), mrpt::hwdrivers::CSickLaserSerial::SendCommandToSICK(), mrpt::serialization::CArchive::sendMessage(), mrpt::serialization::CMessage::serializeObject(), mrpt::serialization::CMessage::setContentFromString(), mrpt::hmtslam::CMHPropertiesValuesList::setElemental(), mrpt::math::detail::stub_kmeans(), mrpt::img::CCanvas::textOut(), mrpt::io::CMemoryStream::Write(), and mrpt::serialization::CArchiveStreamBase< std::vector< uint8_t > >::write().
string mrpt::system::MRPT_getCompilationDate | ( | ) |
Returns the MRPT source code timestamp, according to the Reproducible-Builds specifications: https://reproducible-builds.org/specs/source-date-epoch/.
Definition at line 165 of file os.cpp.
References mrpt::format(), and mrpt::system::now().
Referenced by CAboutBoxBase::information(), mrpt::apps::CGridMapAlignerApp::initialize(), mrpt::apps::KFSLAMApp::initialize(), mrpt::apps::RawlogGrabberApp::initialize(), mrpt::apps::RBPF_SLAM_App_Base::initialize(), mrpt::apps::ICP_SLAM_App_Base::initialize(), mrpt::apps::MonteCarloLocalization_Base::initialize(), CAboutBoxBase::MRPTBuildVersion(), and CAboutBox::OnInit().
string mrpt::system::MRPT_getVersion | ( | ) |
Returns a string describing the MRPT version.
Definition at line 198 of file os.cpp.
Referenced by CAboutBoxBase::information(), mrpt::apps::CGridMapAlignerApp::initialize(), mrpt::apps::KFSLAMApp::initialize(), mrpt::apps::RawlogGrabberApp::initialize(), mrpt::apps::RBPF_SLAM_App_Base::initialize(), mrpt::apps::ICP_SLAM_App_Base::initialize(), mrpt::apps::MonteCarloLocalization_Base::initialize(), CAboutBoxBase::MRPTBuildVersion(), and CAboutBox::OnInit().
|
noexcept |
Shows the message "Press any key to continue" (or other custom message) to the current standard output and returns when a key is pressed.
Definition at line 441 of file os.cpp.
References mrpt::system::os::getch().
Referenced by mrpt::vision::build_linear_system(), mrpt::apps::MonteCarloLocalization_Base::do_pf_localization(), mrpt::detectors::CFaceDetection::experimental_segmentFace(), mrpt::detectors::CFaceDetection::experimental_showMeasurements(), mrpt::detectors::CFaceDetection::experimental_viewFacePointsAndEigenVects(), mrpt::detectors::CFaceDetection::experimental_viewFacePointsScanned(), mrpt::detectors::CFaceDetection::experimental_viewRegions(), mrpt::obs::CObservationGasSensors::CMOSmodel::get_GasDistribution_estimation(), mrpt::slam::CICP::ICP_Method_LM(), mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::initClass(), mrpt::hmtslam::CHMTSLAM::LSLAM_process_message_from_TBI(), mrpt::obs::CObservationGasSensors::CMOSmodel::noise_filtering(), and mrpt::apps::CGridMapAlignerApp::run().
void mrpt::system::setConsoleColor | ( | TConsoleColor | color, |
bool | changeStdErr = false |
||
) |
Changes the text color in the console for the text written from now on.
The parameter "color" can be any value in TConsoleColor.
By default the color of "cout" is changed, unless changeStdErr=true, in which case "cerr" is changed.
Definition at line 486 of file os.cpp.
References mrpt::system::CONCOL_NORMAL, and mrpt::system::os::fprintf().
Referenced by mrpt::system::COutputLogger::TMsg::dumpToConsole().
|
noexcept |
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers)
Referenced by mrpt::hwdrivers::CTuMicos::changeMotionDir(), mrpt::hwdrivers::CTuMicos::clear(), mrpt::system::deleteFiles(), mrpt::maps::CBeacon::getAsMatlabDrawCommands(), mrpt::nav::CPTG_DiffDrive_CC::getDescription(), mrpt::nav::CPTG_DiffDrive_CCS::getDescription(), mrpt::nav::CPTG_DiffDrive_CS::getDescription(), mrpt::nav::CPTG_DiffDrive_alpha::getDescription(), mrpt::hwdrivers::CTuMicos::halt(), MD5::hexdigest(), mrpt::hwdrivers::CTuMicos::moveToAbsPos(), mrpt::hwdrivers::CTuMicos::moveToOffPos(), mrpt::opengl::CAxis::onUpdateBuffers_Wireframe(), mrpt::img::operator<<(), mrpt::hwdrivers::CTuMicos::radAsign(), mrpt::hwdrivers::CPtuDPerception::radAsign(), mrpt::hwdrivers::CTuMicos::radQuerry(), mrpt::hwdrivers::CTuMicos::rangeMeasure(), mrpt::hwdrivers::CTuMicos::reset(), mrpt::apps::RBPF_SLAM_App_Base::run(), mrpt::maps::CPointsMap::save2D_to_text_stream(), mrpt::maps::CPointsMap::save3D_to_text_stream(), mrpt::obs::CObservationGasSensors::CMOSmodel::save_log_map(), mrpt::maps::COccupancyGridMap2D::saveAsEMFTwoMapsWithCorrespondences(), mrpt::vision::TMultiResDescOptions::saveToConfigFile(), mrpt::hwdrivers::CHokuyoURG::setHighSensitivityMode(), mrpt::hwdrivers::CTuMicos::setLimits(), mrpt::hwdrivers::CHokuyoURG::setMotorSpeed(), mrpt::gui::CDisplayWindow::showImagesAndMatchedPoints(), mrpt::hwdrivers::CHokuyoURG::startScanningMode(), and mrpt::system::os::timegm().
|
noexcept |
An OS-independent version of strcat.
Referenced by mrpt::system::deleteFiles(), mrpt::hwdrivers::CTuMicos::transmit(), and mrpt::hwdrivers::CPtuDPerception::transmit().
|
noexcept |
An OS-independent version of strcpy.
Referenced by mrpt::hwdrivers::CImpinjRFID::closeReader(), mrpt::hwdrivers::CRovio::getEncoders(), mrpt::hwdrivers::CImpinjRFID::getObservation(), mrpt::hwdrivers::CRovio::getPosition(), mrpt::hwdrivers::CWirelessPower::GetPower(), mrpt::hwdrivers::CRovio::getRovioState(), mrpt::hwdrivers::CPtuDPerception::radAsign(), mrpt::hwdrivers::CTuMicos::receive(), mrpt::hwdrivers::CPtuDPerception::receive(), mrpt::img::CEnhancedMetaFile::selectVectorTextFont(), mrpt::system::os::timegm(), mrpt::hwdrivers::CTuMicos::transmit(), and mrpt::hwdrivers::CPtuDPerception::transmit().
time_t mrpt::system::os::timegm | ( | struct tm * | tm | ) |
An OS-independent version of timegm (which is not present in all compilers): converts a time structure into an UTM time_t.
Definition at line 122 of file os.cpp.
References mrpt::system::os::sprintf(), and mrpt::system::os::strcpy().
Referenced by mrpt::system::buildTimestampFromParts().
bool mrpt::system::unloadPluginModule | ( | const std::string & | moduleFileName, |
mrpt::optional_ref< std::string > | outErrorMsgs = std::nullopt |
||
) |
Unloads "plug-in" modules loaded with loadPluginModule().
Referenced by ModulesRegistry::~ModulesRegistry().
bool mrpt::system::unloadPluginModules | ( | const std::string & | moduleFileNames, |
mrpt::optional_ref< std::string > | outErrorMsgs = std::nullopt |
||
) |
Unloads "plug-in" modules loaded with loadPluginModules().
|
noexcept |
An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers)
Definition at line 241 of file os.cpp.
References mrpt::format(), and mrpt::system::os::vsprintf().
Referenced by mrpt::format_impl(), mrpt::system::COutputLogger::generateStringFromFormat(), and mrpt::io::CStream::printf().
|
noexcept |
An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers)
Referenced by mrpt::system::os::vsnprintf().
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |