本文整理汇总了C++中debugOutput函数的典型用法代码示例。如果您正苦于以下问题:C++ debugOutput函数的具体用法?C++ debugOutput怎么用?C++ debugOutput使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了debugOutput函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: debugOutput
void CopyDirectoryCommand::dataReceived(QByteArray &data)
{
debugOutput(0, "CopyDirectoryCommand::dataReceived()");
CopyDirectoryOptions* options = (CopyDirectoryOptions*) data.data();
debugOutput(3, QString::fromLatin1("Copy Directory: %1 %2").arg(options->from).arg(options->to));
if (copyDir(QLatin1String(options->from) , QLatin1String(options->to) , options->recursive))
reportSuccess();
else
reportError();
}
开发者ID:Suneal,项目名称:qt,代码行数:10,代码来源:commands.cpp
示例2: debugWarning
/*
* call with lock held
*/
bool
CycleTimerHelper::initDLL() {
uint32_t cycle_timer;
uint64_t local_time;
double bw_rel = m_dll_coeff_b / (DLL_SQRT2 * DLL_2PI);
double bw_abs = bw_rel / (m_usecs_per_update / 1e6);
if (bw_rel > 0.5) {
double bw_max = 0.5 / (m_usecs_per_update / 1e6);
debugWarning("Specified DLL bandwidth too high (%f > %f), reducing to max."
" Increase the DLL update rate to increase the max DLL bandwidth\n", bw_abs, bw_max);
bw_rel = 0.49;
bw_abs = bw_rel / (m_usecs_per_update / 1e6);
m_dll_coeff_b = bw_rel * (DLL_SQRT2 * DLL_2PI);
m_dll_coeff_c = bw_rel * bw_rel * DLL_2PI * DLL_2PI;
}
if(!readCycleTimerWithRetry(&cycle_timer, &local_time, 10)) {
debugError("Could not read cycle timer register\n");
return false;
}
#if DEBUG_EXTREME_ENABLE
uint64_t cycle_timer_ticks = CYCLE_TIMER_TO_TICKS(cycle_timer);
#endif
debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11u, local: %17" PRIu64 "\n",
cycle_timer, local_time);
debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE,
" ctr : 0x%08X %11" PRIu64 " (%03us %04ucy %04uticks)\n",
(uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks,
(unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ),
(unsigned int)TICKS_TO_CYCLES( (uint64_t)cycle_timer_ticks ),
(unsigned int)TICKS_TO_OFFSET( (uint64_t)cycle_timer_ticks ) );
m_sleep_until = local_time + m_usecs_per_update;
m_dll_e2 = m_ticks_per_update;
m_current_time_usecs = local_time;
m_next_time_usecs = m_current_time_usecs + m_usecs_per_update;
m_current_time_ticks = CYCLE_TIMER_TO_TICKS( cycle_timer );
m_next_time_ticks = addTicks( (uint64_t)m_current_time_ticks, (uint64_t)m_dll_e2);
debugOutput(DEBUG_LEVEL_VERBOSE, " (%p) First run\n", this);
debugOutput(DEBUG_LEVEL_VERBOSE, " DLL bandwidth: %f Hz (rel: %f)\n",
bw_abs, bw_rel);
debugOutput(DEBUG_LEVEL_VERBOSE,
" usecs/update: %u, ticks/update: %u, m_dll_e2: %f\n",
m_usecs_per_update, m_ticks_per_update, m_dll_e2);
debugOutput(DEBUG_LEVEL_VERBOSE,
" usecs current: %f, next: %f\n",
m_current_time_usecs, m_next_time_usecs);
debugOutput(DEBUG_LEVEL_VERBOSE,
" ticks current: %f, next: %f\n",
m_current_time_ticks, m_next_time_ticks);
return true;
}
开发者ID:janosvitok,项目名称:ffado,代码行数:58,代码来源:CycleTimerHelper.cpp
示例3: debugOutput
void ConnectionManager::cleanUp()
{
debugOutput(0, "ConnectionManager::cleanUp()");
if (m_server) {
debugOutput(1, "Removing server instance...");
disconnect(m_server, SIGNAL(newConnection()), this, SLOT(newConnection()));
delete m_server;
m_server = 0;
}
}
开发者ID:maxxant,项目名称:qt,代码行数:11,代码来源:connectionmanager.cpp
示例4: NewZwCreateFile
NTSTATUS
NewZwCreateFile(
PHANDLE FileHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes,
PIO_STATUS_BLOCK IoStatusBlock,
PLARGE_INTEGER AllocationSize OPTIONAL,
ULONG FileAttributes,
ULONG ShareAccess,
ULONG CreateDisposition,
ULONG CreateOptions,
PVOID EaBuffer OPTIONAL,
ULONG EaLength) {
int status;
#ifndef NOTRY
__try {
#endif
if (restrictEnabled()) {
WCHAR buf[_MAX_PATH+1];
ACCESS_MASK mask;
int l = getFullPath(buf, sizeof(buf), ObjectAttributes);
mask = isRestricted(RESTRICT, buf);
if (mask>0) {
if (pathContainsPart(buf, buf+l-1, STR_ETC, STR_DRIVERS)) {
mask=0;
}
else {
debugOutput(buf);
debugOutput(L": NewZwCreateFile\n");
}
}
DesiredAccess &= ~mask;
}
#ifndef NOTRY
}
__except(EXCEPTION_EXECUTE_HANDLER) {
debugOutput(L"NewZwCreateFile: EXCEPTION\n");
}
#endif
status=((ZWCREATEFILE)(OldZwCreateFile)) (
FileHandle,
DesiredAccess,
ObjectAttributes,
IoStatusBlock,
AllocationSize,
FileAttributes,
ShareAccess,
CreateDisposition,
CreateOptions,
EaBuffer,
EaLength);
return status;
}
开发者ID:Artorios,项目名称:rootkit.com,代码行数:54,代码来源:h_file.c
示例5: debugOutput
void
EfcGenericMonitorCmd::showEfcCmd()
{
EfcCmd::showEfcCmd();
debugOutput(DEBUG_LEVEL_NORMAL, "EFC %s MONITOR %s:\n",
(m_type==eCT_Get?"GET":"SET"),
eMonitorCommandToString(m_command));
debugOutput(DEBUG_LEVEL_NORMAL, " Input : %ld\n", m_input);
debugOutput(DEBUG_LEVEL_NORMAL, " Output : %ld\n", m_output);
debugOutput(DEBUG_LEVEL_NORMAL, " Value : %lu\n", m_value);
}
开发者ID:janosvitok,项目名称:ffado,代码行数:11,代码来源:efc_cmds_monitor.cpp
示例6: QUdpSocket
void InputManager::init(QSettings *setting)
{
settinglink = setting;
socket = new QUdpSocket(this);
socket->bind( settinglink->value("system/net/port").toInt() );
emit debugOutput(tr("bound to UDP port:") + settinglink->value("system/net/port").toString() );
connect( socket, SIGNAL(readyRead()), this, SLOT(readPendingDatagrams()) );
emit debugOutput(tr("inputmanager initialized"));
}
开发者ID:alexkuehn,项目名称:platan,代码行数:12,代码来源:InputManager.cpp
示例7: debugOutput
void
EfcFlashWriteCmd::showEfcCmd()
{
EfcCmd::showEfcCmd();
debugOutput(DEBUG_LEVEL_NORMAL, "EFC Flash Write:\n");
debugOutput(DEBUG_LEVEL_NORMAL, " Address : %lu\n", m_address);
debugOutput(DEBUG_LEVEL_NORMAL, " Length (quadlets) : %lu\n", m_nb_quadlets);
debugOutput(DEBUG_LEVEL_NORMAL, " Data : \n");
for (unsigned int i=0; i < m_nb_quadlets; i++) {
debugOutput(DEBUG_LEVEL_NORMAL, " %08X \n", m_data[i]);
}
}
开发者ID:janosvitok,项目名称:ffado,代码行数:12,代码来源:efc_cmds_flash.cpp
示例8: debugError
bool
CycleTimerHelper::readCycleTimerWithRetry(uint32_t *cycle_timer, uint64_t *local_time, int ntries)
{
bool good=false;
int maxtries = ntries;
do {
// the ctr read can return 0 sometimes. if that happens, reread the ctr.
int maxtries2=ntries;
do {
if(!m_Parent.readCycleTimerReg(cycle_timer, local_time)) {
debugError("Could not read cycle timer register\n");
return false;
}
if (*cycle_timer == 0) {
debugOutput(DEBUG_LEVEL_VERBOSE,
"Bogus CTR: %08X on try %02d\n",
*cycle_timer, maxtries2);
}
} while (*cycle_timer == 0 && maxtries2--);
// catch bogus ctr reads (can happen)
uint64_t cycle_timer_ticks = CYCLE_TIMER_TO_TICKS(*cycle_timer);
if (diffTicks(cycle_timer_ticks, m_cycle_timer_ticks_prev) < 0) {
debugOutput( DEBUG_LEVEL_VERY_VERBOSE,
"non-monotonic CTR (try %02d): %"PRIu64" -> %"PRIu64"\n",
maxtries, m_cycle_timer_ticks_prev, cycle_timer_ticks);
debugOutput( DEBUG_LEVEL_VERY_VERBOSE,
" : %08X -> %08X\n",
m_cycle_timer_prev, *cycle_timer);
debugOutput( DEBUG_LEVEL_VERY_VERBOSE,
" current: %011"PRIu64" (%03us %04ucy %04uticks)\n",
cycle_timer_ticks,
(unsigned int)TICKS_TO_SECS( cycle_timer_ticks ),
(unsigned int)TICKS_TO_CYCLES( cycle_timer_ticks ),
(unsigned int)TICKS_TO_OFFSET( cycle_timer_ticks ) );
debugOutput( DEBUG_LEVEL_VERY_VERBOSE,
" prev : %011"PRIu64" (%03us %04ucy %04uticks)\n",
m_cycle_timer_ticks_prev,
(unsigned int)TICKS_TO_SECS( m_cycle_timer_ticks_prev ),
(unsigned int)TICKS_TO_CYCLES( m_cycle_timer_ticks_prev ),
(unsigned int)TICKS_TO_OFFSET( m_cycle_timer_ticks_prev ) );
} else {
good = true;
m_cycle_timer_prev = *cycle_timer;
m_cycle_timer_ticks_prev = cycle_timer_ticks;
}
} while (!good && maxtries--);
return true;
}
开发者ID:janosvitok,项目名称:ffado,代码行数:51,代码来源:CycleTimerHelper.cpp
示例9: debugWarning
int RmeTransmitStreamProcessor::encodePortToRmeMidiEvents(
RmeMidiPort *p, quadlet_t *data,
unsigned int offset, unsigned int nevents) {
unsigned int j;
quadlet_t *src = (quadlet_t *)p->getBufferAddress();
src += offset;
unsigned char *target = (unsigned char *)data + p->getPosition();
// Send a MIDI byte if there is one to send. RME MIDI data is sent using
// a 3-byte sequence within a frame starting at the port's position.
// A non-zero MSB indicates there is MIDI data to send.
for (j=0; j<nevents; j++, src++, target+=m_event_size) {
if (midi_lock)
midi_lock--;
/* FFADO's MIDI subsystem dictates that at the most there will be one
* MIDI byte every 8th's sample, making a MIDI byte "unlikely".
*/
if (unlikely(*src & 0xff000000)) {
/* A MIDI byte is ready to send - buffer it */
midibuffer[mb_head++] = *src;
mb_head &= MIDIBUFFER_SIZE-1;
if (unlikely(mb_head == mb_tail)) {
/* Buffer overflow - dump oldest byte. */
/* Ideally this would dump an entire MIDI message, but this is only
* feasible if it's possible to determine the message size easily.
*/
mb_tail = (mb_tail+1) & (MIDIBUFFER_SIZE-1);
debugWarning("RME MIDI buffer overflow\n");
}
debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Buffered MIDI byte %d\n", *src & 0xff);
}
/* Send the MIDI byte at the tail of the buffer if enough time has elapsed
* since the last MIDI byte was sent. For most iterations through the loop
* this condition will be false.
*/
if (unlikely(mb_head!=mb_tail && !midi_lock)) {
*(target) = 0x01;
*(target+1) = 0x00;
*(target+2) = midibuffer[mb_tail] & 0xff;
debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Sent MIDI byte %d (j=%d)\n", midibuffer[mb_tail], j);
mb_tail = (mb_tail+1) & (MIDIBUFFER_SIZE-1);
midi_lock = midi_tx_period;
}
}
return 0;
}
开发者ID:janosvitok,项目名称:ffado,代码行数:51,代码来源:RmeTransmitStreamProcessor.cpp
示例10: debugOutput
Device::~Device()
{
delete m_receiveProcessor;
delete m_transmitProcessor;
if (iso_tx_channel>=0 && !get1394Service().freeIsoChannel(iso_tx_channel)) {
debugOutput(DEBUG_LEVEL_VERBOSE, "Could not free tx iso channel %d\n", iso_tx_channel);
}
if (iso_rx_channel>=0 && !get1394Service().freeIsoChannel(iso_rx_channel)) {
debugOutput(DEBUG_LEVEL_VERBOSE, "Could not free rx iso channel %d\n", iso_rx_channel);
}
destroyMixer();
}
开发者ID:janosvitok,项目名称:ffado,代码行数:15,代码来源:digidesign_avdevice.cpp
示例11: debugOutput
SaffirePro24::SaffirePro24( DeviceManager& d,
std::auto_ptr<ConfigRom>( configRom ))
: Dice::Device(d , configRom)
{
debugOutput(DEBUG_LEVEL_VERBOSE, "Created Dice::Focusrite::SaffirePro24 (NodeID %d)\n",
getConfigRom().getNodeId());
}
开发者ID:adiknoth,项目名称:ffado,代码行数:7,代码来源:saffire_pro24.cpp
示例12: m_Parent
CycleTimerHelper::CycleTimerHelper(Ieee1394Service &parent, unsigned int update_period_us, bool rt, int prio)
: m_Parent ( parent )
, m_ticks_per_update ( ((uint64_t)TICKS_PER_SECOND) * ((uint64_t)update_period_us) / 1000000ULL )
, m_usecs_per_update ( update_period_us )
, m_avg_wakeup_delay ( 0.0 )
, m_dll_e2 ( 0.0 )
, m_current_time_usecs ( 0 )
, m_next_time_usecs ( 0 )
, m_current_time_ticks ( 0 )
, m_next_time_ticks ( 0 )
, m_first_run ( true )
, m_sleep_until ( 0 )
, m_cycle_timer_prev ( 0 )
, m_cycle_timer_ticks_prev ( 0 )
, m_current_shadow_idx ( 0 )
, m_Thread ( NULL )
, m_realtime ( rt )
, m_priority ( prio )
, m_update_lock( new Util::PosixMutex("CTRUPD") )
, m_busreset_functor ( NULL)
, m_unhandled_busreset ( false )
{
debugOutput( DEBUG_LEVEL_VERBOSE, "Create %p...\n", this);
double bw_rel = IEEE1394SERVICE_CYCLETIMER_DLL_BANDWIDTH_HZ*((double)update_period_us)/1e6;
m_dll_coeff_b = bw_rel * (DLL_SQRT2 * DLL_2PI);
m_dll_coeff_c = bw_rel * bw_rel * DLL_2PI * DLL_2PI;
}
开发者ID:janosvitok,项目名称:ffado,代码行数:28,代码来源:CycleTimerHelper.cpp
示例13: debugOutput
bool
Watchdog::WatchdogHartbeatTask::Execute()
{
if (Watchdog::WatchdogTask::Execute() == false)
return false;
debugOutput(DEBUG_LEVEL_VERY_VERBOSE,
"(%p) watchdog %p hartbeat\n", this, &m_parent);
m_parent.setHartbeat();
#ifdef DEBUG
uint64_t now = Util::SystemTimeSource::getCurrentTimeAsUsecs();
int diff = now - m_last_loop_entry;
if(diff < 100) {
debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE,
"(%p) short loop detected (%d usec), cnt: %d\n",
this, diff, m_successive_short_loops);
m_successive_short_loops++;
if(m_successive_short_loops > 100) {
debugError("Shutting down runaway thread\n");
return false;
}
} else {
// reset the counter
m_successive_short_loops = 0;
}
m_last_loop_entry = now;
#endif
return true;
}
开发者ID:EMATech,项目名称:ffado,代码行数:31,代码来源:Watchdog.cpp
示例14: if
bool
VolumeControlLowRes::setValue(int v)
{
uint32_t reg;
uint32_t old_reg;
if (v>0xFF) v=0xFF;
else if (v<0) v=0;
if ( !m_Parent.getSpecificValue(m_cmd_id, ®) ) {
debugError( "getSpecificValue failed\n" );
return 0;
}
old_reg=reg;
reg &= ~(0xFF<<m_bit_shift);
reg |= (v<<m_bit_shift);
debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for id %d to %d, shift %d (reg: 0x%08X => 0x%08X)\n",
m_cmd_id, v, m_bit_shift, old_reg, reg);
if ( !m_Parent.setSpecificValue(m_cmd_id, reg) ) {
debugError( "setSpecificValue failed\n" );
return false;
} else return true;
}
开发者ID:janosvitok,项目名称:ffado,代码行数:26,代码来源:focusrite_generic.cpp
示例15: debugOutput
std::string
Nickname::getValue()
{
debugOutput( DEBUG_LEVEL_VERBOSE, "%s getValue()=%s\n",
getName().c_str(), m_Device.getNickname().c_str());
return m_Device.getNickname();
}
开发者ID:EMATech,项目名称:ffado,代码行数:7,代码来源:Nickname.cpp
示例16: defined
bool DeploymentHandler::deviceDeploy(const DeploymentList &deploymentList)
{
DeploymentList copyList;
for (int i=0; i<deploymentList.size(); ++i) {
#if defined(Q_OS_WIN)
HANDLE localHandle = CreateFile(deploymentList.at(i).from.utf16(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
if (localHandle == INVALID_HANDLE_VALUE) {
copyList.append(deploymentList.at(i));
continue;
}
FILETIME localCreationTime;
if (!GetFileTime(localHandle, NULL, NULL, &localCreationTime) || !m_connection->timeStampForLocalFileTime(&localCreationTime)) {
copyList.append(deploymentList.at(i));
CloseHandle(localHandle);
continue;
}
CloseHandle(localHandle);
FILETIME deviceCreationTime;
if (!m_connection->fileCreationTime(deploymentList.at(i).to , &deviceCreationTime)) {
copyList.append(deploymentList.at(i));
continue;
}
int res = CompareFileTime(&localCreationTime, &deviceCreationTime);
if (res != 0)
copyList.append(deploymentList.at(i));
else
debugOutput(QString::fromLatin1("Skipping File %1, already latest version").arg(deploymentList.at(i).from),0);
#else
copyList.append(deploymentList.at(i));
#endif
}
return deviceCopy(copyList);
}
开发者ID:Suneal,项目名称:qt,代码行数:35,代码来源:deployment.cpp
示例17: extStreamFormatCmd
uint8_t
Device::getConfigurationIdSampleRate()
{
ExtendedStreamFormatCmd extStreamFormatCmd( get1394Service() );
UnitPlugAddress unitPlugAddress( UnitPlugAddress::ePT_PCR, 0 );
extStreamFormatCmd.setPlugAddress( PlugAddress( PlugAddress::ePD_Input,
PlugAddress::ePAM_Unit,
unitPlugAddress ) );
extStreamFormatCmd.setNodeId( getNodeId() );
extStreamFormatCmd.setCommandType( AVCCommand::eCT_Status );
extStreamFormatCmd.setVerbose( getDebugLevel() );
if ( !extStreamFormatCmd.fire() ) {
debugError( "Stream format command failed\n" );
return 0;
}
FormatInformation* formatInfo =
extStreamFormatCmd.getFormatInformation();
FormatInformationStreamsCompound* compoundStream
= dynamic_cast< FormatInformationStreamsCompound* > (
formatInfo->m_streams );
if ( compoundStream ) {
debugOutput(DEBUG_LEVEL_VERBOSE, "Sample rate 0x%02x\n",
compoundStream->m_samplingFrequency );
return compoundStream->m_samplingFrequency;
}
debugError( "Could not retrieve sample rate\n" );
return 0;
}
开发者ID:EMATech,项目名称:ffado,代码行数:32,代码来源:bebob_avdevice.cpp
示例18: debugOutput
bool
Device::propagatePlugInfo() {
// we don't have to propagate since we discover things
// another way
debugOutput(DEBUG_LEVEL_VERBOSE, "Skip plug info propagation\n");
return true;
}
开发者ID:EMATech,项目名称:ffado,代码行数:7,代码来源:bebob_avdevice.cpp
示例19: debugOutputExtreme
enum StreamProcessor::eChildReturnValue
AmdtpTransmitStreamProcessor::generatePacketData (
unsigned char *data, unsigned int *length )
{
if (m_data_buffer->readFrames(m_syt_interval, (char *)(data + 8)))
{
debugOutputExtreme(DEBUG_LEVEL_VERBOSE,
"XMIT DATA: TSP= %011"PRIu64" (%04u)\n",
m_last_timestamp,
(unsigned int)TICKS_TO_CYCLES(m_last_timestamp));
#if 0
// debug code to output the packet content
char tmpbuff[8192];
int cnt=0;
quadlet_t *tmp = (quadlet_t *)((char *)(data + 8));
for(int i=0; i<m_syt_interval; i++) {
cnt += snprintf(tmpbuff + cnt, 8192-cnt, "[%02d] ", i);
for(int j=0; j<m_dimension; j++) {
cnt += snprintf(tmpbuff + cnt, 8192-cnt, "%08X ", *tmp);
tmp++;
}
cnt += snprintf(tmpbuff + cnt, 8192-cnt, "\n");
}
debugOutput(DEBUG_LEVEL_VERBOSE, "\n%s\n", tmpbuff);
#endif
return eCRV_OK;
}
else return eCRV_XRun;
}
开发者ID:EMATech,项目名称:ffado,代码行数:30,代码来源:AmdtpTransmitStreamProcessor.cpp
示例20: debugOutput
/**
Device
*/
FirestudioProject::FirestudioProject( DeviceManager& d,
std::auto_ptr<ConfigRom>( configRom ))
: Dice::Device( d , configRom)
{
debugOutput( DEBUG_LEVEL_VERBOSE, "Created Dice::Presonus::FirestudioProject (NodeID %d)\n",
getConfigRom().getNodeId() );
}
开发者ID:EMATech,项目名称:ffado,代码行数:10,代码来源:firestudio_project.cpp
注:本文中的debugOutput函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论