本文整理汇总了C++中rDebug函数的典型用法代码示例。如果您正苦于以下问题:C++ rDebug函数的具体用法?C++ rDebug怎么用?C++ rDebug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rDebug函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rDebug
bool CipherFileIO::writeOneBlock(const IORequest &req) {
if (haveHeader && fsConfig->reverseEncryption) {
rDebug("writing to a reverse mount with per-file IVs is not implemented");
return -EROFS;
}
int bs = blockSize();
off_t blockNum = req.offset / bs;
if (haveHeader && fileIV == 0) initHeader();
bool ok;
if (req.dataLen != bs) {
ok = streamWrite(req.data, (int)req.dataLen, blockNum ^ fileIV);
} else {
ok = blockWrite(req.data, (int)req.dataLen, blockNum ^ fileIV);
}
if (ok) {
if (haveHeader) {
IORequest tmpReq = req;
tmpReq.offset += HEADER_SIZE;
ok = base->write(tmpReq);
} else
ok = base->write(req);
} else {
rDebug("encodeBlock failed for block %" PRIi64 ", size %i", blockNum,
req.dataLen);
ok = false;
}
return ok;
}
开发者ID:cnhup,项目名称:encfs4win-reloaded,代码行数:33,代码来源:CipherFileIO.cpp
示例2: blockSize
/**
* Read block from backing ciphertext file, decrypt it (normal mode)
* or
* Read block from backing plaintext file, then encrypt it (reverse mode)
*/
ssize_t CipherFileIO::readOneBlock(const IORequest &req) const {
int bs = blockSize();
off_t blockNum = req.offset / bs;
ssize_t readSize = 0;
IORequest tmpReq = req;
// adjust offset if we have a file header
if (haveHeader && !fsConfig->reverseEncryption) {
tmpReq.offset += HEADER_SIZE;
}
readSize = base->read(tmpReq);
bool ok;
if (readSize > 0) {
if (haveHeader && fileIV == 0)
const_cast<CipherFileIO *>(this)->initHeader();
if (readSize != bs) {
rDebug("streamRead(data, %d, IV)", (int)readSize);
ok = streamRead(tmpReq.data, (int)readSize, blockNum ^ fileIV);
} else {
ok = blockRead(tmpReq.data, (int)readSize, blockNum ^ fileIV);
}
if (!ok) {
rDebug("decodeBlock failed for block %" PRIi64 ", size %i", blockNum,
(int)readSize);
readSize = -1;
}
} else
rDebug("readSize zero for offset %" PRIi64, req.offset);
return readSize;
}
开发者ID:cnhup,项目名称:encfs4win-reloaded,代码行数:40,代码来源:CipherFileIO.cpp
示例3: rDebug
bool CipherFileIO::writeHeader() {
if (!base->isWritable()) {
// open for write..
int newFlags = lastFlags | O_RDWR;
if (base->open(newFlags) < 0) {
rDebug("writeHeader failed to re-open for write");
return false;
}
}
if (fileIV == 0) rError("Internal error: fileIV == 0 in writeHeader!!!");
rDebug("writing fileIV %" PRIu64, fileIV);
unsigned char buf[8] = {0};
for (int i = 0; i < 8; ++i) {
buf[sizeof(buf) - 1 - i] = (unsigned char)(fileIV & 0xff);
fileIV >>= 8;
}
cipher->streamEncode(buf, sizeof(buf), externalIV, key);
IORequest req;
req.offset = 0;
req.data = buf;
req.dataLen = 8;
base->write(req);
return true;
}
开发者ID:digideskio,项目名称:encfs,代码行数:30,代码来源:CipherFileIO.cpp
示例4: rDebug
Chaine TypeTemplate::Afficher() const
{
rDebug("TypeTemplate::Afficher") ;
Chaine resultat(NomComplet(this->espaceDeNom)) ;
rDebug("TypeTemplate::Afficher 2") ;
Chaine sortieParametres ;
// if (parametres)
// sortieParametres = (parametres->ToString()) ;
for(IterateurListeComposition<ParametreTemplate> parametre(this->_parametres) ;
parametre.Valide() ;
++parametre)
{
sortieParametres += ',' ;
sortieParametres += parametre->Afficher() ;
rDebug("parametre = " + parametre->Afficher()) ;
}
rDebug("fin TypeTemplate::Afficher") ;
return "template " + resultat + Chaine("::") +
classeTemplate->Name()->ToString() +
"<" + sortieParametres +">" ;
}
开发者ID:BackupTheBerlios,项目名称:projet-univers-svn,代码行数:32,代码来源:type_template.cpp
示例5: rDebug
ssize_t Memory::write(const char *buf, size_t size, off_t offset)
{
rDebug("Memory::write(%s) | m_FileSize: 0x%lx, size: 0x%lx, offset: 0x%lx",
m_name.c_str(), (long int) m_FileSize, (long int) size, (long int) offset);
m_TimeSet = false;
if ((m_FileSize == offset) && FileUtils::isZeroOnly(buf, size))
{
rDebug("Memory::write(%s) | Full of zeroes only", m_name.c_str());
assert(m_FileSizeSet == true);
assert(size > 0);
m_FileSize = offset + size;
}
else
{
// Store buffer to memory in LinearMap.
//
if (m_LinearMap.put(buf, size, offset) == -1)
return -1;
assert(m_FileSizeSet == true);
assert(size > 0);
m_FileSize = max(m_FileSize, (off_t) (offset + size));
// Try to write a block to disk if appropriate.
//
int r = write(false);
if (r == -1)
return r;
}
return size;
}
开发者ID:rdp,项目名称:fusecompress,代码行数:35,代码来源:Memory.cpp
示例6: configGetString
///Local Component parameters read at start
///Reading parameters from config file or passed in command line, with Ice machinery
///We need to supply a list of accepted values to each call
void SpecificMonitor::readConfig(RoboCompCommonBehavior::ParameterList ¶ms )
{
//Read params from config file
//Example
RoboCompCommonBehavior::Parameter aux;
aux.editable = false;
configGetString( "joystickUniversal.Device", aux.value,"/dev/input/js0");
params["joystickUniversal.Device"] = aux;
aux.editable = false;
configGetString( "joystickUniversal.NumAxes", aux.value,"2");
params["joystickUniversal.NumAxes"] = aux;
aux.editable = false;
configGetString( "joystickUniversal.NumButtons", aux.value,"1");
params["joystickUniversal.NumButtons"] = aux;
aux.editable = false;
configGetString( "joystickUniversal.BasicPeriod", aux.value,"100");
params["joystickUniversal.BasicPeriod"] = aux;
aux.editable = false;
configGetString( "joystickUniversal.NormalizationValue", aux.value,"10");
params["joystickUniversal.NormalizationValue"] = aux;
aux.editable = false;
configGetString( "joystickUniversal.VelocityAxis", aux.value,"vel");
params["joystickUniversal.VelocityAxis"] = aux;
aux.editable = false;
configGetString( "joystickUniversal.DirectionAxis", aux.value,"dir");
params["joystickUniversal.DirectionAxis"] = aux;
for (int i=0; i < atoi(params.at("joystickUniversal.NumAxes").value.c_str()); i++)
{
aux.editable = false;
std::string s = QString::number(i).toStdString();
configGetString( "joystickUniversal.Axis_" + s, aux.value , "4");
params["joystickUniversal.Axis_" + s] = aux;
rDebug("joystickUniversal.Axis_"+QString::fromStdString(s)+" = " + QString::fromStdString(params.at("joystickUniversal.Axis_" + s).value));
QStringList list = QString::fromStdString(aux.value).split(",");
if (list.size() != 4)
qFatal("joystickUniversalComp::Monitor::readConfig(): ERROR reading axis. Only %d parameters for motor %d.", list.size(), i);
aux.value=list[0].toStdString();
params["joystickUniversal.Axis_" + s +".Name"] = aux;
rDebug("joystickUniversal.Axis_" + s + ".Name = " + params.at("joystickUniversal.Axis_" + s +".Name").value);
aux.value=list[1].toStdString();
params["joystickUniversal.Axis_" + s +".MinRange"]= aux;
rDebug("joystickUniversal.Axis_"+s+".MinRange = "+ params["joystickUniversal.Axis_" + s +".MinRange"].value);
aux.value=list[2].toStdString();
params["joystickUniversal.Axis_" + s +".MaxRange"]= aux;
rDebug("joystickUniversal.Axis_"+s+".MaxRange = "+ params["joystickUniversal.Axis_" + s +".MaxRange"].value);
aux.value=list[3].toStdString();
params["joystickUniversal.Axis_" + s +".Inverted"]= aux;
rDebug("joystickUniversal.Axis_"+s+".Inverted = "+ params["joystickUniversal.Axis_" + s +".Inverted"].value);
}
}
开发者ID:BasilMVarghese,项目名称:robocomp-robolab,代码行数:62,代码来源:specificmonitor.cpp
示例7: Parent
Compress::Compress(const struct stat *st, const char *name) :
Parent (st, name)
{
if (st->st_size == 0)
{
// New empty file, default strategy
// is to compress a file.
//
m_IsCompressed = true;
// New empty file, will be compressed,
// reserve space for a FileHeader.
//
m_RawFileSize = FileHeader::MaxSize;
}
else if (st->st_size < FileHeader::MinSize)
{
// Nonempty file with length smaller than minimal length of
// the FileHeader has to be uncompressed.
m_IsCompressed = false;
}
else
{
// This is a constructor, no one could
// call the open() function yet.
assert(m_fd == -1);
try {
restoreFileHeader(name);
m_IsCompressed = m_fh.isValid();
if (m_IsCompressed)
{
m_RawFileSize = (m_fh.index == 0) ?
FileHeader::MaxSize : st->st_size;
}
}
catch (...) { m_IsCompressed = false; }
}
if (m_IsCompressed)
{
rDebug("C (%s), raw/user 0x%lx/0x%lx bytes",
name, (long int) m_RawFileSize, (long int) m_fh.size);
}
else
{
rDebug("N (%s), 0x%lx bytes", name, (long int) st->st_size);
}
}
开发者ID:keshav2125,项目名称:fusecompress,代码行数:53,代码来源:Compress.cpp
示例8: do_fuse_loop
int do_fuse_loop(struct fuse *fs, bool mt)
{
if (!fs->ch.get() || fs->ch->mountpoint.empty())
return -1;
//Calculate umasks
int umask=fs->conf.umask;
if (umask==0) umask=0777; //It's OCTAL! Really!
int dirumask=fs->conf.dirumask;
if (dirumask==0) dirumask=umask;
int fileumask=fs->conf.fileumask;
if (fileumask==0) fileumask=umask;
impl_fuse_context impl(&fs->ops,fs->user_data, fs->conf.debug!=0,
fileumask, dirumask, fs->conf.fsname, fs->conf.volname);
//Parse Dokan options
PDOKAN_OPTIONS dokanOptions = (PDOKAN_OPTIONS)malloc(sizeof(DOKAN_OPTIONS));
if (dokanOptions == NULL) {
rDebug("dokanOptions == NULL");
return -1;
}
ZeroMemory(dokanOptions, sizeof(DOKAN_OPTIONS));
dokanOptions->Options |= DOKAN_OPTION_KEEP_ALIVE|DOKAN_OPTION_REMOVABLE;
dokanOptions->GlobalContext = reinterpret_cast<ULONG64>(&impl);
wchar_t mount[MAX_PATH+1];
mbstowcs(mount,fs->ch->mountpoint.c_str(),MAX_PATH);
dokanOptions->Version = DOKAN_VERSION;
dokanOptions->MountPoint = mount;
dokanOptions->ThreadCount = mt?FUSE_THREAD_COUNT:1;
//Debug
if (fs->conf.debug)
dokanOptions->Options |= DOKAN_OPTION_DEBUG|DOKAN_OPTION_STDERR;
//Load Dokan DLL
if (!fs->ch->init()) {
rError("Couldn't load DLL.");
return -1; //Couldn't load DLL. TODO: UGLY!!
}
//The main loop!
fs->within_loop=true;
int res=fs->ch->ResolvedDokanMain(dokanOptions, &dokanOperations);
fs->within_loop=false;
rDebug("res=%i", res);
return res;
}
开发者ID:cnhup,项目名称:encfs4win-reloaded,代码行数:50,代码来源:docanfuse.cpp
示例9: assert
int Compress::open(const char *name, int flags)
{
assert(m_name == name);
int r;
r = Parent::open(name, flags);
if ((m_refs == 1) && m_IsCompressed && (m_fh.index != 0))
{
try {
restoreLayerMap();
}
catch (...)
{
// TODO: Detect error and set 'errno' correctly.
rError("%s: Failed to restore LayerMap of file '%s'", __PRETTY_FUNCTION__, name);
// Failed to restore LayerMap althrought it should be present. Mark the file
// as not compressed to pass following release() correctly.
m_IsCompressed = false;
release(name);
errno = EIO;
return -1;
}
}
rDebug("Compress::open m_refs: %d", m_refs);
return r;
}
开发者ID:keshav2125,项目名称:fusecompress,代码行数:34,代码来源:Compress.cpp
示例10: rDebug
/**
* \brief Kill component
*/
void GenericMonitor::killYourSelf()
{
rDebug("Killing myself");
worker->killYourSelf();
emit kill();
}
开发者ID:AshwinChandlapur,项目名称:perception,代码行数:10,代码来源:genericmonitor.cpp
示例11: rDebug
void Compress::storeLayerMap()
{
rDebug("%s: m_fd: %d", __PRETTY_FUNCTION__, m_fd);
// Don't store LayerMap if it has not been modified
// since begining (open).
if (!m_lm.isModified())
return;
io::nonclosable_file_descriptor file(m_fd);
file.seek(m_RawFileSize, ios_base::beg);
io::filtering_ostream out;
m_fh.type.push(out);
out.push(file);
portable_binary_oarchive pba(out);
pba << m_lm;
// Set the file header's index to the current offset
// where the index was saved.
m_fh.index = m_RawFileSize;
}
开发者ID:keshav2125,项目名称:fusecompress,代码行数:25,代码来源:Compress.cpp
示例12: rDebug
/**
* \brief Kill component
*/
void Monitor::killYourSelf()
{
rDebug("Killing myself");
this->exit();
worker->killYourSelf();
emit kill();
}
开发者ID:robocomp,项目名称:robocomp-robolab,代码行数:10,代码来源:monitor.cpp
示例13: Ui_guiDlg
/**
* \brief Default constructor
*/
GenericWorker::GenericWorker(MapPrx& mprx) :
#ifdef USE_QTGUI
Ui_guiDlg()
#else
QObject()
#endif
{
speechinform_proxy = (*(SpeechInformPrx*)mprx["SpeechInformPub"]);
mutex = new QMutex(QMutex::Recursive);
#ifdef USE_QTGUI
setupUi(this);
show();
#endif
Period = BASIC_PERIOD;
connect(&timer, SIGNAL(timeout()), this, SLOT(compute()));
// timer.start(Period);
}
/**
* \brief Default destructor
*/
GenericWorker::~GenericWorker()
{
}
void GenericWorker::killYourSelf()
{
rDebug("Killing myself");
emit kill();
}
开发者ID:alvarovillena,项目名称:robocomp-SIMD,代码行数:37,代码来源:genericworker.cpp
示例14: nom
BaseTemplate TypeTemplate::TemplateDeBase() const
{
Chaine nom(this->classeTemplate->Name()->ToString()) ;
rDebug(nom) ;
if (nom == Chaine("Association"))
return Compilateur::Association ;
else if (nom == Chaine("Composition"))
return Compilateur::Composition ;
else if (nom == Chaine("EnsembleComposition"))
return Compilateur::EnsembleComposition ;
else if (nom == Chaine("EnsembleAssociation"))
return Compilateur::EnsembleAssociation ;
else if (nom == Chaine("FonctionObjetValeur"))
return Compilateur::FonctionObjetValeur ;
else if (nom == Chaine("FonctionCompositionObjetObjet"))
return Compilateur::FonctionCompositionObjetObjet ;
else if (nom == Chaine("FonctionAssociationObjetObjet"))
return Compilateur::FonctionAssociationObjetObjet ;
else if (nom == Chaine("FonctionCompositionValeurObjet"))
return Compilateur::FonctionCompositionValeurObjet ;
else if (nom == Chaine("FonctionAssociationValeurObjet"))
return Compilateur::FonctionAssociationValeurObjet ;
else
return Compilateur::NonPrisEnCompte ;
}
开发者ID:BackupTheBerlios,项目名称:projet-univers-svn,代码行数:29,代码来源:type_template.cpp
示例15: Ui_guiDlg
/**
* \brief Default constructor
*/
GenericWorker::GenericWorker(MapPrx& mprx) :
#ifdef USE_QTGUI
Ui_guiDlg()
#else
QObject()
#endif
{
innermodelmanager_proxy = (*(InnerModelManagerPrx*)mprx["InnerModelManagerProxy"]);
jointmotor0_proxy = (*(JointMotorPrx*)mprx["JointMotor0Proxy"]);
jointmotor1_proxy = (*(JointMotorPrx*)mprx["JointMotor1Proxy"]);
differentialrobot_proxy = (*(DifferentialRobotPrx*)mprx["DifferentialRobotProxy"]);
mutex = new QMutex();
#ifdef USE_QTGUI
setupUi(this);
show();
#endif
Period = BASIC_PERIOD;
connect(&timer, SIGNAL(timeout()), this, SLOT(compute()));
}
/**
* \brief Default destructor
*/
GenericWorker::~GenericWorker()
{
}
void GenericWorker::killYourSelf()
{
rDebug("Killing myself");
emit kill();
}
开发者ID:pbustos,项目名称:beta-robotica-class,代码行数:37,代码来源:genericworker.cpp
示例16: qt_msg_handler
void qt_msg_handler(QtMsgType type, const char *msg)
#endif
{
switch (type) {
case QtDebugMsg:
rDebug(QString("QtDebugMsg: %1").arg(msg));
break;
case QtWarningMsg:
rNotice(QString("QtWarningMsg: %1").arg(msg));
break;
case QtCriticalMsg:
rWarn(QString("QtCriticalMsg: %1").arg(msg));
break;
case QtFatalMsg:
rError(QString("QtFatalMsg: %1").arg(msg));
break;
#if QT_VERSION >= QT_VERSION_CHECK (5, 5, 0)
case QtInfoMsg:
break;
#endif
}
if (type == QtFatalMsg) {
rError("Fatal Qt error. Aborting.");
abort();
}
}
开发者ID:jiangxilong,项目名称:RetroShare,代码行数:26,代码来源:rshare.cpp
示例17: Ui_guiDlg
/**
* \brief Default constructor
*/
GenericWorker::GenericWorker(MapPrx& mprx) :
#ifdef USE_QTGUI
Ui_guiDlg()
#else
QObject()
#endif
{
innermodelmanager_proxy = (*(InnerModelManagerPrx*)mprx["InnerModelManagerProxy"]);
agmexecutive_proxy = (*(AGMExecutivePrx*)mprx["AGMExecutiveProxy"]);
mutex = new QMutex(QMutex::Recursive);
#ifdef USE_QTGUI
setupUi(this);
show();
#endif
Period = BASIC_PERIOD;
connect(&timer, SIGNAL(timeout()), this, SLOT(compute()));
// timer.start(Period);
}
/**
* \brief Default destructor
*/
GenericWorker::~GenericWorker()
{
}
void GenericWorker::killYourSelf()
{
rDebug("Killing myself");
emit kill();
}
开发者ID:robocomp,项目名称:robocomp-shelly,代码行数:37,代码来源:genericworker.cpp
示例18: Ui_guiDlg
/**
* \brief Default constructor
*/
GenericWorker::GenericWorker(MapPrx& mprx) :
#ifdef USE_QTGUI
Ui_guiDlg()
#else
QObject()
#endif
{
inversekinematics_proxy = (*(InverseKinematicsPrx*)mprx["InverseKinematicsProxy"]);
jointmotor_proxy = (*(JointMotorPrx*)mprx["JointMotorProxy"]);
mutex = new QMutex(QMutex::Recursive);
#ifdef USE_QTGUI
setupUi(this);
show();
#endif
Period = BASIC_PERIOD;
connect(&timer, SIGNAL(timeout()), this, SLOT(compute()));
// timer.start(Period);
}
/**
* \brief Default destructor
*/
GenericWorker::~GenericWorker()
{
}
void GenericWorker::killYourSelf()
{
rDebug("Killing myself");
emit kill();
}
开发者ID:BasilMVarghese,项目名称:robocomp-robolab,代码行数:38,代码来源:genericworker.cpp
示例19: switch
/// PRIVATE METHODS
int CanBus::setBaudRate(int baudRate)
{
void * speed;
switch(baudRate)
{
case 20000: speed=VSCAN_SPEED_20K;
break;
case 50000: speed=VSCAN_SPEED_50K;
break;
case 100000:speed=VSCAN_SPEED_100K;
break;
case 125000:speed=VSCAN_SPEED_125K;
break;
case 250000:speed=VSCAN_SPEED_250K;
break;
case 500000:speed=VSCAN_SPEED_500K;
break;
case 800000:speed=VSCAN_SPEED_800K;
break;
case 1000000:speed=VSCAN_SPEED_1M;
break;
default:
rDebug("ERROR: "+QString::number(baudRate)+" no es un valor de baudRate válido (20000, 50000, 100000, 125000, 250000, 500000, 800000, 1000000)");
return -1;
}
char string[33];
int status = VSCAN_Ioctl(devHandler, VSCAN_IOCTL_SET_SPEED, VSCAN_SPEED_1M);
VSCAN_GetErrorString(status,string,32);
printf(" Apertura puerto %s\n",string);
status = VSCAN_Ioctl(devHandler, VSCAN_IOCTL_SET_TIMESTAMP, VSCAN_TIMESTAMP_ON);
VSCAN_GetErrorString(status,string,32);
printf(" SET TIME STAMP %s\n",string);
return status;
}
开发者ID:BasilMVarghese,项目名称:robocomp,代码行数:36,代码来源:canbus.cpp
示例20: printf
/**
* \brief Default constructor
*/
CanBus::CanBus(QString device, int baudRate)
{
printf("CanBus::CanBus: %s %d\n", device.toStdString().c_str(), baudRate);
rDebug("CanBus initialize");
// Open and initialize the device
devHandler = VSCAN_Open(device.toAscii().data(), VSCAN_MODE_NORMAL);
if(devHandler < 0)
{
qFatal("Failed to open Can device ");
return;
}
rDebug("Can device "+device+" oppened correctly");
if(setBaudRate(baudRate) != 0)
rDebug("Failed setting baudRate");
}
开发者ID:BasilMVarghese,项目名称:robocomp,代码行数:19,代码来源:canbus.cpp
注:本文中的rDebug函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论