std::string ConditionInputButton::getDescription() const { std::string str = std::string("If ").append(m_HWName).append(" is "); str.append( TriggerToString(this->m_trigger) ); return str; }
QDomElement ConditionInputButton::save(QDomElement* root, QDomDocument* document) { QDomElement condition = ConditionInput::save(root, document); QDomElement subtype = document->createElement("subtype"); QDomText subtypeText = document->createTextNode("Button"); subtype.appendChild(subtypeText); condition.appendChild(subtype); QDomElement state = document->createElement("trigger"); QDomText stateText = document->createTextNode( QString::fromStdString( TriggerToString(m_trigger) ) ); state.appendChild(stateText); condition.appendChild(state); return condition; }
//***************************************************************************** // \internal // // Handler for the "info" command. // // \param argc contains the number of entries in the argv[] array. // \param argv is an array of pointers to each of the individual words parsed // from the command line. The first entry will be the command itself and later // entries represent any parameters. // // This function is called by the command line parser when the user enters // the "info" or "i" commands. It prints information on the current trigger // setting and the status of the latest capture request on UART0. // // \return Returns COMMAND_OK. // //***************************************************************************** int CmdInfo(int argc, char *argv[]) { tTriggerType eType; unsigned long ulTrigPos; unsigned short usLevel; tDataAcqCaptureStatus sStatus; // // Get the existing trigger parameters. // DataAcquisitionGetTrigger(&eType, &ulTrigPos, &usLevel); // // Print out the trigger info. // UARTprintf("\nTrigger\n"); UARTprintf("-------\n"); UARTprintf("Type: %s (%d)\n", TriggerToString(eType), eType); UARTprintf("Level: %d\n", usLevel); UARTprintf("Position: %d\n", ulTrigPos); // // Print out channel 1 status // DataAcquisitionGetStatus(&sStatus); UARTprintf("\nStatus\n"); UARTprintf("------\n"); UARTprintf("State: %s (%d)\n", StateToString(sStatus.eState), sStatus.eState); UARTprintf("Captured: %d\n", sStatus.ulSamplesCaptured); UARTprintf("Buffer: 0x%08x\n", sStatus.pusBuffer); UARTprintf("Data start: %d\n", sStatus.ulStartIndex); UARTprintf("Trigger: %d\n", sStatus.ulTriggerIndex); UARTprintf("Mode: %s\n", sStatus.bDualMode ? "Dual" : "Single"); UARTprintf("CH2 offset: %duS\n", sStatus.ulSampleOffsetuS); UARTprintf("Period: %duS\n", sStatus.ulSamplePerioduS); return(COMMAND_OK); }