All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
linear_transfer_system.h
1 /* Copyright (C) 2004-2009 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: martin.o.foerg@gmail.com
18  */
19 
20 #ifndef _LINEAR_TRANSFER_SYSTEM_
21 #define _LINEAR_TRANSFER_SYSTEM_
22 
23 #include <utility>
24 
25 #include "mbsimControl/signal_.h"
26 
27 namespace MBSimControl {
28 
33  class LinearTransferSystem : public Signal {
34 
35  public:
36  LinearTransferSystem(const std::string& name="") : Signal(name), inputSignal(nullptr) { }
37 
38  void initializeUsingXML(xercesc::DOMElement * element) override;
39 
40  void calcxSize() override { xSize = A.rows(); }
41 
42  void init(InitStage stage, const MBSim::InitConfigSet &config) override;
43 
44  void updateSignal() override;
45  void updatexd() override;
46 
47  void setSystemMatrix(fmatvec::SqrMatV A_) { A = std::move(A_); }
48  void setInputMatrix(const fmatvec::MatV& B_) { B = B_; }
49  void setOutputMatrix(const fmatvec::MatV& C_) { C = C_; }
50  void setFeedthroughMatrix(fmatvec::SqrMatV D_) { D = std::move(D_); }
51 
52  void setInputSignal(Signal * inputSignal_) { inputSignal = inputSignal_; }
53  int getSignalSize() const override { return inputSignal->getSignalSize(); }
54 
55  protected:
56  Signal* inputSignal;
57  std::string inputSignalString;
58  fmatvec::SqrMatV A, D;
59  fmatvec::MatV B, C;
60  };
61 
62 }
63 
64 #endif
Signal.
Definition: signal_.h:38
Linear tansfer system.
Definition: linear_transfer_system.h:33

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Home