2 #include "otsdaq-components/UserTableDataFormats/FENIMPlusInterfaceTable.h"
3 #include "otsdaq/Macros/TablePluginMacros.h"
4 #include "otsdaq/TablePlugins/DataManagerTable.h"
9 FENIMPlusInterfaceTable::FENIMPlusInterfaceTable(
void)
10 : FEInterfaceTableBase(
"FENIMPlusInterfaceTable")
53 FENIMPlusInterfaceTable::~FENIMPlusInterfaceTable(
void) {}
56 void FENIMPlusInterfaceTable::init(ConfigurationManager* configManager)
71 bool FENIMPlusInterfaceTable::getStatus(std::string interfaceID)
const
74 TableBase::activeTableView_->getValue(
76 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
82 unsigned int FENIMPlusInterfaceTable::getFirmwareVersion(std::string interfaceID)
const
84 unsigned int tmpFirmwareVersion;
85 TableBase::activeTableView_->getValue(
87 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
89 return tmpFirmwareVersion;
93 std::string FENIMPlusInterfaceTable::getIPAddress(std::string interfaceID)
const
95 std::string tmpIPAddress;
96 TableBase::activeTableView_->getValue(
98 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
104 unsigned int FENIMPlusInterfaceTable::getPort(std::string interfaceID)
const
106 unsigned int tmpPort;
107 TableBase::activeTableView_->getValue(
108 tmpPort, TableBase::activeTableView_->findRow(InterfaceID, interfaceID), Port);
113 std::string FENIMPlusInterfaceTable::getInterfaceIPAddress(std::string interfaceID)
const
115 std::string tmpInterfaceIPAddress;
116 TableBase::activeTableView_->getValue(
117 tmpInterfaceIPAddress,
118 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
120 return tmpInterfaceIPAddress;
124 unsigned int FENIMPlusInterfaceTable::getInterfacePort(std::string interfaceID)
const
126 unsigned int tmpInterfacePort;
127 TableBase::activeTableView_->getValue(
129 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
131 return tmpInterfacePort;
135 std::string FENIMPlusInterfaceTable::getStreamingIPAddress(std::string interfaceID)
const
137 std::string tmpStreamingIPAddress;
138 TableBase::activeTableView_->getValue(
139 tmpStreamingIPAddress,
140 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
142 return tmpStreamingIPAddress;
146 unsigned int FENIMPlusInterfaceTable::getStreamingPort(std::string interfaceID)
const
148 unsigned int tmpStreamingPort;
149 TableBase::activeTableView_->getValue(
151 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
153 return tmpStreamingPort;
157 std::string FENIMPlusInterfaceTable::getClockSelect(std::string interfaceID)
const
159 std::string tmpClockSelect;
160 TableBase::activeTableView_->getValue(
162 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
164 return tmpClockSelect;
168 double FENIMPlusInterfaceTable::getClockSpeedMHz(std::string interfaceID)
const
170 double tmpClockSpeedMHz;
171 TableBase::activeTableView_->getValue(
173 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
175 return tmpClockSpeedMHz;
179 bool FENIMPlusInterfaceTable::getChannelStatus(std::string interfaceID,
180 unsigned int channel)
const
186 TableBase::activeTableView_->getValue(
188 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
192 TableBase::activeTableView_->getValue(
194 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
198 TableBase::activeTableView_->getValue(
200 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
204 TableBase::activeTableView_->getValue(
206 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
210 TableBase::activeTableView_->getValue(
212 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
216 TableBase::activeTableView_->getValue(
218 TableBase::activeTableView_->findRow(InterfaceID, interfaceID),
222 __SS____ <<
"Table Error:\t"
223 <<
"OtsUDPHardware FER Channel " << std::dec << channel
224 <<
" does not exist" << std::endl;
225 __COUT_ERR__ <<
"\n" << ss.str();