Sampa::Target Class Reference
[Protocol]

kind of slave port for point to point connection More...

#include <protocol.h>

Inheritance diagram for Sampa::Target:

Sampa::ContainerObject Sampa::Object Sampa::AdaptingTarget< Adapted >

List of all members.

Public Member Functions

 Target (const Name &name, TargetRequestInterface *target=0)
void bind_initiator (Initiator *initiator)
TargetRequestInterfaceget_target () const
void bind_clock (Clock *clock)
Clockget_clock () const
Targetoperator-> ()
bool send_response (const Response &response)
bool has_pending_response () const
EventListenerget_response_accepted_event ()
EventListenerget_request_accepted_event ()
bool accept_request ()
void cancel_accept_request ()
const char * get_name () const
const char * get_full_name () const
 name can be ([^. ]+.)*[^. ]+
Objectget_parent () const
 return object containing this one
Objectget_sibling () const
 return next object with same parent or NULL if none
Objectget_first_child () const
 return first child object or NULL if none
int is_debug () const

Protected Types

enum  Severity { S_INFO, S_WARNING, S_ERROR, S_FATAL }

Protected Member Functions

void debug (const char *,...)
void error (Severity severity, const char *,...)
virtual void complete_restart ()

Private Member Functions

 SAMPA_PERSISTENT (Target)

Private Attributes

Initiatorp_initiator
TargetRequestInterfacep_target
Clockp_clock


Detailed Description

kind of slave port for point to point connection

Definition at line 446 of file protocol.h.


Member Enumeration Documentation

enum Sampa::Object::Severity [protected, inherited]

Enumerator:
S_INFO 
S_WARNING 
S_ERROR 
S_FATAL 

Definition at line 48 of file object.h.


Constructor & Destructor Documentation

Sampa::Target::Target ( const Name name,
TargetRequestInterface target = 0 
)


Member Function Documentation

void Sampa::Target::bind_initiator ( Initiator initiator  )  [inline]

Definition at line 449 of file protocol.h.

References p_initiator.

TargetRequestInterface* Sampa::Target::get_target (  )  const [inline]

Definition at line 451 of file protocol.h.

References p_target.

void Sampa::Target::bind_clock ( Clock clock  ) 

Clock* Sampa::Target::get_clock (  )  const [inline]

Definition at line 454 of file protocol.h.

References p_clock.

Target* Sampa::Target::operator-> (  )  [inline]

Definition at line 456 of file protocol.h.

bool Sampa::Target::send_response ( const Response response  )  [inline]

Definition at line 458 of file protocol.h.

References p_initiator, and Sampa::Initiator::send_response().

Referenced by Sampa::Cache::fill_instruction(), Sampa::Cache::forward_data_response(), and Sampa::Cache::forward_inst_response().

bool Sampa::Target::has_pending_response (  )  const [inline]

Definition at line 460 of file protocol.h.

References Sampa::Initiator::has_pending_response(), and p_initiator.

EventListener& Sampa::Target::get_response_accepted_event (  )  [inline]

Definition at line 462 of file protocol.h.

References Sampa::Initiator::get_response_accepted_event(), and p_initiator.

EventListener& Sampa::Target::get_request_accepted_event (  )  [inline]

Definition at line 464 of file protocol.h.

References Sampa::Initiator::get_request_accepted_event(), and p_initiator.

bool Sampa::Target::accept_request (  )  [inline]

Definition at line 466 of file protocol.h.

References Sampa::Initiator::accept_request(), and p_initiator.

void Sampa::Target::cancel_accept_request (  )  [inline]

Definition at line 468 of file protocol.h.

References Sampa::Initiator::cancel_accept_request(), and p_initiator.

Sampa::Target::SAMPA_PERSISTENT ( Target   )  [private]

const char* Sampa::Object::get_name (  )  const [inherited]

returns the local name

const char* Sampa::Object::get_full_name (  )  const [inherited]

name can be ([^. ]+.)*[^. ]+

Object* Sampa::Object::get_parent (  )  const [inherited]

return object containing this one

Object* Sampa::Object::get_sibling (  )  const [inherited]

return next object with same parent or NULL if none

Object* Sampa::Object::get_first_child (  )  const [inherited]

return first child object or NULL if none

int Sampa::Object::is_debug (  )  const [inline, inherited]

Definition at line 44 of file object.h.

void Sampa::Object::debug ( const char *  ,
  ... 
) [protected, inherited]

void Sampa::Object::error ( Severity  severity,
const char *  ,
  ... 
) [protected, inherited]

virtual void Sampa::Object::complete_restart (  )  [protected, virtual, inherited]

is called to finalize restart. On restart, one shall update pointers, or reopen ressources (files, ...).

Most of pointers are restored by the thanks to the post++ library provided that the CLASSINFO() was correctly set.

However, some pointers are not relocated by the library. These are for example the method pointers used for the processes. Take a look at

See also:
Module::restart_process, to see how this is handled

Reimplemented in Sampa::Bridge, Sampa::Dma, Sampa::FixLatencySlave, Sampa::PeriodicTrafficGenerator, Sampa::TwoPortL1Cpu, and Sampa::StochasticCpu.


Member Data Documentation

Initiator* Sampa::Target::p_initiator [private]

Definition at line 471 of file protocol.h.

Referenced by accept_request(), bind_initiator(), cancel_accept_request(), get_request_accepted_event(), get_response_accepted_event(), has_pending_response(), and send_response().

TargetRequestInterface* Sampa::Target::p_target [private]

Definition at line 472 of file protocol.h.

Referenced by get_target().

Clock* Sampa::Target::p_clock [private]

Definition at line 473 of file protocol.h.

Referenced by get_clock().


The documentation for this class was generated from the following file:
Generated on Sat Feb 16 16:23:19 2008 for Sampa by  doxygen 1.5.3