|
|
||||||
|
Classes |
Protected Member Functions |
Private Member Functions |
Private Attributes |
List of all members
faudes::LoggingExecutor Class Reference Detailed DescriptionExecutor with logging facilities. Logging to Token IOLogging destination in general is a TokenWriter, which may be initialised to a file or console output. Logging can be configured to include
Logging to Internal FIFO BufferThe state- and event-sequence can be logged to a internal FIFO Buffer. Methods to revert to a previous state are provided. This feature is meant to facilitate user interaction in simulator applications. Technical detail: since the trace buffer only covers the dynamic state of the parallel executor, the RevertToStep method cannot recover the condition status. Including stochastic states with the trace buffer is considered to expensive. File IOFor token IO, the LoggingExecutor reads and writes a section with default label "Executor". It contains a ParallelExecutor section to define a vector of generators and a SimConditionSet section to define the relevant conditions. Example: <Executor>
<Generators>
"./some_generator.gen"
"./other_generator.gen"
</Generators>
"IdleCond"
<EventCondition>
<StartEvents> "beta" "mue" </StartEvents>
<StopEvents> "alpha" </StopEvents>
</EventCondition>
"DownCond"
<StateCondition>
</StateCondition>
</Conditions>
</Executor>
const SimConditionSet & Conditions(void) const Read-only access to simulation conditions. Definition: sp_lpexecutor.cpp:209 Definition at line 85 of file sp_lpexecutor.h.
Member Typedef Documentation◆ ConditionIterator
Condition iterator: typedef. Definition at line 292 of file sp_lpexecutor.h. ◆ TraceIterator
Access buffer: iterator. Definition at line 356 of file sp_lpexecutor.h. Member Enumeration Documentation◆ LogModeLogging mode flags, to specify what data to log. doxygen group
Definition at line 314 of file sp_lpexecutor.h. Constructor & Destructor Documentation◆ LoggingExecutor() [1/3]
◆ LoggingExecutor() [2/3]
Copy constructor. Definition at line 30 of file sp_lpexecutor.cpp. ◆ LoggingExecutor() [3/3]
Construct from file. See ParallelExecutor::Insert(const std::string& rFileName) for details.
Definition at line 39 of file sp_lpexecutor.cpp. ◆ ~LoggingExecutor()
Explicit destructor. Definition at line 48 of file sp_lpexecutor.cpp. Member Function Documentation◆ BreakCondition()
Simulation state: true if some break condition is currently satisfied. Definition at line 301 of file sp_lpexecutor.h. ◆ Clear()
Clear all data. doxygen group Removes all generators/executors, all conditions, and resets the current state to a void value. Reimplemented from faudes::ParallelExecutor. Reimplemented in faudes::ProposingExecutor, and faudes::DeviceExecutor. Definition at line 89 of file sp_lpexecutor.cpp. ◆ ClrCondition() [1/2]
Remove a condition by name Definition at line 260 of file sp_lpexecutor.cpp. ◆ ClrCondition() [2/2]
Remove a condition by index Definition at line 266 of file sp_lpexecutor.cpp. ◆ Compile()
Compile internal data (all) Reimplemented from faudes::ParallelExecutor. Definition at line 63 of file sp_lpexecutor.cpp. ◆ CompileConditions()
Compile condition internal data. Definition at line 294 of file sp_lpexecutor.cpp. ◆ Condition() [1/2]
Read-only access to a simulation condition by name. Definition at line 223 of file sp_lpexecutor.cpp. ◆ Condition() [2/2]
Read-only access to a simulation condition by index. Definition at line 228 of file sp_lpexecutor.cpp. ◆ Conditions() [1/2]
Set all simulation conditions. Definition at line 214 of file sp_lpexecutor.cpp. ◆ Conditions() [2/2]
Read-only access to simulation conditions. doxygen group Definition at line 209 of file sp_lpexecutor.cpp. ◆ ConditionsBegin()
Condition iterator: begin. Definition at line 284 of file sp_lpexecutor.cpp. ◆ ConditionsEnd()
Condition iterator: end Definition at line 289 of file sp_lpexecutor.cpp. ◆ ConditionsProcess()
Process condition hook. Definition at line 327 of file sp_lpexecutor.cpp. ◆ ConditionsRead()
Read conditions from labled section Definition at line 277 of file sp_lpexecutor.cpp. ◆ ConditionsReset()
Reset condition simulation state. Definition at line 320 of file sp_lpexecutor.cpp. ◆ ConditionsWrite()
Write conditions so labled section Definition at line 272 of file sp_lpexecutor.cpp. ◆ CurrentParallelTimedState() [1/2]
Set current state of the ParallelExecutor. This resets the parallel executor to the given state, incl clock values. The trace buffer is cleared. You should pause/resume logging befor/after interfering with the executors state.
Reimplemented from faudes::ParallelExecutor. Definition at line 196 of file sp_lpexecutor.cpp. ◆ CurrentParallelTimedState() [2/2]
Get current state of the ParallelExecutor.
Definition at line 248 of file sp_lpexecutor.h. ◆ CurrentStep() [1/2]
Set logical time (# of steps) This does not affect clocks and, hence, is purely cosmetic. Note that, in contrast to clock time, the individual generators do not agree in logical time. The trace buffer is cleared. You should pause/resume logging befor/after interfering with the executors state.
Reimplemented from faudes::ParallelExecutor. Definition at line 176 of file sp_lpexecutor.cpp. ◆ CurrentStep() [2/2]
Get logical time, ie number of transitions so far,. Definition at line 213 of file sp_lpexecutor.h. ◆ CurrentTime() [1/2]
Set clock time. This does not affect clocks and, hence, is purely cosmetic. The trace buffer is cleared. You should pause/resume logging befor/after interfering with the executors state.
Reimplemented from faudes::ParallelExecutor. Definition at line 186 of file sp_lpexecutor.cpp. ◆ CurrentTime() [2/2]
Get clock time. Definition at line 196 of file sp_lpexecutor.h. ◆ DoAssign()
Assignment method.
Definition at line 54 of file sp_lpexecutor.cpp. ◆ DoRead()
Reads logging executor from TokenReader, see also public wrappers in faudes::Type.
Reimplemented from faudes::ParallelExecutor. Reimplemented in faudes::ProposingExecutor. Definition at line 112 of file sp_lpexecutor.cpp. ◆ DoWrite()
Write to TokenWriter, see also public wrappers in faudes::Type.
Reimplemented from faudes::ParallelExecutor. Reimplemented in faudes::ProposingExecutor. Definition at line 101 of file sp_lpexecutor.cpp. ◆ ExecuteEvent()
Execute transition. Returns false if the transition cannot be executed at the current time.
Reimplemented from faudes::ParallelExecutor. Reimplemented in faudes::ProposingExecutor, and faudes::DeviceExecutor. Definition at line 158 of file sp_lpexecutor.cpp. ◆ ExecuteTime()
Let time pass without executing a transition. Return false if the specified duration
Reimplemented from faudes::ParallelExecutor. Reimplemented in faudes::ProposingExecutor. Definition at line 146 of file sp_lpexecutor.cpp. ◆ LogClose()
Stop logging. Definition at line 417 of file sp_lpexecutor.cpp. ◆ LogOpen() [1/2]
Start logging to file. Definition at line 408 of file sp_lpexecutor.cpp. ◆ LogOpen() [2/2]
Start logging to TokenWriter. Definition at line 391 of file sp_lpexecutor.cpp. ◆ LogWriteEvent()
Logging hook: dump recent event. Definition at line 467 of file sp_lpexecutor.cpp. ◆ LogWritePause()
Logging hook: halt simulation. Definition at line 493 of file sp_lpexecutor.cpp. ◆ LogWriteResume()
Logging hook: continue simulation. Definition at line 505 of file sp_lpexecutor.cpp. ◆ LogWriteState()
Logging hook: dump current state. Definition at line 457 of file sp_lpexecutor.cpp. ◆ LogWriteStatistics()
Logging hook: dump statistics. Definition at line 436 of file sp_lpexecutor.cpp. ◆ LogWriteTime()
Logging hook: dump current time. Definition at line 480 of file sp_lpexecutor.cpp. ◆ Reset()
Goto initial state. Reset all clock values to zero, assign initial states to each executor, reset condition states to not-satisfied, invalidate timing samples. Reimplemented from faudes::ParallelExecutor. Reimplemented in faudes::ProposingExecutor. Definition at line 73 of file sp_lpexecutor.cpp. ◆ RevertToStep()
Revert executors state to past step from buffer. Reimplemented in faudes::ProposingExecutor. Definition at line 656 of file sp_lpexecutor.cpp. ◆ SetCondition() [1/2]
Set (or add) a condition by name. Definition at line 247 of file sp_lpexecutor.cpp. ◆ SetCondition() [2/2]
Set a condition by index Definition at line 254 of file sp_lpexecutor.cpp. ◆ TraceAddSample()
Trace: helper, append one void sample. Definition at line 579 of file sp_lpexecutor.cpp. ◆ TraceAtStep()
Access buffer: sample by step. Definition at line 539 of file sp_lpexecutor.cpp. ◆ TraceAtTime()
Access buffer: sample by faudes time (returns first sample) Definition at line 547 of file sp_lpexecutor.cpp. ◆ TraceBegin()
Condition iterator: begin. Definition at line 529 of file sp_lpexecutor.cpp. ◆ TraceClear()
Clear buffer and set max buffer. doxygen group
Definition at line 513 of file sp_lpexecutor.cpp. ◆ TraceCurrent()
Access buffer: current sample. Definition at line 556 of file sp_lpexecutor.cpp. ◆ TraceEnd()
Condition iterator: end Definition at line 534 of file sp_lpexecutor.cpp. ◆ TraceFirst()
Access buffer: first sample. Definition at line 568 of file sp_lpexecutor.cpp. ◆ TraceLength()
Access buffer: current length. Definition at line 574 of file sp_lpexecutor.cpp. ◆ TraceRecent()
Access buffer: recent sample. Definition at line 562 of file sp_lpexecutor.cpp. ◆ TraceToString()
Access buffer: convert to string. Definition at line 649 of file sp_lpexecutor.cpp. ◆ TraceUpdateTime()
Trace: append sample (if necessary) and update to current time Definition at line 612 of file sp_lpexecutor.cpp. ◆ TraceUpdateTransition()
Trace: append sample (if necessary) and update to current state via given event Definition at line 600 of file sp_lpexecutor.cpp. ◆ TraceWrite() [1/3]
Access buffer: console output. Definition at line 636 of file sp_lpexecutor.cpp. ◆ TraceWrite() [2/3]
Access buffer: tokenwriter output. Definition at line 623 of file sp_lpexecutor.cpp. ◆ TraceWrite() [3/3]
Access buffer: console output (list all) Definition at line 642 of file sp_lpexecutor.cpp. ◆ Valid()
Check validity of executors. This is currently not implemented. It should include tests on the state based conditions.
Reimplemented from faudes::ParallelExecutor. Definition at line 164 of file sp_lpexecutor.h. Member Data Documentation◆ mBreakCondition
Indicate break. Definition at line 453 of file sp_lpexecutor.h. ◆ mConditions
Simulation conditions. Definition at line 447 of file sp_lpexecutor.h. ◆ mEnabledConditions
Enabled simulation conditions. Definition at line 450 of file sp_lpexecutor.h. ◆ mLogFile
Logging: file name. Definition at line 468 of file sp_lpexecutor.h. ◆ mLogMode
Logging: mode. Definition at line 471 of file sp_lpexecutor.h. ◆ mTraceBuffer
Trace data: fifo buffer. Definition at line 498 of file sp_lpexecutor.h. ◆ mTraceFirstStep
Trace data: step no of first sample. Definition at line 495 of file sp_lpexecutor.h. ◆ mTraceMax
Trace data: max fifo length. Definition at line 492 of file sp_lpexecutor.h. ◆ mTraceTimeToStep
Trace data: time to step mapping (first step) Definition at line 501 of file sp_lpexecutor.h. ◆ pLogTokenWriter
Logging: tokenwriter ref. Definition at line 465 of file sp_lpexecutor.h. The documentation for this class was generated from the following files: libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen |