41 m_algoName(algoNameValue) {
53 m_algoName(algoNameValue), m_algoLogicalExpression(algoLogicalExpressionValue) {
66 const int algoBitNumberValue) :
67 m_algoName(algoNameValue), m_algoLogicalExpression(algoLogicalExpressionValue),
68 m_algoBitNumber(algoBitNumberValue)
89 const int pinsOnConditionChip,
90 const std::vector<int>& orderConditionChip)
const
93 for (
int iChip = 0; iChip < numberConditionChips; ++iChip) {
94 if (posChip == orderConditionChip[iChip]) {
105 const int pinsOnConditionChip,
106 const std::vector<int>& orderConditionChip)
const
109 int iChip =
algoChipNumber(numberConditionChips, pinsOnConditionChip, orderConditionChip);
111 int outputPin =
m_algoBitNumber - (orderConditionChip[iChip] -1)*pinsOnConditionChip + 1;
123 myCout <<
" Algorithm name: " <<
m_algoName << std::endl;
124 myCout <<
" Algorithm alias: " <<
m_algoAlias << std::endl;
127 if (m_algoBitNumber < 0) {
128 myCout <<
" - not properly initialized! " << std::endl;
135 if (m_algoChipNumber < 0) {
136 myCout <<
" - not properly initialized! " << std::endl;
146 myCout <<
" RPN vector size: " << rpnVectorSize;
148 if (rpnVectorSize == 0) {
149 myCout <<
" - not properly initialized! " << std::endl;
154 for (
int i = 0;
i < rpnVectorSize; ++
i) {
std::string m_algoAlias
algorithm alias
virtual ~GlobalAlgorithm()
destructor
int m_algoChipNumber
chip number (redundant with bit number)
RpnVector rpnVector() const
return the RPN vector
std::string m_algoLogicalExpression
algorithm logical expression
virtual void print(std::ostream &myCout) const
print condition
std::ostream & operator<<(std::ostream &out, const ALILine &li)
const int algoOutputPin(const int numberConditionChips, const int pinsOnConditionChip, const std::vector< int > &orderConditionChip) const
get the output pin on the condition chip for the algorithm
std::string m_algoName
algorithm name
std::vector< GlobalLogicParser::TokenRPN > m_algoRpnVector
algorithm RPN vector
const int algoChipNumber() const
get / set algorithm bit number