ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
etiss::fault::Action Class Reference

#include <Action.h>

Inheritance diagram for etiss::fault::Action:
Inheritance graph
[legend]
Collaboration diagram for etiss::fault::Action:
Collaboration graph
[legend]

Public Types

enum  Type { BITFLIP , COMMAND , NOP , INJECTION }
 

Public Member Functions

 Action ()
 
 Action (const InjectorAddress &inj, const std::string &command)
 abstract string command will be passed to the targeted injector More...
 
 Action (const InjectorAddress &inj, const std::string &field, unsigned bit)
 the bit at the given position of the given field of the given injector will be flipped More...
 
 Action (const Fault &fault)
 injects a fault. this is especially usefull with Triggers of type TIMERELATIVE More...
 
Type getType () const
 
const InjectorAddressgetInjectorAddress () const
 
const std::string & getCommand () const
 COMMAND only. More...
 
const std::string & getTargetField () const
 BITFLIP only. More...
 
unsigned getTargetBit () const
 BITFLIP only. More...
 
const FaultgetFault () const
 INJECTION only. More...
 
std::string toString () const
 operator<< can be used. More...
 
- Public Member Functions inherited from etiss::ToString
 ToString ()
 
virtual ~ToString ()
 

Private Member Functions

void ensure (Type)
 

Private Attributes

Type type_
 type of the Attribute More...
 
InjectorAddress inj_
 
std::string command_
 command e.g. for booting OR1KVCPU More...
 
std::string field_
 concerning Field (for fault injection) More...
 
unsigned bit_
 concerning Bit (for fault injection) More...
 
std::vector< Faultfault_
 for other injections More...
 

Detailed Description

Definition at line 77 of file Action.h.

Member Enumeration Documentation

◆ Type

Enumerator
BITFLIP 

applies a bit flip to a bit in a specified field

COMMAND 

commands are targetet at Injectors, not fields.

in case a command is targetet at a certain field that information must be passed within the command string

NOP 

NO Operation. used by default constructor.

INJECTION 

an action that injects a fault definition (trigger + actions)

Definition at line 80 of file Action.h.

Constructor & Destructor Documentation

◆ Action() [1/4]

etiss::fault::Action::Action ( )
Note
Type: NOP (no operation)

Definition at line 62 of file Action.cpp.

References etiss::log(), and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [2/4]

etiss::fault::Action::Action ( const InjectorAddress inj,
const std::string &  command 
)

abstract string command will be passed to the targeted injector

Note
Type: Command

Definition at line 67 of file Action.cpp.

References etiss::fault::InjectorAddress::getInjectorPath(), etiss::log(), and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [3/4]

etiss::fault::Action::Action ( const InjectorAddress inj,
const std::string &  field,
unsigned  bit 
)

the bit at the given position of the given field of the given injector will be flipped

Note
Type: BitFlip

Definition at line 73 of file Action.cpp.

References etiss::fault::InjectorAddress::getInjectorPath(), etiss::log(), and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [4/4]

etiss::fault::Action::Action ( const Fault fault)

injects a fault. this is especially usefull with Triggers of type TIMERELATIVE

Note
Type: Injection

Definition at line 81 of file Action.cpp.

References fault_, etiss::log(), etiss::fault::Fault::toString(), and etiss::VERBOSE.

Here is the call graph for this function:

Member Function Documentation

◆ ensure()

void etiss::fault::Action::ensure ( Type  t)
private

Definition at line 56 of file Action.cpp.

References type_.

◆ getCommand()

const std::string & etiss::fault::Action::getCommand ( ) const

COMMAND only.

Definition at line 99 of file Action.cpp.

References command_.

◆ getFault()

const Fault & etiss::fault::Action::getFault ( ) const

INJECTION only.

Definition at line 116 of file Action.cpp.

References fault_, INJECTION, and type_.

◆ getInjectorAddress()

const InjectorAddress & etiss::fault::Action::getInjectorAddress ( ) const

Definition at line 93 of file Action.cpp.

References inj_.

◆ getTargetBit()

unsigned etiss::fault::Action::getTargetBit ( ) const

BITFLIP only.

Definition at line 111 of file Action.cpp.

References bit_.

Referenced by etiss::VirtualStruct::applyAction().

Here is the caller graph for this function:

◆ getTargetField()

const std::string & etiss::fault::Action::getTargetField ( ) const

BITFLIP only.

Definition at line 105 of file Action.cpp.

References field_.

Referenced by etiss::VirtualStruct::applyAction().

Here is the caller graph for this function:

◆ getType()

Action::Type etiss::fault::Action::getType ( ) const

Definition at line 88 of file Action.cpp.

References type_.

Referenced by etiss::VirtualStruct::applyAction().

Here is the caller graph for this function:

◆ toString()

std::string etiss::fault::Action::toString ( ) const

operator<< can be used.

Definition at line 123 of file Action.cpp.

References pugi::xml_node::append_child(), pugi::xml_document::load(), and pugi::xml_document::save().

Here is the call graph for this function:

Member Data Documentation

◆ bit_

unsigned etiss::fault::Action::bit_
private

concerning Bit (for fault injection)

Definition at line 139 of file Action.h.

Referenced by getTargetBit().

◆ command_

std::string etiss::fault::Action::command_
private

command e.g. for booting OR1KVCPU

Definition at line 137 of file Action.h.

Referenced by getCommand().

◆ fault_

std::vector<Fault> etiss::fault::Action::fault_
private

for other injections

Definition at line 140 of file Action.h.

Referenced by Action(), and getFault().

◆ field_

std::string etiss::fault::Action::field_
private

concerning Field (for fault injection)

Definition at line 138 of file Action.h.

Referenced by getTargetField().

◆ inj_

InjectorAddress etiss::fault::Action::inj_
private

Definition at line 136 of file Action.h.

Referenced by getInjectorAddress().

◆ type_

Type etiss::fault::Action::type_
private

type of the Attribute

Definition at line 135 of file Action.h.

Referenced by ensure(), getFault(), and getType().


The documentation for this class was generated from the following files: