13 #ifndef FAUDES_CGP_EVENTCONF_H
14 #define FAUDES_CGP_EVENTCONF_H
16 #include "libfaudes.h"
18 using namespace faudes;
24 #ifdef FAUDES_DEBUG_CODEGEN
25 #define FD_DCG(message) FAUDES_WRITE_CONSOLE("FAUDES_CODEGENERATOR: " << message)
27 #define FD_DCG(message)
123 { DoAssign(rOtherAttr); };
129 virtual void Clear(
void);
132 typedef enum { ETInput, ETOutput, ETInternal } EventType;
138 bool Input(
void)
const {
return mType == ETInput;};
141 bool Output(
void)
const {
return mType == ETOutput;};
144 bool Internal(
void)
const {
return mType == ETInternal;};
147 bool Timer(
void)
const {
return (mType == ETInternal) && (mTimeConstraint.mInitialValue !=
"");};
229 virtual void DoRead(TokenReader& rTr,
const std::string& rLabel=
"",
const Type* pContext=0);
249 virtual void DoWrite(TokenWriter& rTw,
const std::string& rLabel=
"",
const Type* pContext=0)
const;
TaNameSet< AttributeCodeGeneratorEvent > cgEventSet
Convenience typedef: eventset with code-generator config attributes.
Event attributes for the purpose of code generation.
bool mNeg
Negative edge triggers event.
bool mExe
Evaluate literal expression to trigger event.
std::vector< InputTrigger > mTriggers
List of triggers (input events only)
bool mExe
Literal expression i.e.
TimeConstraint mTimeConstraint
Timer definition (indicate timer event iff mInitialValue non-empty)
bool mPos
Positive edge triggers event.
bool mStatic
Fake an initial edge on initialisation to sense static levels.
std::string mAddress
Abstract address.
std::vector< OutputAction > mActions
List of actions to perform (output events only)
std::string mAddress
Abstract address.
EventSet mResetEvents
Events that reset this timer.
std::string mInitialValue
Initial value (literal to allow for advanced units, empty string for "not a timer")
virtual bool IsDefault(void) const
Test for default value (never)
bool Internal(void) const
AttributeCodeGeneratorEvent(const AttributeCodeGeneratorEvent &rOtherAttr)
Copy constructor.
AttributeCodeGeneratorEvent(void)
Default constructor (internal event)
EventSet mStopEvents
Events that stop this timer.
EventSet mStartEvents
Events that start this timer.
Typedef for an individual output action.
Typedef for timer specification (internal events only)