$treeview $search $mathjax $extrastylesheet
otsdaq
v2_03_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 /* 00002 * ViewRegisterInfo.cpp 00003 * 00004 * Created on: Jul 29, 2015 00005 * Author: parilla 00006 * 00007 * 00008 * 00009 */ 00010 00011 #include "otsdaq-core/ConfigurationDataFormats/ViewRegisterInfo.h" 00012 00013 using namespace ots; 00014 00015 //============================================================================== 00016 ViewRegisterInfo::ViewRegisterInfo(std::string typeName, 00017 std::string registerName, 00018 std::string baseAddress, 00019 int size, 00020 std::string access) 00021 { 00022 dataTable_.push_back(typeName), dataTable_.push_back(registerName), 00023 dataTable_.push_back(baseAddress), dataTable_.push_back(std::to_string(size)), 00024 dataTable_.push_back(access); 00025 } 00026 00027 //============================================================================== 00028 ViewRegisterInfo::~ViewRegisterInfo(void) {} 00029 00030 //============================================================================== 00031 const std::string& ViewRegisterInfo::getTypeName(void) const 00032 { 00033 return dataTable_.at(typeName_); 00034 } 00035 00036 //============================================================================== 00037 const std::string& ViewRegisterInfo::getRegisterName(void) const 00038 { 00039 return dataTable_.at(registerName_); 00040 } 00041 //============================================================================== 00042 const std::string& ViewRegisterInfo::getBaseAddress(void) const 00043 { 00044 return dataTable_.at(baseAddress_); 00045 } 00046 //============================================================================== 00047 const int ViewRegisterInfo::getSize(void) const 00048 { 00049 return std::stoi(dataTable_.at(size_)); 00050 } 00051 //============================================================================== 00052 const std::string& ViewRegisterInfo::getAccess(void) const 00053 { 00054 return dataTable_.at(access_); 00055 } 00056 //============================================================================== 00057 const int ViewRegisterInfo::getNumberOfColumns(void) const { return dataTable_.size(); }