Namespaces | |
mrpt::system::os | |
This namespace provides a OS-independent interface to low-level functions. | |
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 BASE_IMPEXP | mrpt::system::os::sprintf (char *buf, size_t bufSize, const char *format,...) MRPT_NO_THROWS MRPT_printf_format_check(3 |
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers) More... | |
int BASE_IMPEXP int BASE_IMPEXP | mrpt::system::os::vsprintf (char *buf, size_t bufSize, const char *format, va_list args) MRPT_NO_THROWS |
An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers) More... | |
int BASE_IMPEXP | mrpt::system::os::vsnprintf (char *buf, size_t bufSize, const char *format, va_list args) MRPT_NO_THROWS |
An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers) More... | |
FILE BASE_IMPEXP * | mrpt::system::os::fopen (const char *fileName, const char *mode) MRPT_NO_THROWS |
An OS-independent version of fopen. More... | |
FILE BASE_IMPEXP * | mrpt::system::os::fopen (const std::string &fileName, const char *mode) MRPT_NO_THROWS |
An OS-independent version of fopen (std::string version) More... | |
int BASE_IMPEXP | mrpt::system::os::fprintf (FILE *fil, const char *format,...) MRPT_NO_THROWS MRPT_printf_format_check(2 |
An OS-independent version of fprintf. More... | |
int BASE_IMPEXP void BASE_IMPEXP | mrpt::system::os::fclose (FILE *f) |
An OS-independent version of fclose. More... | |
char BASE_IMPEXP * | mrpt::system::os::strcat (char *dest, size_t destSize, const char *source) MRPT_NO_THROWS |
An OS-independent version of strcat. More... | |
char BASE_IMPEXP * | mrpt::system::os::strcpy (char *dest, size_t destSize, const char *source) MRPT_NO_THROWS |
An OS-independent version of strcpy. More... | |
int BASE_IMPEXP | mrpt::system::os::_strcmp (const char *str1, const char *str2) MRPT_NO_THROWS |
An OS-independent version of strcmp. More... | |
int BASE_IMPEXP | mrpt::system::os::_strcmpi (const char *str1, const char *str2) MRPT_NO_THROWS |
An OS-independent version of strcmpi. More... | |
int BASE_IMPEXP | mrpt::system::os::_strncmp (const char *str, const char *subStr, size_t count) MRPT_NO_THROWS |
An OS-independent version of strncmp. More... | |
int BASE_IMPEXP | mrpt::system::os::_strnicmp (const char *str, const char *subStr, size_t count) MRPT_NO_THROWS |
An OS-independent version of strnicmp. More... | |
int64_t BASE_IMPEXP | mrpt::system::os::_strtoll (const char *nptr, char **endptr, int base) |
An OS-independent version of strtoll. More... | |
uint64_t BASE_IMPEXP | mrpt::system::os::_strtoull (const char *nptr, char **endptr, int base) |
An OS-independent version of strtoull. More... | |
time_t BASE_IMPEXP | 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 BASE_IMPEXP | mrpt::system::os::memcpy (void *dest, size_t destSize, const void *src, size_t copyCount) MRPT_NO_THROWS |
An OS and compiler independent version of "memcpy". More... | |
int BASE_IMPEXP | mrpt::system::os::getch () MRPT_NO_THROWS |
An OS-independent version of getch, which waits until a key is pushed. More... | |
bool BASE_IMPEXP | mrpt::system::os::kbhit () MRPT_NO_THROWS |
An OS-independent version of kbhit, which returns true if a key has been pushed. More... | |
void BASE_IMPEXP | mrpt::system::pause (const std::string &msg=std::string("Press any key to continue...")) MRPT_NO_THROWS |
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 BASE_IMPEXP | mrpt::system::clearConsole () |
Clears the console window. More... | |
std::string BASE_IMPEXP | 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 BASE_IMPEXP | mrpt::system::MRPT_getVersion () |
Returns a string describing the MRPT version. More... | |
const std::string BASE_IMPEXP & | 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 BASE_IMPEXP | mrpt::system::find_mrpt_shared_dir () |
Finds the "[MRPT]/share/mrpt/" directory, if available in the system. More... | |
void BASE_IMPEXP | mrpt::system::setConsoleColor (TConsoleColor color, bool changeStdErr=false) |
Changes the text color in the console for the text written from now on. More... | |
int BASE_IMPEXP | mrpt::system::executeCommand (const std::string &command, std::string *output=NULL, const std::string &mode="r") |
Execute Generic Shell Command. More... | |
int mrpt::system::os::_strcmp | ( | const char * | str1, |
const char * | str2 | ||
) |
An OS-independent version of strcmp.
Definition at line 312 of file os.cpp.
Referenced by mrpt::utils::CStringList::find(), and mrpt::system::strCmp().
int mrpt::system::os::_strcmpi | ( | const char * | str1, |
const char * | str2 | ||
) |
An OS-independent version of strcmpi.
Definition at line 320 of file os.cpp.
Referenced by mrpt::utils::CTypeSelector::checkTypeIndex(), mrpt::obs::CSensoryFrame::eraseByLabel(), mrpt::utils::CSimpleDatabaseTable::fieldIndex(), mrpt::system::CDirectoryExplorer::filterByExtension(), mrpt::utils::CStringList::find(), mrpt::utils::CPropertiesValuesList::get(), mrpt::utils::CMHPropertiesValuesList::get(), mrpt::utils::CMHPropertiesValuesList::getAnyHypothesis(), mrpt::hmtslam::CHierarchicalMapMHPartition::getNodeByLabel(), mrpt::obs::CSensoryFrame::getObservationBySensorLabel(), mrpt::hwdrivers::CGPSInterface::OnConnectionEstablished(), mrpt::utils::CSimpleDatabaseTable::query(), mrpt::utils::CClientTCPSocket::receiveMessage(), mrpt::utils::CMHPropertiesValuesList::remove(), mrpt::utils::CConfigFileBase::sectionExists(), mrpt::utils::CPropertiesValuesList::set(), mrpt::utils::CMHPropertiesValuesList::set(), mrpt::hwdrivers::CGPSInterface::setJAVAD_AIM_mode(), mrpt::utils::CMHPropertiesValuesList::setMemoryReference(), mrpt::utils::CTypeSelector::setType(), mrpt::system::strCmpI(), and mrpt::hwdrivers::CGPSInterface::unsetJAVAD_AIM_mode().
int mrpt::system::os::_strncmp | ( | const char * | str1, |
const char * | str2, | ||
size_t | count | ||
) |
An OS-independent version of strncmp.
Definition at line 336 of file os.cpp.
Referenced by mrpt::system::strStarts().
int mrpt::system::os::_strnicmp | ( | const char * | str1, |
const char * | str2, | ||
size_t | count | ||
) |
An OS-independent version of strnicmp.
Definition at line 344 of file os.cpp.
Referenced by xsens::cmtScanPorts(), xsens::Cmt3::isLogFileOpen(), mrpt::system::strStartsI(), and xstrnicmp().
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 472 of file os.cpp.
Referenced by mrpt::utils::CConfigFileBase::read_uint64_t().
void mrpt::system::clearConsole | ( | ) |
int mrpt::system::executeCommand | ( | const std::string & | command, |
std::string * | output = NULL , |
||
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 603 of file os.cpp.
References MRPT_TODO, and THROW_EXCEPTION.
Referenced by mrpt::utils::net::Ping().
void mrpt::system::os::fclose | ( | FILE * | f | ) |
An OS-independent version of fclose.
std::exception | On trying to close a NULL file descriptor. |
Definition at line 272 of file os.cpp.
References THROW_EXCEPTION.
Referenced by mrpt::maps::CGasConcentrationGridMap2D::build_Gaussian_Wind_Grid(), xsens::Cmt1s::close(), xsens::Cmt1f::close(), IoInterfaceFile::closeAndDelete(), xsens::Cmt1f::closeAndDelete(), IoInterfaceFile::closeFile(), SerialInterface::closeLive(), UsbInterface::closeUsb(), mrpt::system::copyFile(), IoInterfaceFile::create(), xsens::Cmt1f::create(), doesFileExist(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::maps::CLandmarksMap::fuseWith(), mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::system::getMemoryUsage(), mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors(), mrpt::maps::CPointsMap::load2Dor3D_from_text_file(), mrpt::utils::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::LoadFile(), IoInterfaceFile::open(), xsens::Cmt1f::open(), XMLNode::openFileHelper(), XMLNode::parseFile(), ply_close(), 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::utils::TMatchingPairList::saveAsMATLABScript(), mrpt::maps::CMultiMetricMapPDF::saveCurrentPathEstimationToTextFile(), mrpt::math::saveEigenSparseTripletsToFile(), mrpt::utils::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::SaveFile(), mrpt::slam::CRangeBearingKFSLAM2D::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::slam::CRangeBearingKFSLAM::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::maps::CBeaconMap::saveMetricMapRepresentationToFile(), mrpt::poses::CPosePDFParticles::saveParzenPDFToTextFile(), mrpt::vision::saveQTableToFile(), mrpt::maps::CLandmarksMap::saveToMATLABScript2D(), mrpt::maps::CBeaconMap::saveToMATLABScript3D(), mrpt::maps::CLandmarksMap::saveToMATLABScript3D(), mrpt::utils::internal::dynamic_grid_txt_saver::saveToTextFile(), mrpt::poses::CPoint2DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFGaussian::saveToTextFile(), mrpt::poses::CPosePDFGrid::saveToTextFile(), mrpt::poses::CPose3DPDFParticles::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussian::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussianInf::saveToTextFile(), mrpt::poses::CPointPDFParticles::saveToTextFile(), mrpt::poses::CPosePDFGaussian::saveToTextFile(), mrpt::poses::CPosePDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFGaussianInf::saveToTextFile(), mrpt::poses::CPosePDFParticles::saveToTextFile(), mrpt::poses::CPose3DPDFSOG::saveToTextFile(), mrpt::poses::CPose3DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFSOG::saveToTextFile(), mrpt::poses::CPosePDFSOG::saveToTextFile(), mrpt::maps::CBeaconMap::saveToTextFile(), mrpt::maps::CLandmarksMap::saveToTextFile(), mrpt::vision::CMatchedFeatureList::saveToTextFile(), mrpt::math::CSparseMatrix::saveToTextFile_sparse(), mrpt::system::vectorToTextFile(), and XMLNode::writeToFile().
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 557 of file os.cpp.
References mrpt::system::directoryExists(), and mrpt::system::extractFileDirectory().
Referenced by run_rnav_test().
FILE * mrpt::system::os::fopen | ( | const char * | fileName, |
const char * | mode | ||
) |
An OS-independent version of fopen.
Definition at line 255 of file os.cpp.
Referenced by mrpt::maps::CGasConcentrationGridMap2D::build_Gaussian_Wind_Grid(), mrpt::system::copyFile(), IoInterfaceFile::create(), xsens::Cmt1f::create(), doesFileExist(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::system::os::fopen(), mrpt::maps::CLandmarksMap::fuseWith(), mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::system::getMemoryUsage(), mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors(), mrpt::maps::CPointsMap::load2Dor3D_from_text_file(), mrpt::utils::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::LoadFile(), IoInterfaceFile::open(), xsens::Cmt1f::open(), ply_open_for_reading(), ply_open_for_writing(), UsbInterface::readData(), SerialInterface::readData(), xsens::Cmt1s::readData(), 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::utils::TMatchingPairList::saveAsMATLABScript(), mrpt::maps::CMultiMetricMapPDF::saveCurrentPathEstimationToTextFile(), mrpt::math::saveEigenSparseTripletsToFile(), mrpt::utils::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::SaveFile(), mrpt::slam::CRangeBearingKFSLAM2D::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::slam::CRangeBearingKFSLAM::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::maps::CBeaconMap::saveMetricMapRepresentationToFile(), mrpt::poses::CPosePDFParticles::saveParzenPDFToTextFile(), mrpt::vision::saveQTableToFile(), mrpt::maps::CLandmarksMap::saveToMATLABScript2D(), mrpt::maps::CBeaconMap::saveToMATLABScript3D(), mrpt::maps::CLandmarksMap::saveToMATLABScript3D(), mrpt::utils::internal::dynamic_grid_txt_saver::saveToTextFile(), mrpt::poses::CPoint2DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFGaussian::saveToTextFile(), mrpt::poses::CPosePDFGrid::saveToTextFile(), mrpt::poses::CPose3DPDFParticles::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussian::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussianInf::saveToTextFile(), mrpt::poses::CPointPDFParticles::saveToTextFile(), mrpt::poses::CPosePDFGaussian::saveToTextFile(), mrpt::poses::CPosePDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFGaussianInf::saveToTextFile(), mrpt::poses::CPosePDFParticles::saveToTextFile(), mrpt::poses::CPose3DPDFSOG::saveToTextFile(), mrpt::poses::CPose3DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFSOG::saveToTextFile(), mrpt::poses::CPosePDFSOG::saveToTextFile(), mrpt::maps::CBeaconMap::saveToTextFile(), mrpt::maps::CLandmarksMap::saveToTextFile(), mrpt::vision::CMatchedFeatureList::saveToTextFile(), mrpt::math::CSparseMatrix::saveToTextFile_sparse(), mrpt::system::vectorFromTextFile(), mrpt::system::vectorToTextFile(), UsbInterface::writeData(), SerialInterface::writeData(), xsens::Cmt1s::writeData(), and xfopen().
FILE * mrpt::system::os::fopen | ( | const std::string & | fileName, |
const char * | mode | ||
) |
An OS-independent version of fopen (std::string version)
Definition at line 247 of file os.cpp.
References mrpt::system::os::fopen().
int mrpt::system::os::fprintf | ( | FILE * | fil, |
const char * | format, | ||
... | |||
) |
An OS-independent version of fprintf.
Definition at line 412 of file os.cpp.
Referenced by mrpt::utils::CServerTCPSocket::accept(), binary_get_element(), mrpt::maps::CGasConcentrationGridMap2D::build_Gaussian_Wind_Grid(), mrpt::hwdrivers::CRoboPeakLidar::checkCOMMs(), error_exit(), mrpt::maps::CLandmarksMap::fuseWith(), mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::hwdrivers::CRoboPeakLidar::getDeviceHealth(), mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors(), mrpt::hwdrivers::CVelodyneScanner::internal_read_PCAP_packet(), mrpt::utils::ObjectToOctetVector(), mrpt::utils::ObjectToRawString(), mrpt::utils::ObjectToString(), mrpt::utils::OctetVectorToObject(), output_message(), ply_describe_property(), ply_get_property(), ply_header_complete(), ply_put_element(), mrpt::utils::RawStringToObject(), 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::utils::TMatchingPairList::saveAsMATLABScript(), mrpt::maps::CMultiMetricMapPDF::saveCurrentPathEstimationToTextFile(), mrpt::math::saveEigenSparseTripletsToFile(), mrpt::slam::CRangeBearingKFSLAM2D::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::slam::CRangeBearingKFSLAM::saveMapAndPath2DRepresentationAsMATLABFile(), mrpt::maps::CBeaconMap::saveMetricMapRepresentationToFile(), mrpt::poses::CPosePDFParticles::saveParzenPDFToTextFile(), mrpt::vision::saveQTableToFile(), mrpt::maps::CLandmarksMap::saveToMATLABScript2D(), mrpt::maps::CBeaconMap::saveToMATLABScript3D(), mrpt::maps::CLandmarksMap::saveToMATLABScript3D(), mrpt::utils::internal::dynamic_grid_txt_saver::saveToTextFile(), mrpt::poses::CPoint2DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFGaussian::saveToTextFile(), mrpt::poses::CPose3DPDFParticles::saveToTextFile(), mrpt::poses::CPosePDFGrid::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussian::saveToTextFile(), mrpt::poses::CPose3DQuatPDFGaussianInf::saveToTextFile(), mrpt::poses::CPointPDFParticles::saveToTextFile(), mrpt::poses::CPosePDFGaussian::saveToTextFile(), mrpt::poses::CPosePDFGaussianInf::saveToTextFile(), mrpt::poses::CPose3DPDFGaussianInf::saveToTextFile(), mrpt::poses::CPosePDFParticles::saveToTextFile(), mrpt::poses::CPose3DPDFSOG::saveToTextFile(), mrpt::poses::CPose3DPDFGaussian::saveToTextFile(), mrpt::poses::CPointPDFSOG::saveToTextFile(), mrpt::poses::CPosePDFSOG::saveToTextFile(), mrpt::maps::CBeaconMap::saveToTextFile(), mrpt::maps::CLandmarksMap::saveToTextFile(), mrpt::vision::CMatchedFeatureList::saveToTextFile(), mrpt::math::CSparseMatrix::saveToTextFile_sparse(), mrpt::system::setConsoleColor(), mrpt::system::vectorToTextFile(), write_ascii_item(), write_scalar_type(), and XMLNode::writeToFile().
int mrpt::system::os::getch | ( | ) |
An OS-independent version of getch, which waits until a key is pushed.
Definition at line 375 of file os.cpp.
Referenced by mrpt::system::pause(), run_test_pf_localization(), 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 535 of file os.cpp.
References sLicenseTextF.
bool mrpt::system::os::kbhit | ( | ) |
An OS-independent version of kbhit, which returns true if a key has been pushed.
Definition at line 396 of file os.cpp.
References myKbhit().
Referenced by run_test_pf_localization(), and mrpt::gui::CBaseGUIWindow::waitForKey().
An OS and compiler independent version of "memcpy".
Definition at line 358 of file os.cpp.
References MRPT_UNUSED_PARAM.
Referenced by rp::standalone::rplidar::RPlidarDriverSerialImpl::_cacheCapsuledScanData(), rp::standalone::rplidar::RPlidarDriverSerialImpl::_cacheScanData(), mrpt::vision::bundle_adj_full(), mrpt::utils::CMemoryStream::CMemoryStream(), mrpt::vision::computeMultiOrientations(), mrpt::vision::computeMultiResolutionDescriptors(), mrpt::math::CSparseMatrix::construct_from_mrpt_mat(), mrpt::utils::simpleini::SI_ConvertA< char >::ConvertFromStore(), mrpt::utils::simpleini::SI_ConvertA< char >::ConvertToStore(), mrpt::math::CSparseMatrix::copy(), mrpt::utils::simpleini::CSimpleIniTempl< SI_CHAR, SI_STRLESS, SI_CONVERTER >::CopyString(), mrpt::utils::CImage::cross_correlation(), XMLNode::deepCopy(), xsens::IntList::deserialize(), mrpt::hwdrivers::CHokuyoURG::displaySensorInfo(), KmTree::DoKMeansStep(), mrpt::utils::CImage::extract_patch(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::math::fft_real(), xsens::Cmt3::getAvailableScenarios(), mrpt::system::CFileSystemWatcher::getChanges(), xsens::Cmt3::getConfiguration(), mrpt::utils::CMessage::getContentAsString(), xsens::Cmt3::getEMtsData(), mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::getLandmarkMean(), mrpt::hwdrivers::CBoardSonars::getObservation(), mrpt::hwdrivers::CEnoseModular::getObservation(), mrpt::hwdrivers::CBoardENoses::getObservation(), mrpt::hwdrivers::CImageGrabber_FlyCapture2::getObservation(), xsens::Cmt3::getProductCode(), mrpt::utils::CStringList::getText(), rp::standalone::rplidar::RPlidarDriverSerialImpl::grabScanData(), XMLNode::guessCharEncoding(), mrpt::utils::net::http_get(), mrpt::utils::net::http_request(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF(), mrpt::maps::CRandomFieldGridMap2D::internal_clear(), mrpt::hwdrivers::CVelodyneScanner::internal_read_PCAP_packet(), mrpt::gui::IplImage2wxImage(), 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(), xsens::List< uint32_t >::List(), mrpt::hwdrivers::CSickLaserSerial::LMS_sendMeasuringMode_cm_mm(), mrpt::utils::CImage::loadFromMemoryBuffer(), mrpt::utils::CImage::loadFromStreamAsJPEG(), xsens::Message::loadFromString(), XMLNode::maybeAddTxT(), xsens::Message::Message(), mrpt::gui::MRPTImage2wxBitmap(), mrpt::gui::MRPTImage2wxImage(), mrpt::utils::ObjectToOctetVector(), mrpt::utils::ObjectToRawString(), mrpt::utils::ObjectToString(), xsens::Message::operator=(), mrpt::graphslam::optimize_graph_spa_levmarq(), mrpt::gui::CWindowDialogPlots::plot(), PointCopy(), mrpt::hwdrivers::CNTRIPClient::private_ntrip_thread(), mrpt::utils::CMemoryStream::Read(), UsbInterface::readData(), xsens::Cmt1s::readData(), CmtDeviceConfiguration::readFromMessage(), xsens::Cmt2s::readMessage(), mrpt::utils::CStream::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(), mrpt::utils::CImage::scaleHalf(), mrpt::utils::CImage::scaleHalfSmooth(), KmTree::SeedKMeansPlusPlus(), mrpt::hwdrivers::CNTRIPClient::sendBackToServer(), mrpt::hwdrivers::CCANBusReader::sendCommandToCANReader(), mrpt::hwdrivers::CSickLaserSerial::SendCommandToSICK(), mrpt::utils::CStream::sendMessage(), xsens::IntList::serialize(), mrpt::utils::CMessage::serializeObject(), mrpt::utils::CMessage::setContentFromString(), stringDup(), mrpt::math::detail::stub_kmeans(), thread_DNS_solver_async(), mrpt::utils::CImage::update_patch(), xsens::Cmt2s::waitForMessage(), mrpt::utils::CMemoryStream::Write(), and xsens::Cmt2s::writeMessage().
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 157 of file os.cpp.
References mrpt::mrpt::format(), and mrpt::system::now().
string mrpt::system::MRPT_getVersion | ( | ) |
void mrpt::system::pause | ( | const std::string & | msg = std::string("Press any key to continue...") | ) |
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 435 of file os.cpp.
References mrpt::system::os::getch().
Referenced by mrpt::vision::build_linear_system(), mrpt::vision::computeMoreDescriptors(), 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::vision::matchMultiResolutionFeatures(), and mrpt::obs::CObservationGasSensors::CMOSmodel::noise_filtering().
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.
The parameter "color" can be:
Definition at line 489 of file os.cpp.
References mrpt::system::CONCOL_NORMAL, mrpt::system::os::fprintf(), and info.
int mrpt::system::os::sprintf | ( | char * | buf, |
size_t | bufSize, | ||
const char * | format, | ||
... | |||
) |
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compilers)
Definition at line 191 of file os.cpp.
References MRPT_UNUSED_PARAM, and mrpt::system::os::vsprintf().
Referenced by mrpt::hwdrivers::CTuMicos::changeMotionDir(), mrpt::hwdrivers::CTuMicos::clear(), xsens::cmtScanPorts(), cvFindChessboardCorners3(), mrpt::system::deleteFiles(), mrpt::nav::CAbstractPTGBasedReactive::enableLogFile(), format_message(), 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(), xsens::Cmt1s::getPortName(), mrpt::hwdrivers::CTuMicos::halt(), MD5::hexdigest(), makeFilenameUnique(), mrpt::hwdrivers::CTuMicos::moveToAbsPos(), mrpt::hwdrivers::CTuMicos::moveToOffPos(), UsbInterface::open(), SerialInterface::open(), xsens::Cmt1s::open(), XMLNode::openFileHelper(), mrpt::utils::operator<<(), mrpt::hwdrivers::CTuMicos::radAsign(), mrpt::hwdrivers::CPtuDPerception::radAsign(), mrpt::hwdrivers::CTuMicos::radQuerry(), mrpt::hwdrivers::CTuMicos::rangeMeasure(), UsbInterface::readData(), SerialInterface::readData(), xsens::Cmt1s::readData(), mrpt::opengl::CAxis::render_dl(), mrpt::opengl::gl_utils::renderSetOfObjects(), mrpt::hwdrivers::CTuMicos::reset(), mrpt::obs::CObservationGasSensors::CMOSmodel::save_log_map(), mrpt::maps::COccupancyGridMap2D::saveAsEMFTwoMapsWithCorrespondences(), mrpt::vision::TMultiResDescOptions::saveToConfigFile(), mrpt::poses::CPosePDFGrid::saveToTextFile(), mrpt::hwdrivers::CHokuyoURG::setHighSensitivityMode(), mrpt::hwdrivers::CTuMicos::setLimits(), mrpt::hwdrivers::CHokuyoURG::setMotorSpeed(), mrpt::gui::CDisplayWindow::showImageAndPoints(), mrpt::gui::CDisplayWindow::showImagesAndMatchedPoints(), mrpt::hwdrivers::CHokuyoURG::startScanningMode(), mrpt::system::os::timegm(), mrpt::pbmap::PbMapMaker::viz_cb(), UsbInterface::writeData(), SerialInterface::writeData(), xsens::Cmt1s::writeData(), xsens::IntList::writeToString(), xsens::IntList::writeToStringHex(), and xsEnumerateUsbDevices().
char * mrpt::system::os::strcat | ( | char * | dest, |
size_t | destSize, | ||
const char * | source | ||
) |
An OS-independent version of strcat.
Definition at line 281 of file os.cpp.
References MRPT_UNUSED_PARAM.
Referenced by mrpt::system::deleteFiles(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors(), mrpt::hwdrivers::CTuMicos::transmit(), and mrpt::hwdrivers::CPtuDPerception::transmit().
char * mrpt::system::os::strcpy | ( | char * | dest, |
size_t | destSize, | ||
const char * | source | ||
) |
An OS-independent version of strcpy.
Definition at line 296 of file os.cpp.
References MRPT_UNUSED_PARAM.
Referenced by mrpt::hwdrivers::CImpinjRFID::closeReader(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::hwdrivers::CRovio::getEncoders(), xsens::Cmt1f::getName(), mrpt::hwdrivers::CImpinjRFID::getObservation(), mrpt::hwdrivers::CRovio::getPosition(), mrpt::hwdrivers::CWirelessPower::GetPower(), mrpt::hwdrivers::CRovio::getRovioState(), mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors(), mrpt::opengl::C3DSScene::loadFrom3DSFile(), makeFilenameUnique(), mrpt::hwdrivers::CPtuDPerception::radAsign(), mrpt::hwdrivers::CTuMicos::receive(), mrpt::hwdrivers::CPtuDPerception::receive(), mrpt::hwdrivers::CIMUXSens::searchPortAndConnect(), mrpt::utils::CImage::setChannelsOrder_BGR(), mrpt::utils::CImage::setChannelsOrder_RGB(), mrpt::system::os::timegm(), mrpt::hwdrivers::CTuMicos::transmit(), mrpt::hwdrivers::CPtuDPerception::transmit(), and xstrcpy().
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 116 of file os.cpp.
References mrpt::system::os::sprintf(), and mrpt::system::os::strcpy().
Referenced by mrpt::system::buildTimestampFromParts().
int mrpt::system::os::vsnprintf | ( | char * | buf, |
size_t | bufSize, | ||
const char * | format, | ||
va_list | args | ||
) |
An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compilers)
Definition at line 229 of file os.cpp.
References vsnprintf, and mrpt::system::os::vsprintf().
Referenced by mrpt::format().
int mrpt::system::os::vsprintf | ( | char * | buf, |
size_t | bufSize, | ||
const char * | format, | ||
va_list | args | ||
) |
An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compilers)
Definition at line 214 of file os.cpp.
References MRPT_UNUSED_PARAM.
Referenced by mrpt::system::os::sprintf(), and mrpt::system::os::vsnprintf().
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |