Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DC_DummyCopyControlBlock.cpp

00001 // 00002 // Copyright 2004 P&P Software GmbH - All Rights Reserved 00003 // 00004 // DC_DummyCopyControlBlock.cpp 00005 // 00006 // Version 1.3 00007 // Date 11.04.03 (Version 1.0) 00008 // 14.10.03 (Version 1.1) 00009 // 16.10.03 (Version 1.2 & 1.3) 00010 // Author A. Pasetti (P&P Software), R. Totaro 00011 // 00012 // Change Record: 00013 // Version 1.1: Updated to reflect the new structure of the ControlBlock class 00014 // Version 1.2: The class is now derived from CopyControlBlock 00015 // Version 1.3: Added missing assert()s 00016 00017 #include "../GeneralInclude/CompilerSwitches.h" 00018 #include "../GeneralInclude/DebugSupport.h" 00019 #include "../GeneralInclude/BasicTypes.h" 00020 #include "../GeneralInclude/ClassId.h" 00021 #include "../GeneralInclude/Constants.h" 00022 #include "DC_DummyCopyControlBlock.h" 00023 00024 DC_DummyCopyControlBlock::DC_DummyCopyControlBlock(void) { 00025 setNumberOfInputs(3); 00026 setNumberOfOutputs(2); 00027 setNumberOfStates(1); 00028 setNumberOfParameters(2); 00029 00030 reset(); 00031 00032 setClassId(ID_DUMMYCOPYCONTROLBLOCK); 00033 } 00034 00035 void DC_DummyCopyControlBlock::propagateState(void) { 00036 assert(isObjectConfigured()); 00037 00038 x[0]=p[0]*x[0]+u[0]+u[1]+u[2]; 00039 } 00040 00041 void DC_DummyCopyControlBlock::updateOutput(void) { 00042 assert(isObjectConfigured()); 00043 00044 y[0]=x[0]; 00045 y[1]=p[1]*x[0]; 00046 } 00047 00048 void DC_DummyCopyControlBlock::reset(void) { 00049 assert(isObjectConfigured()); 00050 00051 CopyControlBlock::reset(); 00052 00053 x[0]=(TD_Float)1.0; 00054 } 00055
Copyright 2003 P&P Software GmbH - All Rights Reserved