13 #ifndef FAUDES_CGP_EVENTCONF_H 14 #define FAUDES_CGP_EVENTCONF_H 16 #include "libfaudes.h" 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;
EventSet mStartEvents
Events that start this timer.
std::string mAddress
Abstract address.
virtual bool IsDefault(void) const
Test for default value (never)
Event attributes for the purpose of code generation.
TimeConstraint mTimeConstraint
Timer definition (indicate timer event iff mInitialValue non-empty)
bool mExe
Literal expression i.e.
EventSet mResetEvents
Events that reset this timer.
std::string mAddress
Abstract address.
bool mNeg
Negative edge triggers event.
std::vector< InputTrigger > mTriggers
List of triggers (input events only)
bool mStatic
Fake an initial edge on initialisation to sense static levels.
TaNameSet< AttributeCodeGeneratorEvent > cgEventSet
Convenience typedef: eventset with code-generator config attributes.
AttributeCodeGeneratorEvent(void)
Default constructor (internal event)
bool mExe
Evaluate literal expression to trigger event.
AttributeCodeGeneratorEvent(const AttributeCodeGeneratorEvent &rOtherAttr)
Copy constructor.
bool mPos
Positive edge triggers event.
std::vector< OutputAction > mActions
List of actions to perform (output events only)
EventSet mStopEvents
Events that stop this timer.
Typedef for timer specification (internal events only)
Typedef for an individual trigger condition.
Typedef for an individual output action.
std::string mInitialValue
Initial value (literal to allow for advanced units, empty string for "not a timer") ...
bool Internal(void) const