BlinkenArea - GitList
Repositories
Blog
Wiki
libetherpix
Code
Commits
Branches
Tags
Search
Tree:
653cc09
Branches
Tags
master
libetherpix
simulator
distri.h
continue implementing config file parsing
Stefan Schuermans
commited
653cc09
at 2017-06-10 20:17:07
distri.h
Blame
History
Raw
/* * EtherPix simulator * * Copyright 2017 Stefan Schuermans <stefan schuermans info> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DISTRI_H #define DISTRI_H #include "mapping.h" /// distributor class Distri { public: /// constructor Distri(); /** * @brief initialize * @param[in] distno distributor number * @param[in] outputs number of outputs * @param[in] pixels number of pixels per output */ void init(unsigned long distno, unsigned long outputs, unsigned long pixels); /// get distributor number unsigned long getNo() const { return m_distno; } /// get number of outputs unsigned long getOutputs() const { return m_outputs; } /// get number of pixels at each output unsigned long getPixels() const { return m_pixels; } /** * @brief get mapping * @param[in] chan color channel * @return mapping mapping object of color channel * @throws std::exception in case of error */ Mapping const& getMapping(Mapping::Channel chan) const; /** * @brief set mapping * @param[in] chan color channel * @param[in] mapping new mapping object for color channel * @throws std::exception in case of error */ void setMapping(Mapping::Channel chan, Mapping const &mapping); protected: /// distributor number unsigned long m_distno; /// number of outputs unsigned long m_outputs; /// number of pixels per output unsigned long m_pixels; /// mappings of color channels Mapping m_mappings[Mapping::ChannelCount]; }; #endif // #ifndef DISTRI_H