Cat
|
#include <stdlib.h>
#include <iostream>
#include <string>
#include <math.h>
#include <unistd.h>
#include "Application.h"
#include "Options.h"
#include "Tools.h"
Go to the source code of this file.
Macros | |
#define | __FCT_CPP_ |
Functions | |
void | setApplication (Application *cat) |
Application * | application () |
std::string | itos (int i) |
std::string | ftos (float f) |
std::string | dtos (double d) |
std::string | btos (std::vector< bool > bits) |
std::vector< bool > | itob (int val, int nbit) |
int | stoi (std::string value) |
double | toDouble (std::string s) |
StatusCode | checkCmd (std::string format, commands instruction, vars &varlist) |
bool | isFloat (const char *chain) |
bool | isInt (const char *chain) |
bool | askSvc (std::string msg) |
bool | graphSvc () |
std::string | inputSvc (std::string msg) |
void | wait (int n) |
Variables | |
Application * | gApp |
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 | msg | ) |
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 dtos | ( | double | d | ) |
std::string ftos | ( | float | ) |
bool graphSvc | ( | ) |
std::string inputSvc | ( | std::string | msg | ) |
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 | ) |
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().
Application* gApp |
Definition at line 36 of file Tools.cpp.
Referenced by application().