本文整理汇总了C++中debugString函数的典型用法代码示例。如果您正苦于以下问题:C++ debugString函数的具体用法?C++ debugString怎么用?C++ debugString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了debugString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QObject
EffectParameter::EffectParameter(Effect* pEffect, EffectsManager* pEffectsManager,
int iParameterNumber,
EffectManifestParameterPointer pParameter)
: QObject(), // no parent
m_pEffect(pEffect),
m_pEffectsManager(pEffectsManager),
m_iParameterNumber(iParameterNumber),
m_pParameter(pParameter),
m_bAddedToEngine(false) {
// qDebug() << debugString() << "Constructing new EffectParameter from EffectManifestParameter:"
// << m_parameter.id();
m_minimum = m_pParameter->getMinimum();
m_maximum = m_pParameter->getMaximum();
// Sanity check the maximum and minimum
if (m_minimum > m_maximum) {
qWarning() << debugString() << "WARNING: Parameter maximum is less than the minimum.";
m_maximum = m_minimum;
}
// If the parameter specifies a default, set that. Otherwise use the minimum
// value.
m_default = m_pParameter->getDefault();
if (m_default < m_minimum || m_default > m_maximum) {
qWarning() << debugString() << "WARNING: Parameter default is outside of minimum/maximum range.";
m_default = m_minimum;
}
// Finally, set the value to the default.
m_value = m_default;
}
示例2: qWarning
void EffectParameter::setMaximum(double maximum) {
m_maximum = maximum;
if (m_maximum > m_parameter.getMaximum()) {
qWarning() << debugString() << "WARNING: Maximum value is less than plugin's absolute maximum, clamping.";
m_maximum = m_parameter.getMaximum();
}
if (m_maximum < m_minimum) {
qWarning() << debugString() << "WARNING: New maximum was below the minimum, clamped.";
m_maximum = m_minimum;
}
// There's a degenerate case here where the minimum could be larger
// than the manifest maximum. If that's the case, then the maximum
// value is currently above the manifest maximum. Since similar
// guards exist in the setMinimum call, this should not be able to
// happen.
Q_ASSERT(m_maximum <= m_parameter.getMaximum());
if (clampValue()) {
qWarning() << debugString() << "WARNING: Value was outside of new maximum, clamped.";
}
if (clampDefault()) {
qWarning() << debugString() << "WARNING: Default was outside of new maximum, clamped.";
}
updateEngineState();
}
示例3: DllMain
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
if(DLL_PROCESS_ATTACH == fdwReason)
{
fptr = fopen("mstapi.log","w");
if(NULL != fptr)
{
struct _timeb timebuffer;
char *timeline;
_ftime( &timebuffer );
timeline = ctime( & ( timebuffer.time ) );
// put a header on the log entry:
// char * header = 'Captains log, Star Date %.19s.%-3hu'
char * annoy = "-----------";
fprintf(fptr,"\n;\t%s Logging Started %.19s.%-3hu %s \n",
annoy, timeline, timebuffer.millitm, annoy);
fprintf(fptr,";Time\t\tSEV\tMessage\t\t\t\t\t\t\tMethod\n");
}
debugString(8,"DllMain","DLL_PROCESS_ATTACH",_where());
g_hinstDLL = (HINSTANCE)hinstDLL;
}
if(DLL_PROCESS_DETACH == fdwReason)
{
debugString(8,"DllMain","DLL_PROCESS_DETACH",_where());
teardownSound();
fclose(fptr);
}
return TRUE;
}
示例4: assert
void SoftmaxLayer::runForwardImplementation(Bundle& bundle)
{
auto& inputActivationsVector = bundle[ "inputActivations"].get<MatrixVector>();
auto& outputActivationsVector = bundle["outputActivations"].get<MatrixVector>();
assert(inputActivationsVector.size() == 1);
auto inputActivations = foldTime(inputActivationsVector.back());
util::log("SoftmaxLayer") << " Running forward propagation of matrix "
<< inputActivations.shapeString() << "\n";
if(util::isLogEnabled("SoftmaxLayer::Detail"))
{
util::log("SoftmaxLayer::Detail") << " input: "
<< inputActivations.debugString();
}
auto outputActivations = softmax(inputActivations);
if(util::isLogEnabled("SoftmaxLayer::Detail"))
{
util::log("SoftmaxLayer::Detail") << " outputs: "
<< outputActivations.debugString();
}
saveMatrix("outputActivations", outputActivations);
outputActivationsVector.push_back(unfoldTime(outputActivations,
inputActivationsVector.front().size()));
}
示例5: debugTrace
/*
* Print a stack trace of the current thread for debug purposes
*/
void debugTrace() {
Ref sf = frame;
for (; sf != NULL; sf = sf[FRAME_RETURN_FRAME].r) {
printf(" at ");
Ref method = sf[FRAME_METHOD].r;
Ref type = method[ENTRY_OWNER].r;
debugString(type[TYPE_NAME].r);
printf(".");
debugString(method[ENTRY_NAME].r);
printf("(");
Ref source = type[TYPE_SOURCE].r;
if (source == NULL) {
printf("Unknown Source");
} else {
debugString(source);
int pc = sf[FRAME_PC].i;
Ref lnt = method[METHOD_LINE_NUMBERS].r;
unsigned short* table = (unsigned short*) (lnt + ARRAY_DATA);
if (table != NULL) {
int length = lnt[ARRAY_LENGTH].i;
int line = -1;
int index = 0;
while (index < length) {
unsigned short startEntry = table[index++];
unsigned short lineEntry = table[index++];
if (pc >= startEntry) { line = lineEntry; }
if (pc < startEntry) { break; }
}
if (line >= 0) { printf(":%d", line); }
}
}
printf(")\n");
}
}
示例6: debugString
bool NetworkSocket::setRemoteAddress(const NetworkAddr& addr) {
if(!isOpen()) {
errors << "NetworkSocket::setRemoteAddress: socket is closed" << endl;
return false;
}
if(getNLaddr(addr) == NULL) {
errors << "NetworkSocket::setRemoteAddress " << debugString() << ": given address is invalid" << endl;
return false;
}
if( GetNetAddrPort(addr) == 0 )
{
errors << "NetworkSocket::setRemoteAddress " << debugString() << ": port is set to 0" << endl;
}
if(nlSetRemoteAddr(m_socket->sock, getNLaddr(addr)) == NL_FALSE) {
std::string addrStr = "INVALIDADDR";
NetAddrToString(addr, addrStr);
errors << "NetworkSocket::setRemoteAddress " << debugString() << ": failed to set destination " << addrStr << ": " << GetLastErrorStr() << endl;
ResetSocketError();
return false;
}
return true;
}
示例7: response
bool EngineEffectRack::processEffectsRequest(const EffectsRequest& message,
EffectsResponsePipe* pResponsePipe) {
EffectsResponse response(message);
switch (message.type) {
case EffectsRequest::ADD_CHAIN_TO_RACK:
if (kEffectDebugOutput) {
qDebug() << debugString() << "ADD_CHAIN_TO_RACK"
<< message.AddChainToRack.pChain
<< message.AddChainToRack.iIndex;
}
response.success = addEffectChain(message.AddChainToRack.pChain,
message.AddChainToRack.iIndex);
break;
case EffectsRequest::REMOVE_CHAIN_FROM_RACK:
if (kEffectDebugOutput) {
qDebug() << debugString() << "REMOVE_CHAIN_FROM_RACK"
<< message.RemoveChainFromRack.pChain
<< message.RemoveChainFromRack.iIndex;
}
response.success = removeEffectChain(message.RemoveChainFromRack.pChain,
message.RemoveChainFromRack.iIndex);
break;
default:
return false;
}
pResponsePipe->writeMessages(&response, 1);
return true;
}
示例8: wsprintf
JNIEXPORT jint JNICALL Java_net_xtapi_serviceProvider_MSTAPI_connectCall
(JNIEnv *pEnv, jobject oObj, jint lLine, jstring oDest, jint lHandle)
{
const char* utf_string;
jboolean isCopy;
long lRet = 0;
char szDebug[256];
HCALL hCall = 0;
utf_string = pEnv->GetStringUTFChars(oDest,&isCopy);
wsprintf(szDebug,"Will place call from line %d to %s.",lLine,utf_string);
debugString(8,"connectCall",szDebug,_where());
lRet = lineMakeCall((HLINE)lHandle, &hCall, utf_string, 0, 0);
long lWait = (long)hCall;
if(JNI_TRUE == isCopy) {
pEnv->ReleaseStringUTFChars(oDest,utf_string);
}
// If lineMakeCall succeeded then lRet > 0. However lineMakeCall is
// async so we wait on the change of hCall befor returning if the
// call to lineMakeCall was successfull....
int loop = 0;
wsprintf(szDebug,"lineMakeCall returned -> %d",lRet);
if(lRet > 0)
{
debugString(8,"connectCall",szDebug,_where());
while((long)hCall == 0)
{
Sleep(20);
loop++;
if(loop * 20 > MAXCALLWAIT_MS)
break; // Bail out!!
}
}
else
{
debugString(1,"connectCall",szDebug,_where());
return - 1;
}
wsprintf(szDebug,"Waited %d milliseconds for lineMakeCall",loop *20);
debugString(8,"connectCall",szDebug,_where());
wsprintf(szDebug,"hCall = -> %d",(long)hCall);
debugString(8,"connectCall",szDebug,_where());
return (long)hCall;
}
示例9: debugString
void TapDmc3xlTimelineMode::onButton(Button *sender, unsigned char event)
{
#ifdef DEBUG
debugString("TapDmc3xlTimelineMode::onButton");
debug(sender->pin);
debug(event);
#endif
switch (sender->pin)
{
case BTN_LEFT:
debugString("left");
if (event == ButtonEvent::UP)
{
if (!sender->isHeld)
{
device->onTapDivision();
device->setLedDuration(device->ledLeft, 1, 100);
}
else
{
device->setMode(5); //CHANGE
}
}
break;
case BTN_CENTER:
if (event == ButtonEvent::UP)
{
if (!sender->isHeld)
{
device->goToNextDeviceMode();
}
else
{
device->sendInfiniteRepeatOff();
device->setLed(device->ledCenter, Color::BLUE);
}
}
else if (event == ButtonEvent::HOLD)
{
device->sendInfiniteRepeatOn();
device->setLed(device->ledCenter, Color::WHITE);
}
break;
case BTN_RIGHT:
if (event == ButtonEvent::DOWN)
{
device->onRemoteTap();
device->setLedDuration(device->ledRight, 1, 100);
}
break;
}
}
示例10: response
bool EngineEffectChain::processEffectsRequest(const EffectsRequest& message,
EffectsResponsePipe* pResponsePipe) {
EffectsResponse response(message);
switch (message.type) {
case EffectsRequest::ADD_EFFECT_TO_CHAIN:
if (kEffectDebugOutput) {
qDebug() << debugString() << "ADD_EFFECT_TO_CHAIN"
<< message.AddEffectToChain.pEffect
<< message.AddEffectToChain.iIndex;
}
response.success = addEffect(message.AddEffectToChain.pEffect,
message.AddEffectToChain.iIndex);
break;
case EffectsRequest::REMOVE_EFFECT_FROM_CHAIN:
if (kEffectDebugOutput) {
qDebug() << debugString() << "REMOVE_EFFECT_FROM_CHAIN"
<< message.RemoveEffectFromChain.pEffect
<< message.RemoveEffectFromChain.iIndex;
}
response.success = removeEffect(message.RemoveEffectFromChain.pEffect,
message.RemoveEffectFromChain.iIndex);
break;
case EffectsRequest::SET_EFFECT_CHAIN_PARAMETERS:
if (kEffectDebugOutput) {
qDebug() << debugString() << "SET_EFFECT_CHAIN_PARAMETERS"
<< "enabled" << message.SetEffectChainParameters.enabled
<< "mix" << message.SetEffectChainParameters.mix;
}
response.success = updateParameters(message);
break;
case EffectsRequest::ENABLE_EFFECT_CHAIN_FOR_CHANNEL:
if (kEffectDebugOutput) {
qDebug() << debugString() << "ENABLE_EFFECT_CHAIN_FOR_CHANNEL"
<< message.channel;
}
response.success = enableForChannel(message.channel);
break;
case EffectsRequest::DISABLE_EFFECT_CHAIN_FOR_CHANNEL:
if (kEffectDebugOutput) {
qDebug() << debugString() << "DISABLE_EFFECT_CHAIN_FOR_CHANNEL"
<< message.channel;
}
response.success = disableForChannel(message.channel);
break;
default:
return false;
}
pResponsePipe->writeMessages(&response, 1);
return true;
}
示例11: response
bool EngineEffect::processEffectsRequest(const EffectsRequest& message,
EffectsResponsePipe* pResponsePipe) {
EngineEffectParameter* pParameter = NULL;
EffectsResponse response(message);
switch (message.type) {
case EffectsRequest::SET_EFFECT_PARAMETERS:
if (kEffectDebugOutput) {
qDebug() << debugString() << "SET_EFFECT_PARAMETERS"
<< "enabled" << message.SetEffectParameters.enabled;
}
if (m_enableState != EffectProcessor::DISABLED && !message.SetEffectParameters.enabled) {
m_enableState = EffectProcessor::DISABLING;
} else if (m_enableState == EffectProcessor::DISABLED && message.SetEffectParameters.enabled) {
m_enableState = EffectProcessor::ENABLING;
}
response.success = true;
pResponsePipe->writeMessages(&response, 1);
return true;
break;
case EffectsRequest::SET_PARAMETER_PARAMETERS:
if (kEffectDebugOutput) {
qDebug() << debugString() << "SET_PARAMETER_PARAMETERS"
<< "parameter" << message.SetParameterParameters.iParameter
<< "minimum" << message.minimum
<< "maximum" << message.maximum
<< "default_value" << message.default_value
<< "value" << message.value;
}
pParameter = m_parameters.value(
message.SetParameterParameters.iParameter, NULL);
if (pParameter) {
pParameter->setMinimum(message.minimum);
pParameter->setMaximum(message.maximum);
pParameter->setDefaultValue(message.default_value);
pParameter->setValue(message.value);
response.success = true;
} else {
response.success = false;
response.status = EffectsResponse::NO_SUCH_PARAMETER;
}
pResponsePipe->writeMessages(&response, 1);
return true;
default:
break;
}
return false;
}
示例12: debugString
void Timeline::sendPatch()
{
debugString("Timeline::sendProgramUp");
MIDI::sendPC(patchNumber);
//delay(_bankChangeDelay);
}
示例13: lineGenerateDigits
JNIEXPORT jint JNICALL Java_net_xtapi_serviceProvider_MSTAPI_sendDigits
(JNIEnv * pEnv, jobject oObj, jint lHandle, jstring oDigits)
{
const char* utf_string;
jboolean isCopy;
utf_string = pEnv->GetStringUTFChars(oDigits,&isCopy);
long lRes = lineGenerateDigits((HCALL)lHandle,
LINEDIGITMODE_DTMF,
utf_string,
0);
if(JNI_TRUE == isCopy) {
pEnv->ReleaseStringUTFChars(oDigits,utf_string);
}
if(lRes != 0)
{
char szMsg[256];
wsprintf(szMsg,"lineGenerateDigits returned %d",lRes);
debugString(1,"sendDigits",szMsg,_where());
}
return lRes;
}
示例14: SecondaryThread
// Use a secondary thread to work the windows message pump.
DWORD WINAPI SecondaryThread(LPVOID pInputParam)
{
MSG msg;
// msg-pump.
while (GetMessage(&msg, NULL, 0, 0))
{
//debugString(8,"SecondaryThread","msg-pump",_where());
g_hWnd = msg.hwnd;
if(msg.message == WM_USER + 1)
{ // shutDown was called, shutdown TAPI and return.
if( g_hTAPI != NULL)
{
debugString(4,"SecondaryThread","lineShutdown",_where());
lineShutdown( g_hTAPI );
g_hTAPI = NULL;
}
return 0;
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return 0;
}
示例15: matrix
Layer::BlockSparseMatrix Layer::runReverse(const BlockSparseMatrix& m) const
{
if(util::isLogEnabled("Layer"))
{
util::log("Layer") << " Running reverse propagation on matrix (" << m.rows()
<< " rows, " << m.columns() << " columns) through layer with dimensions ("
<< blocks() << " blocks, "
<< getInputCount() << " inputs, " << getOutputCount()
<< " outputs, " << blockStep() << " block step).\n";
util::log("Layer") << " layer: " << m_sparseMatrix.shapeString() << "\n";
}
auto result = m.reverseConvolutionalMultiply(m_sparseMatrix.transpose());
if(util::isLogEnabled("Layer"))
{
util::log("Layer") << " output: " << result.shapeString() << "\n";
}
if(util::isLogEnabled("Layer::Detail"))
{
util::log("Layer::Detail") << " output: " << result.debugString() << "\n";
}
return result;
}