5 #ifndef LODESTAR_INTEGRATORBLOCK_HPP
6 #define LODESTAR_INTEGRATORBLOCK_HPP
9 #include <Lodestar/blocks/Block.hpp>
10 #include <Lodestar/aux/ArrayStack.hpp>
15 template<
typename TInput,
unsigned int NHorizon=1,
typename TScalar =
float>
35 void clear(TInput value)
37 fifoStack_.fill(value);
38 this->
template o<0>() = value;
41 void clear(TInput &value)
43 fifoStack_.fill(value);
44 this->
template o<0>() = value;
53 this->equation = ::std::bind(
56 ::std::placeholders::_1
60 void triggerFunction(
Base &b)
62 fifoStack_.
push(b.template i<0>().object);
63 b.template o<0>() = fifoStack_.
back();
68 template<
typename TInput,
unsigned int NDelay>
73 directFeedthrough = (NDelay > 0)
85 static const ::std::array<::std::string, kIns> inTypes;
86 static const ::std::array<::std::string, kOuts> outTypes;
87 static const ::std::array<::std::string, kPars> parTypes;
89 static const ::std::array<::std::string, 2> templateTypes;
92 template<
typename TInput,
unsigned int NDelay>
94 {demangle(
typeid(TInput).name())};
96 template<
typename TInput,
unsigned int NDelay>
97 const ::std::array<::std::string, BlockTraits<std::IntegratorBlock<TInput, NDelay>>::kOuts> BlockTraits<std::IntegratorBlock<TInput, NDelay>>::outTypes =
98 {demangle(
typeid(TInput).name())};
100 template<
typename TInput,
unsigned int NDelay>
101 const ::std::array<::std::string, BlockTraits<std::IntegratorBlock<TInput, NDelay>>::kPars> BlockTraits<std::IntegratorBlock<TInput, NDelay>>::parTypes =
104 template<
typename TInput,
unsigned int NDelay>
105 const ::std::array<::std::string, 2> BlockTraits<std::IntegratorBlock<TInput, NDelay>>::templateTypes =
106 {demangle(
typeid(TInput).name()),
"unsigned int"};
111 #endif //LODESTAR_INTEGRATORBLOCK_HPP