Cat
|
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <time.h>
#include "StatusCode.h"
#include "var.h"
Go to the source code of this file.
Typedefs | |
typedef bool(* | AskPrinter) (std::string) |
typedef bool(* | GraphPrinter) () |
typedef std::vector< bool > | bits |
typedef std::vector< std::string > | commands |
Functions | |
void | setApplication (Application *) |
Application * | application () |
void | wait (int nbr_ms) |
std::string | itos (int) |
std::string | ftos (float) |
std::string | dtos (float) |
int | stoi (std::string) |
std::vector< bool > | itob (int, int) |
std::string | btos (std::vector< bool >) |
double | toDouble (std::string) |
std::string | command (std::string, std::vector< std::string > &) |
StatusCode | checkCmd (std::string, commands, vars &) |
bool | isInt (const char *) |
bool | isFloat (const char *) |
bool | askSvc (std::string) |
std::string | inputSvc (std::string) |
Variables | |
unsigned int const | BIT =1 |
unsigned int const | OCTET =8 |
Application* application | ( | ) |
return entry point for the application
Definition at line 42 of file Tools.cpp.
References gApp.
Referenced by Application::bookkeeping(), checkCmd(), Computer::Computer(), Acquisition::execute(), TestI2C::execute(), ADCMeasurement::execute(), CurrentMeasurement::execute(), DLL::init(), Acquisition::initialize(), ADCMeasurement::initialize(), CurrentMeasurement::initialize(), isInt(), Application::loadHistoryFile(), MsgSvc::log(), MsgSvc::msgSvc(), Application::network(), NI6008::NI6008(), DLL::print(), ProcDataBase::ProcDataBase(), Server::Server(), Processus::setState(), Server::start(), wait(), and Computer::~Computer().
bool askSvc | ( | std::string | ) |
std::string btos | ( | std::vector< bool > | ) |
Conversion from binary (std::vector<std::string>) to std::string
Definition at line 67 of file Tools.cpp.
References itos().
Referenced by IOdata::dump().
StatusCode checkCmd | ( | std::string | , |
commands | , | ||
vars & | |||
) |
check the format of an instruction
Definition at line 126 of file Tools.cpp.
References application(), StatusCode::FAILURE, images::index, Object::info(), isFloat(), isInt(), cat::size, StatusCode::SUCCESS, and Object::warning().
std::string command | ( | std::string | , |
std::vector< std::string > & | |||
) |
extract vector of std::string out of a command
std::string dtos | ( | float | ) |
Conversion from double to std::string
std::string ftos | ( | float | ) |
Conversion from float to std::string
Definition at line 53 of file Tools.cpp.
Referenced by Processus::endProcessing(), PhaserRampExec::finalize(), Server_NI6008::setAIRange(), Server_NI6008::setAORange(), Server_NI6008::status(), and ICECALv3::version().
std::string inputSvc | ( | std::string | ) |
bool isFloat | ( | const char * | ) |
check if string is compatible with float
Definition at line 206 of file Tools.cpp.
Referenced by checkCmd().
bool isInt | ( | const char * | ) |
check if string is compatible with int
Definition at line 223 of file Tools.cpp.
References application(), and Object::info().
Referenced by checkCmd().
std::vector<bool> itob | ( | int | , |
int | |||
) |
Conversion from integer to binary (std::string)
Definition at line 77 of file Tools.cpp.
Referenced by IOdata::dump().
std::string itos | ( | int | ) |
Conversion from int (long) to std::string
Definition at line 46 of file Tools.cpp.
Referenced by DCU::acquire(), btos(), FEB_v1::calibCte(), MSOxxxx::channelDisplay(), MSOxxxx::channelDisplayName(), MSOxxxx::channelOffset(), MSOxxxx::channelScale(), ICECALv3::checkChNumber(), LSDelayChipV1::checkConfigAddr(), LSDelayChipV1::checkStatusAddr(), FEB_v1::clock80MHzFallingEdge(), FEB_v1::clockFallingEdge(), UsbFTInterface::close(), UsbFTMLInterface::close(), SpecsMezzanine::cmdline(), SpecsSlave::detect(), FEB_v1::disableSubtract(), IOdata::dump(), A3PE::dumpFromAX(), Processus::endProcessing(), Acquisition::execute(), PhaserRampExec::execute(), FEB_v1::FEB_v1(), PhaserRampExec::finalize(), FEB_v1::gain4(), FEB_v1::gbt80MHzClkEport(), FEB_v1::gbtAcknowledgeConfig(), FEB_v1::gbtDataPath(), FEB_v1::gbtDLLEport(), FEB_v1::gbtDLLReset(), FEB_v1::gbtEnableEport(), FEB_v1::gbtMode(), FEB_v1::gbtStatus(), FEB_v1::gbtTermEport(), FEB_v1::gbtTrackMode(), EmulateFE::generateFile(), ICECALv3::getAnalogCh(), LSDelayChipV1::getConfigReg(), ICECALv3::getDelayLineCh(), ICECALv3::getMainReg(), FEB_v1::globalPseudoPMEnable(), NI6008::init(), SpecsSlave::init(), SpecsMaster::init(), UsbFTMLInterface::init(), UsbFTInterface::init(), A3PE_BitFlip::initialize(), CurrentMeasurement::initialize(), FEB_v1::injectModeFE(), FEB_v1::latency(), FEB_v1::latencyLLT(), A3PE::loadFromAX(), Application::loadHistoryFile(), A3PE::loadPattern(), A3PE::loadStorage(), A3PE::loadToAX(), A3PE::loadTrigger(), Application::loop(), FEB_v1::maskLLT(), Data::name(), FEB_v1::oldSubtract(), MSOxxxx::open(), DLL::print(), FEB_v1::probeEnable(), FEB_v1::pseudoADCEnable(), FEB_v1::pseudoPMEnable(), Phaser::read(), ICPhaser::read(), UsbSpiBus::read(), UsbFTMLInterface::read(), UsbFTInterface::read(), SpecsMaster::reset(), SpecsSlave::reset(), FEB_v1::resetFE(), FEB_v1::resetFifoInjectFE(), FEB_v1::resetFifoSpyFE(), SpecsSlave::resetInternal(), Server_NI6008::Server_NI6008(), A3PE::setAddFromAXRam(), A3PE::setAddToAXRam(), A3PE::setAXRamUsb(), FEB_v1::setCalibCte(), FEB_v1::setClock80MHzFallingEdge(), A3PE::setClockDivision(), FEB_v1::setClockFallingEdge(), LSDelayChipV1::setConfigReg(), UsbSpiBus::setDataLength(), FEB_v1::setDisableSubtract(), A3PE::setEnableADC(), A3PE::setFifoDepth(), A3PE::setFifoLatency(), FEB_v1::setGain4(), FEB_v1::setGbt80MHzClkEport(), FEB_v1::setGbtClockStrength(), FEB_v1::setGbtDataPath(), FEB_v1::setGbtDLLEport(), FEB_v1::setGbtEnableEport(), FEB_v1::setGbtMode(), FEB_v1::setGbtTermEport(), FEB_v1::setGbtTrackMode(), FEB_v1::setGlobalPseudoPMEnable(), FEB_v1::setInjectModeFE(), A3PE::setInternalAXSequence(), FEB_v1::setLatency(), A3PE::setLatencyAX(), A3PE::setLengthAX(), A3PE::setNTrigger(), FEB_v1::setOldSubtract(), FEB_v1::setOutputEport(), Phaser::setPhase(), ICPhaser::setPhase(), A3PE::setPipeline(), FEB_v1::setPseudoADCEnable(), FEB_v1::setPseudoPMEnable(), RAM::setSize(), A3PE::setSoftwareTrigger(), FEB_v1::setSpareForTrigEnable(), SpecsMaster::setSpeed(), FEB_v1::setSpyModeFE(), FEB_v1::setStopInjLoop(), FEB_v1::setTestDuration(), FEB_v1::setThreshold(), A3PE::setTriggerDelay(), A3PE::setTriggerRate(), IOdata::setU16(), IOdata::setU32(), IOdata::setU8(), MSOxxxx::setupAvgVoltage(), MSOxxxx::setupDeltaTime(), MSOxxxx::setupJitter(), LSDelayChipV1::showConfig(), TestSuite::sigma(), FEB_v1::spareForTrigEnable(), SpecsI2c::SpecsI2c(), SpecsInterface::specsReadI2c(), SpecsInterface::specsReadParallel(), SpecsInterface::specsReadRegister(), SpecsInterface::specsWriteI2c(), SpecsInterface::specsWriteParallel(), SpecsInterface::specsWriteRegister(), ICECALv3::spiAddressScan(), LSDelayChipV1::spiBERTest(), FEB_v1::spyModeFE(), FEB_v1::spyModeSeq(), Server_NI6008::status(), FEB_v1::statusRegister(), FEB_v1::stopInjLoop(), Options::storageFullPath(), Application::terminate(), FEB_v1::testDuration(), FEB_v1::threshold(), Data::title(), MSOxxxx::triggerConfig(), UsbFTInterface::usbRead(), UsbFTMLInterface::usbRead(), UsbFTMLInterface::usbReadU16(), UsbFTInterface::usbReadU16(), UsbFTMLInterface::usbReadU32(), UsbFTInterface::usbReadU32(), UsbFTMLInterface::usbReadU8(), UsbFTInterface::usbReadU8(), UsbFTMLInterface::usbWrite(), UsbFTInterface::usbWrite(), UsbFTMLInterface::usbWriteRead(), UsbFTInterface::usbWriteRead(), UsbFTInterface::usbWriteU16(), UsbFTMLInterface::usbWriteU16(), UsbFTMLInterface::usbWriteU32(), UsbFTInterface::usbWriteU32(), UsbFTInterface::usbWriteU8(), UsbFTMLInterface::usbWriteU8(), Data::vectorPtr(), ICECALv3::version(), wait(), MSOxxxx::waveformCapture(), Phaser::write(), ICPhaser::write(), UsbSpiBus::write(), UsbFTMLInterface::write(), and UsbFTInterface::write().
void setApplication | ( | Application * | ) |
Define entry point for the application
Definition at line 38 of file Tools.cpp.
References gui::cat.
Referenced by Application::Application().
int stoi | ( | std::string | ) |
double toDouble | ( | std::string | ) |
void wait | ( | int | nbr_ms | ) |
system wait for a few seconds
Definition at line 271 of file Tools.cpp.
References application(), itos(), and Object::verbose().
Referenced by ADCMeasurement::execute(), CurrentMeasurement::execute(), UsbFTInterface::init(), and UsbFTMLInterface::init().