Public Member Functions | |
virtual | ~QPulserConverter () |
dtor | |
void | Load (const std::map< unsigned int, QDaqChannel > &channels) |
load pulser configuration | |
unsigned int | GetPulseId (unsigned int boardId, unsigned int hwCh) const |
get pulse_id from hardware address (board and channel) | |
int | GetBoard (unsigned int pulseId) const |
get board id from pulse id | |
int | GetHwCh (unsigned int pulseId) const |
get hardware channel from pulse id | |
int | get_mem1 (float) |
get pulser mem1 from pulse amplitude | |
int | get_mem2 (int, float) |
get pulser mem2 from pulse amplitude and hw channel | |
int | HeaterName2Board (const std::string &name) const |
convert heater name to board id | |
Static Public Member Functions | |
static QPulserConverter & | GetInstance () |
singleton getter | |
Private Member Functions | |
QPulserConverter () | |
Private Attributes | |
std::map< QPulserAddress, unsigned int > | fMapping |
Classes | |
class | QPulserAddress |
utlity class to sort and compare pulser channels More... |
QPulserConverter::QPulserConverter | ( | ) | [private] |
ctor
void QPulserConverter::Load | ( | const std::map< unsigned int, QDaqChannel > & | channels | ) |
load pulser configuration
channels | map of QDaqChannel objects filled with pulser configuration read from db (or somewhere else) |
References QPulserConverter::QPulserAddress::fBoard, QPulserConverter::QPulserAddress::fHwCh, fMapping, and HeaterName2Board().
Referenced by QGuiPulserMain::UpdateSettingsBasket().
unsigned int QPulserConverter::GetPulseId | ( | unsigned int | boardId, | |
unsigned int | hwCh | |||
) | const |
get pulse_id from hardware address (board and channel)
References QPulserConverter::QPulserAddress::fBoard, QPulserConverter::QPulserAddress::fHwCh, and fMapping.
Referenced by QPulserGuiInterface::AddChannel(), and QPulserSingleShot::SetParameters().
int QPulserConverter::GetBoard | ( | unsigned int | pulseId | ) | const |
get board id from pulse id
References fMapping.
Referenced by QGuiPulserMain::Blink().
int QPulserConverter::GetHwCh | ( | unsigned int | pulseId | ) | const |
get hardware channel from pulse id
References fMapping.
Referenced by QGuiPulserMain::Blink().
std::map<QPulserAddress, unsigned int> QPulserConverter::fMapping [private] |
map of QPulserAddress and corresponding pulse id
Referenced by GetBoard(), GetHwCh(), GetPulseId(), and Load().