void DrawGame::CircleSprite::jumpTo( ofVec2f Pos ) { X = Pos.x; Y = Pos.y; clearTrace(); addTrace(); }
void NSFTraceLog::saveTrace(const NSFEventContext& context) { try { addTrace(NSFTraceTags::InformationalTag(), NSFTraceTags::NameTag(), TraceSaveString()); xmlLog.save(((NSFDataEvent<NSFString>*)context.getEvent())->getData()); addTrace(NSFTraceTags::InformationalTag(), NSFTraceTags::NameTag(), TraceSaveCompleteString()); } catch (const std::exception& exception) { // If unable to save a trace, just add a trace with the exception message, because calling the exception handler may result in an infinite loop addTrace(NSFTraceTags::ExceptionTag(), NSFTraceTags::MessageTag(), getName() + " exception saving trace: " + exception.what()); } catch (...) { addTrace(NSFTraceTags::ExceptionTag(), NSFTraceTags::MessageTag(), "Unknown Exception saving trace"); } }
/*! \fn int Init_threadIdle (void) \brief Initializing Idle thread */ int Init_threadIdle (void) { if (addTrace("threadIdle init") != TRACE_OK) { stop_cpu; } tid_threadIdle = osThreadCreate (osThread(threadIdle), NULL); if(!tid_threadIdle) return(-1); return(0); }
/*! \fn int Init_thread0 (void) \brief Initializing thread0 */ int Init_thread0 (void) { tid_thread0 = osThreadCreate (osThread(thread0), NULL); if (tid_thread0 == NULL) { return(-1); } if (addTrace("thread0 init") != TRACE_OK) { stop_cpu; } return(0); }
int PostOffice::send_message(int dest_process_id, MsgEnv* msg_envelope){ int retVal; PCB* destPCB = g_scheduler->getPCB(dest_process_id); //Make sure we were passed a valid pID if (destPCB == NULL) return INVALID_INPUT; //Send the message and add a trace of this send destPCB->_mailbox.enqueue(msg_envelope); addTrace(msg_envelope, true); //Make the process ready if it was blocked on message receive, and return if (destPCB->_status == BLOCKED_MSG_RECEIVE){ retVal = g_scheduler->makeReady(destPCB); return retVal; } //If the process wasn't blocked, just return return SUCCESS; }
//------------------------------------------------------------------------- void Leds_redToggle() { { _atomic_t _atomic = _atomic_start(); if (Leds_ledsOn & Leds_RED_BIT) { Leds_redOff(); } else { Leds_redOn(); } _atomic_end(_atomic); } #ifdef TRACE_ENABLE #ifdef TRACE_ENABLE_LEDEVENT addTrace(TRACE_LEDEVENT_REDTOGGLE, 100); #endif #endif return; }
void MainWindow::update_trace_list() { QList<Trace*> history = tracker->get_history(); list<Trace*> new_elements; for (QList<Trace*>::iterator iter = history.begin(); iter != history.end(); iter++) new_elements.push_back(*iter); for (QList<Trace*>::iterator iter = traces.begin(); iter != traces.end(); iter++) new_elements.remove(*iter); traces = history; for (list<Trace*>::iterator iter = new_elements.begin(); iter != new_elements.end(); iter++) addTrace(*iter); }
void NSFTraceLog::addTrace(const NSFString& type, const NSFString& tag1, const NSFString& data1, const NSFString& tag2, const NSFString& data2) { addTrace(type, tag1, data1, tag2, data2, emptyString(), emptyString()); }
void DrawGame::CircleSprite::moveTo( ofVec2f Pos ) { X = Pos.x; Y = Pos.y; addTrace(); }
void DrawGame::CircleSprite::move( ofVec2f Trans ) { X += Trans.x; Y += Trans.y; addTrace(); }
MsgEnv* PostOffice::receive_message(){ PCB* receiverPCB = g_scheduler->getCurrentPCB(); MsgEnv* currentMsg = receiverPCB->_mailbox.dequeue(); if (currentMsg != NULL) addTrace(currentMsg, false); return currentMsg; }