|
|
||||||
|
faudes::DeviceExecutor Class Reference
Detailed DescriptionExecuter with IO device to handle external/physical events External/Physical Events and TimeThis executor class is derived from the ProposingExecutor and uses a vDevice from the IO Device Plugin to handle input and output events and physical time. Technically, the class provides the routine SyncStep() that has to be called periodically to synchronize executor clock time with physical time and to perform input readings and output writings. There is also a convenience routine SyncRun() which runs a loop with SyncStep(). The SyncStep() procedure implements the below stages. It returns true, if indeed a transition was executed. It returns false on synchronistion errors or when the specified duration expired.
Naturally, the DeviceExecutor requires the IO Device plugin in order to be functional. In the absence of the plugin, the DeviceExecutor will behave like a ProposingExecutor. File IOThe DeviceExecutor inherits file IO from the ProposingExecutor. The device itself is initialized by vDevice methods (eg configured from File) and then passed to the DeviceExecutor by the method Devicep(). Thus, the DeviceExecutor does not need to implement additional token io facilities. Definition at line 75 of file sp_dplpexecutor.h. Member Enumeration Documentation◆ SyncModeModes of synchronisation
Definition at line 177 of file sp_dplpexecutor.h. Constructor & Destructor Documentation◆ DeviceExecutor() [1/2]
doxygen group Creates an emtpy DeviceExecutor Definition at line 24 of file sp_dplpexecutor.cpp. ◆ DeviceExecutor() [2/2]
Copy constructor Definition at line 30 of file sp_dplpexecutor.cpp. ◆ ~DeviceExecutor()
Explicit destructor Definition at line 37 of file sp_dplpexecutor.cpp. Member Function Documentation◆ Clear()
Clear all data (generators, simulation attributes etc) This includes the "HardwareReset" event. Reimplemented from faudes::ProposingExecutor. Definition at line 86 of file sp_dplpexecutor.cpp. ◆ Devicep() [1/2]
Get device. Retturn a refernce to the device for inspection. Note: you must not interfear with the device during synchronuous execution.
Definition at line 309 of file sp_dplpexecutor.h. ◆ Devicep() [2/2]
Set device. The device must be configured. You must start the device befor the first call to SyncRun. Ownership of the device stays with the caller.
Definition at line 52 of file sp_dplpexecutor.cpp. ◆ DeviceReset()
Convenience: Reset the device. Definition at line 62 of file sp_dplpexecutor.cpp. ◆ DeviceResetRequest()
Query the device whther it has received an external reset request. This method will reset the request.
Definition at line 117 of file sp_dplpexecutor.cpp. ◆ DeviceStart()
Convenience: Start the device. Definition at line 70 of file sp_dplpexecutor.cpp. ◆ DeviceStop()
Convenience: Stop the device. Definition at line 78 of file sp_dplpexecutor.cpp. ◆ DoAssign()
Assignment method
Definition at line 43 of file sp_dplpexecutor.cpp. ◆ ExecuteEvent()
Execute event. Programmatically override any internal schedules and execute the specified event. This routine will neither synchronize generator time nor events.
Reimplemented from faudes::LoggingExecutor. Definition at line 129 of file sp_dplpexecutor.cpp. ◆ IsSynchronous()
Test Syncronisation
Definition at line 284 of file sp_dplpexecutor.h. ◆ New()
Dummy factory method. Note: the executor classes currently do not implement faudes Type RTI related function. This factory method is only to prevent registry error messages. Definition at line 112 of file sp_dplpexecutor.h. ◆ Reset()
doxygen group Reset the DeviceExecutor. Reset the executor to its initial state and reset the device, ie clear queued input event set outputs to a passive state
Reimplemented from faudes::ProposingExecutor. Definition at line 92 of file sp_dplpexecutor.cpp. ◆ SyncEvents()
Execute scheduled or input events now If an event is scheduled for now, execute it. Otherwise, execute a input event if such is ready. Otherwise execute do nothing.
Definition at line 230 of file sp_dplpexecutor.cpp. ◆ SyncRun()
Run execution with synchronous physical signals. Loops SyncStep until the specified amount on time expired.
Definition at line 387 of file sp_dplpexecutor.cpp. ◆ SyncStep()
Execute one transition with synchronous physical signals. Calls SyncTime, SyncEvents and SyncWait to execute one transition. It will, however, not pass more than the specified duration.
Definition at line 359 of file sp_dplpexecutor.cpp. ◆ SyncTime()
Execute generator clock time to sync with device time. If possible, execute the amount of clock time required for an exact match. Otherwise, accept the specified tolerance. As a last resort, issue a sync error.
Definition at line 151 of file sp_dplpexecutor.cpp. ◆ SyncWait()
Wait for input events Wait the specified amount of time, for the proposed time to elaps, or a input event to occur - whatever comes first. This function will not synchronise with generator time. You may call SyncTime afterwards.
Definition at line 291 of file sp_dplpexecutor.cpp. ◆ SyncWaitMs()
Wait for input events Wait the specified amount of time, for the proposed time to elaps, or a input event to occur - whatever comes first. This function will not synchronise with generator time. You may call SyncTime afterwards. Note that the executor does not know about msecs, and thus the core interface referc to faudes-time units only. This function is an exception of this rule and is for convenience only.
Definition at line 323 of file sp_dplpexecutor.cpp. ◆ ToleranceMode()
Set synchronisation flags. Semantics are defined via the enum typedef SyncMode.
Definition at line 191 of file sp_dplpexecutor.h. ◆ ToleranceTime()
doxygen group Set tolerance for time synchonisation.
Definition at line 172 of file sp_dplpexecutor.h. Member Data Documentation◆ mMaxSyncGap
Max gap between physical and generator clock time Definition at line 347 of file sp_dplpexecutor.h. ◆ mSyncError
Sync error flag Definition at line 344 of file sp_dplpexecutor.h. ◆ mSyncMode
Mode flags for synchronisation Definition at line 350 of file sp_dplpexecutor.h. ◆ pDevice
Device reference Definition at line 353 of file sp_dplpexecutor.h. The documentation for this class was generated from the following files: libFAUDES 2.33b --- 2025.05.07 --- c++ api documentaion by doxygen |