|
DUECA/DUSIME
|
HardwareModule, a base class for modules that interact with hardware. More...
#include <HardwareModule.hxx>


Protected Member Functions | |
| HardwareModule (Entity *e, const char *m_class, const char *part, const IncoTable *table=NULL, int state_size=0) | |
| Constructor. | |
| virtual | ~HardwareModule () |
| Destructor. | |
| SimulationState::Type | getAndCheckState (const TimeSpec &t) |
| Returns the state of the simulation at this time. | |
| SimulationState::Type | getCurrentState () |
| Find the current state, previously calculated with getAndCheckState. | |
| void | transitionComplete () |
| Indicate that a transition is complete. | |
Protected Member Functions inherited from dueca::DusimeModule | |
| DusimeModule (Entity *e, const char *m_class, const char *part, const IncoTable *inco_table, int state_size) | |
| Constructor. | |
| virtual | ~DusimeModule () |
| Destructor. | |
| bool | snapshotNow () |
| Returns true if a snapshot has to be taken in this cycle. | |
| virtual void | fillSnapshot (const TimeSpec &ts, Snapshot &snap, bool from_trim) |
| If snapshots are generated, this has to be implemented by a descendant. | |
| virtual void | loadSnapshot (const TimeSpec &ts, const Snapshot &snap) |
| For restoring the state from an old snapshot. | |
| void | trimCalculationCondition (TriggerPuller &cond) |
| This can be used to specify the condition under which the trim calculation may take place, for example, data has to be received on trim calculation input channels. | |
| virtual void | trimCalculation (const TimeSpec &ts, const TrimMode &mode) |
| This must be overridden if the module takes part in trim condition calculations. | |
Protected Member Functions inherited from dueca::Module | |
| Module (const Entity *e, const char *m_class, const char *part) | |
| Constructor. | |
Protected Member Functions inherited from dueca::NamedObject | |
| NamedObject (const GlobalId &id) | |
| Reserve for AssociateObject. | |
| NamedObject (const NameSet &ns) | |
| Normal constructor, protected, because it has no use to create a NamedObject by itself. | |
| virtual | ~NamedObject () |
| Destructor. | |
Additional Inherited Members | |
Public Member Functions inherited from dueca::Module | |
| virtual | ~Module () |
| Destructor. | |
| virtual bool | complete () |
| Inform the module that all parameters have now been passed. | |
| virtual bool | isPrepared ()=0 |
| To check whether the module is ready for work. | |
| virtual bool | isInitialPrepared () |
| To check whether the module is prepared to be prepared. | |
| ObjectType | getObjectType () const |
| The object type within DUECA. | |
| virtual void | startModule (const TimeSpec &time)=0 |
| Start the module's activity (activities) | |
| virtual void | stopModule (const TimeSpec &time)=0 |
| Stop the module's activity (activities) | |
| virtual void | initialStartModule (const TimeSpec &time) |
| Initial start opportunity. | |
| virtual void | finalStopModule (const TimeSpec &time) |
| Final stop command. | |
| const Entity * | getMyEntity () |
| Return a pointer to the entity to which this module belongs. | |
| const ModuleState & | getState () |
| Return the module state. | |
Public Member Functions inherited from dueca::NamedObject | |
| const std::string | getEntity () const |
| Returns the "entity" part of the name. | |
| const std::string | getClass () const |
| Returns the "class" part of the name. | |
| const std::string | getPart () const |
| Returns the sub-entity or "part" part of the name. | |
| const NameSet & | getNameSet () const |
| This returns the complete name set. | |
| const GlobalId & | getId () const |
| This returns the id. | |
Protected Attributes inherited from dueca::DusimeModule | |
| SnapshotState | snap_state |
| State of the snapshot taking. | |
Protected Attributes inherited from dueca::Module | |
| ModuleState | state |
| Flag to remember whether we are stopped due to some error with hardware device manipulation. | |
HardwareModule, a base class for modules that interact with hardware.
A base class from which users can derive Dusime hardware modules, i.e. modules that do the IO with physical hardware, and that thus, in addition, require extra facilities, such as:
calibration of the hardware a safety mode for driving the hardware to a safe state transitional states, e.g. for moving hardware
|
protected |
Constructor.
| e | Pointer to the entity. |
| m_class | Module class name. |
| part | Part name for the module. |
| table | Table with initial condition calculation specification. |
| state_size | Size of a snapshot of the state. |
|
protected |
Returns the state of the simulation at this time.
To be used by the child, every time a model update is calculated, for determining desired action.
|
protected |
Indicate that a transition is complete.
In transitional states (e.g. Inactive_HoldCurrent, Calibrate_HoldCurrent), a HardwareModule must confirm when the transition is completed through this call.