Sampa::Divider Class Reference

#include <clock.h>

Inheritance diagram for Sampa::Divider:

Sampa::Clock Sampa::ContainerObject Sampa::Object

List of all members.

Public Types

enum  Mode { RISE_ONLY, FALL_ONLY, RISE_AND_FALL }

Public Member Functions

 Divider (const Name &name)
void bind_clock (Clock *)
EventListenerget_rising_event ()
EventListenerget_falling_event ()
const Timeget_period () const
unsigned long long get_rising_count () const
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

ActualEvent * wait_n_rising (int n)
ActualEvent * wait_n_falling (int n)
void debug (const char *,...)
void error (Severity severity, const char *,...)
virtual void complete_restart ()

Static Protected Member Functions

static void start_at (ActualClock *, const Time &)

Protected Attributes

TimeParameter m_period
ActualClock * m_rising_clock
ActualClock * m_falling_clock
EventListener e_rising_edge
EventListener e_falling_edge

Private Member Functions

 SAMPA_PERSISTENT (Divider)

Friends

class ClockedEvent
class ClockedEventSingle
class Divider


Detailed Description

Definition at line 61 of file clock.h.


Member Enumeration Documentation

enum Sampa::Clock::Mode [inherited]

Enumerator:
RISE_ONLY 
FALL_ONLY 
RISE_AND_FALL 

Definition at line 40 of file clock.h.

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::Divider::Divider ( const Name name  ) 


Member Function Documentation

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

void Sampa::Divider::bind_clock ( Clock  ) 

EventListener& Sampa::Clock::get_rising_event (  )  [inline, inherited]

Definition at line 42 of file clock.h.

References Sampa::Clock::e_rising_edge.

EventListener& Sampa::Clock::get_falling_event (  )  [inline, inherited]

Definition at line 43 of file clock.h.

References Sampa::Clock::e_falling_edge.

const Time& Sampa::Clock::get_period (  )  const [inline, inherited]

Definition at line 44 of file clock.h.

References Sampa::Clock::m_period.

unsigned long long Sampa::Clock::get_rising_count (  )  const [inherited]

static void Sampa::Clock::start_at ( ActualClock *  ,
const Time  
) [static, protected, inherited]

ActualEvent* Sampa::Clock::wait_n_rising ( int  n  )  [protected, inherited]

ActualEvent* Sampa::Clock::wait_n_falling ( int  n  )  [protected, inherited]

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.


Friends And Related Function Documentation

friend class ClockedEvent [friend, inherited]

Definition at line 48 of file clock.h.

friend class ClockedEventSingle [friend, inherited]

Definition at line 49 of file clock.h.

friend class Divider [friend, inherited]

Definition at line 50 of file clock.h.


Member Data Documentation

TimeParameter Sampa::Clock::m_period [protected, inherited]

Definition at line 54 of file clock.h.

Referenced by Sampa::Clock::get_period().

ActualClock* Sampa::Clock::m_rising_clock [protected, inherited]

Definition at line 55 of file clock.h.

ActualClock* Sampa::Clock::m_falling_clock [protected, inherited]

Definition at line 56 of file clock.h.

EventListener Sampa::Clock::e_rising_edge [protected, inherited]

Definition at line 57 of file clock.h.

Referenced by Sampa::Clock::get_rising_event().

EventListener Sampa::Clock::e_falling_edge [protected, inherited]

Definition at line 58 of file clock.h.

Referenced by Sampa::Clock::get_falling_event().


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