The Sparta Modeling Framework
|
Defines the class base type for PEvents. More...
#include <PEventHelper.hpp>
Public Member Functions | |
template<typename ... ArgNames> | |
PEvent (const std::string &name, log::MessageSource &logger, const Clock *clk, ArgNames &&... names) | |
void | setName (const std::string &name) |
void | setFormatFlags (const uint32_t n, const FormatFlags &pre_flag, const FormatFlags &post_flag, const std::string &pre, const std::string &post) |
void | setFormatFlags (const uint32_t n, const std::string &pre, const std::string &post) |
void | setFormatLength (const uint32_t n, const int length, const FormatFlags &align, const char fill) |
void | setAsStrings (const std::initializer_list< uint32_t > list) |
set many attributes as strings, \usage setAsString({1,3,5}); //where 1, 3, and 5 are attributes to be set as a string. | |
void | setAsHex (const std::initializer_list< uint32_t > &list) |
a helper to set a custom attribute to be outputted in hex format. \usage setAsHex({1, 2, 3}); //will set custom attributes 1, 2, 3 as hex displayed outputs | |
void | setAttrs (CustomAttrs... attrs) |
template<typename AttrType , uint32_t N> | |
void | setAttr (const AttrType &attr) |
void | fireEvent () |
void | fireEvent (CustomAttrs... attrs) |
Maybe overload fireEvent to allow setting the attributes when firing. | |
bool | observed () |
Defines the class base type for PEvents.
Do not use this class directly. Instead, use a sparta::pevents::PeventCollector object instead.
Definition at line 87 of file PEventHelper.hpp.
|
inline |
Would set the event_type, as well as initial values for custom attrs Set the custom attribute names. We can probably create our own logger? But maybe they want to use the same logger for all these events?
Definition at line 204 of file PEventHelper.hpp.
|
inline |
Maybe it would be worth allowing some ability to have this PEvent instance query objects for attribute data... I don't know where the PEvent data is actually coming from? I guess we will need some way to alert the PEvent that it has occured? This is where the event would be dumped?
do what ever else the Pevent needs to do such as notifying observers?
Definition at line 316 of file PEventHelper.hpp.
|
inline |
Maybe overload fireEvent to allow setting the attributes when firing.
Definition at line 346 of file PEventHelper.hpp.
|
inline |
Definition at line 352 of file PEventHelper.hpp.
|
inline |
a helper to set a custom attribute to be outputted in hex format. \usage setAsHex({1, 2, 3}); //will set custom attributes 1, 2, 3 as hex displayed outputs
Definition at line 288 of file PEventHelper.hpp.
|
inline |
set many attributes as strings, \usage setAsString({1,3,5}); //where 1, 3, and 5 are attributes to be set as a string.
Definition at line 276 of file PEventHelper.hpp.
|
inline |
Set individual attributes? Would be cool if we could so some weirdness to set attribute by name... maybe some macro magic.
Definition at line 309 of file PEventHelper.hpp.
|
inline |
We probably need a way to set the attributes dynamically? Or would we rather set them every fireEvent? Or would the attributes not change? Is something like this sufficient?
Definition at line 304 of file PEventHelper.hpp.
|
inline |
Definition at line 240 of file PEventHelper.hpp.
|
inline |
Definition at line 251 of file PEventHelper.hpp.
|
inline |
Definition at line 263 of file PEventHelper.hpp.
|
inline |
Definition at line 220 of file PEventHelper.hpp.