14#ifndef ETISS_INJECTOR_H_
15#define ETISS_INJECTOR_H_
51 typedef std::shared_ptr<Injector>
ptr;
124 std::string &errormsg) = 0;
140 static ptr get(
const std::string &injectorPath);
151#if CXX0X_UP_SUPPORTED
158 std::list<std::pair<Trigger, int32_t>>
contains general definitions used by other fault library code
general configuration and logging
contains the Trigger class that defines conditions under which actions of a Fault need to be applied.
static __inline__ uint64_t
static __inline__ int32_t
virtual bool readField(void *fastfieldaccessptr, uint64_t &val, std::string &errormsg)=0
read the value of a field
virtual bool applyAction(const etiss::fault::Fault &fault, const etiss::fault::Action &action, std::string &errormsg)=0
virtual bool acceleratedTrigger(const etiss::fault::Trigger &, int32_t fault_id)
virtual ptr getParentInjector()=0
get a the parent injector (root returns 0).
virtual void freeFastFieldAccessPtr(void *)
MUST be called to cleanup a pointer acquired with fastFieldAccessPtr() default implementation is nop.
virtual bool needsCallbacks()
virtual std::list< std::string > listFields()=0
list all fields directly reachable by this injector
bool has_pending_triggers
virtual std::string getInjectorPath()
returns the path of the current object.
virtual void * fastFieldAccessPtr(const std::string &name, std::string &errormsg)=0
virtual ptr getSubInjector(const std::string &name)=0
get a sub injector.
static ptr get(const std::string &injectorPath)
void removeTrigger(const Trigger &t, int32_t fault_id)
std::list< std::pair< Trigger, int32_t > > remove_triggers
Triggers to synchronously remove on next callback (prio over pending)
virtual std::list< std::string > listSubInjectors()=0
list all sub injectors.
std::list< std::pair< Trigger, int32_t > > unknown_triggers
Triggers to look at in callbacks.
virtual bool instructionAccurateCallback(uint64_t time_ps)
virtual bool update_field_access_rights(const etiss::fault::Action &action, std::string &errormsg)=0
Update the field of injector with access rights to allow action (used to get type of action).
virtual bool cycleAccurateCallback(uint64_t time_ps)
std::list< std::pair< Trigger, int32_t > > pending_triggers
Triggers which were just added.
void addTrigger(const Trigger &t, int32_t fault_id)
TODO specialized lists. e.g. time triggers should be sorted and only the earliest time should be chec...
general helpers for fault