$treeview $search $mathjax $extrastylesheet
otsdaq_components
v2_03_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 #include <iostream> 00002 #include "otsdaq-core/TablePluginDataFormats/DataManagerTable.h" 00003 00004 #include "otsdaq-components/UserTableDataFormats/FEOtsUDPLCLS2InterfaceTable.h" 00005 #include "otsdaq-core/Macros/TablePluginMacros.h" 00006 00007 using namespace ots; 00008 00009 //============================================================================== 00010 FEOtsUDPLCLS2InterfaceTable::FEOtsUDPLCLS2InterfaceTable(void) 00011 : FEInterfaceTableBase("FEOtsUDPLCLS2InterfaceTable") 00012 { 00014 // WARNING: the names and the order MUST match the ones in the enum // 00016 // FEOtsUDPLCLS2InterfaceTableInfo.xml 00017 //<?xml version="1.0" encoding="UTF-8" standalone="no" ?> 00018 //<ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 00019 // xsi:noNamespaceSchemaLocation="TableInfo.xsd"> 00020 // <TABLE InterfaceID="FEWRPurdueFSSRInterfaceTable"> 00021 // <VIEW InterfaceID="FEWR_PURDUE_FSSR_INTERFACE_TABLE" 00022 // Type="File,Database,DatabaseTest"> 00023 // <COLUMN NAME="InterfaceID" StorageName="INTERFACE_ID" 00024 // DataType="VARCHAR2" /> <COLUMN InterfaceID="Status" 00025 // StorageName="STATUS" DataType="VARCHAR2"/> <COLUMN 00026 // InterfaceID="FirmwareVersion" StorageName="FIRMWARE_VERSION" 00027 // DataType="NUMBER" /> <COLUMN InterfaceID="IPAddress" 00028 // StorageName="IP_ADDRESS" DataType="VARCHAR2"/> <COLUMN 00029 // InterfaceID="Port" StorageName="PORT" DataType="NUMBER" /> 00030 // <COLUMN InterfaceID="InterfaceIPAddress" StorageName="INTERFACE_IP_ADDRESS" 00031 // DataType="VARCHAR2"/> <COLUMN InterfaceID="InterfacePort" 00032 // StorageName="INTERFACE_PORT" DataType="NUMBER" /> <COLUMN 00033 // InterfaceID="StreamingIPAddress" StorageName="STREAMING_IP_ADDRESS" 00034 // DataType="VARCHAR2"/> <COLUMN InterfaceID="StreamingPort" 00035 // StorageName="STREAMING_PORT" DataType="NUMBER" /> <COLUMN 00036 // InterfaceID="NumberOfWords" StorageName="NUMBER_OF_WORDS" 00037 // DataType="NUMBER" /> <COLUMN InterfaceID="DataRate" 00038 // StorageName="DATA_RATE" DataType="NUMBER" /> 00039 // </VIEW> 00040 // </TABLE> 00041 //</ROOT> 00042 } 00043 00044 //============================================================================== 00045 FEOtsUDPLCLS2InterfaceTable::~FEOtsUDPLCLS2InterfaceTable(void) {} 00046 00047 //============================================================================== 00048 void FEOtsUDPLCLS2InterfaceTable::init(ConfigurationManager* configManager) 00049 { 00050 /* 00051 std::string enumValue1; 00052 unsigned int enumValue2; 00053 for(unsigned int row=0; row<TableBase::tableData_.getNumberOfRows(); 00054 row++) 00055 { 00056 TableBase::tableData_.getValue(enumValue1,row,Enum1); 00057 TableBase::tableData_.getValue(enumValue2,row,Enum2); 00058 } 00059 */ 00060 } 00061 00062 //============================================================================== 00063 bool FEOtsUDPLCLS2InterfaceTable::getStatus(std::string interfaceID) const 00064 { 00065 bool tmpStatus; 00066 TableBase::activeTableView_->getValue( 00067 tmpStatus, 00068 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00069 Status); 00070 return tmpStatus; 00071 } 00072 00073 //============================================================================== 00074 unsigned int FEOtsUDPLCLS2InterfaceTable::getFirmwareVersion( 00075 std::string interfaceID) const 00076 { 00077 unsigned int tmpFirmwareVersion; 00078 TableBase::activeTableView_->getValue( 00079 tmpFirmwareVersion, 00080 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00081 FirmwareVersion); 00082 return tmpFirmwareVersion; 00083 } 00084 00085 //============================================================================== 00086 std::string FEOtsUDPLCLS2InterfaceTable::getIPAddress(std::string interfaceID) const 00087 { 00088 std::string tmpIPAddress; 00089 TableBase::activeTableView_->getValue( 00090 tmpIPAddress, 00091 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00092 IPAddress); 00093 return tmpIPAddress; 00094 } 00095 00096 //============================================================================== 00097 unsigned int FEOtsUDPLCLS2InterfaceTable::getPort(std::string interfaceID) const 00098 { 00099 unsigned int tmpPort; 00100 TableBase::activeTableView_->getValue( 00101 tmpPort, TableBase::activeTableView_->findRow(InterfaceID, interfaceID), Port); 00102 return tmpPort; 00103 } 00104 00105 //============================================================================== 00106 std::string FEOtsUDPLCLS2InterfaceTable::getInterfaceIPAddress( 00107 std::string interfaceID) const 00108 { 00109 std::string tmpInterfaceIPAddress; 00110 TableBase::activeTableView_->getValue( 00111 tmpInterfaceIPAddress, 00112 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00113 InterfaceIPAddress); 00114 return tmpInterfaceIPAddress; 00115 } 00116 00117 //============================================================================== 00118 unsigned int FEOtsUDPLCLS2InterfaceTable::getInterfacePort(std::string interfaceID) const 00119 { 00120 unsigned int tmpInterfacePort; 00121 TableBase::activeTableView_->getValue( 00122 tmpInterfacePort, 00123 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00124 InterfacePort); 00125 return tmpInterfacePort; 00126 } 00127 00128 //============================================================================== 00129 std::string FEOtsUDPLCLS2InterfaceTable::getStreamingIPAddress( 00130 std::string interfaceID) const 00131 { 00132 std::string tmpStreamingIPAddress; 00133 TableBase::activeTableView_->getValue( 00134 tmpStreamingIPAddress, 00135 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00136 StreamingIPAddress); 00137 return tmpStreamingIPAddress; 00138 } 00139 00140 //============================================================================== 00141 unsigned int FEOtsUDPLCLS2InterfaceTable::getStreamingPort(std::string interfaceID) const 00142 { 00143 unsigned int tmpStreamingPort; 00144 TableBase::activeTableView_->getValue( 00145 tmpStreamingPort, 00146 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00147 StreamingPort); 00148 return tmpStreamingPort; 00149 } 00150 00151 //============================================================================== 00152 int FEOtsUDPLCLS2InterfaceTable::getNumberOfWords(std::string interfaceID) const 00153 { 00154 unsigned int tmpStreamingPort; 00155 TableBase::activeTableView_->getValue( 00156 tmpStreamingPort, 00157 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00158 NumberOfWords); 00159 return tmpStreamingPort; 00160 } 00161 00162 //============================================================================== 00163 unsigned int FEOtsUDPLCLS2InterfaceTable::getDataRate(std::string interfaceID) const 00164 { 00165 unsigned int tmpStreamingPort; 00166 TableBase::activeTableView_->getValue( 00167 tmpStreamingPort, 00168 TableBase::activeTableView_->findRow(InterfaceID, interfaceID), 00169 DataRate); 00170 return tmpStreamingPort; 00171 } 00172 00173 DEFINE_OTS_TABLE(FEOtsUDPLCLS2InterfaceTable)