Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

NewSimulatorDomain Class Reference

The domain class includes funtions for the access of NewSimulatorResource objects and the verification of the rdr classes. More...

#include <new_sim_domain.h>

Inheritance diagram for NewSimulatorDomain:

Inheritance graph
[legend]
Collaboration diagram for NewSimulatorDomain:

Collaboration graph
[legend]
List of all members.

Public Member Functions

SaHpiDomainIdT DomainId ()
 return the own domain id
SaHpiTimeoutT & InsertTimeout ()
 return a reference to the insert timeout parameter
SaHpiTimeoutT & ExtractTimeout ()
 return a reference to the extraction timeout parameter
int HandlerId ()
 return the handler id
bool HasRunningWdt ()
 return if a watchdog timer is running
bool HasRunningFumi ()
 return if a fumi is running
void SetRunningWdt (bool flag)
 set running watchdog flag
void SetRunningFumi (bool flag)
 set running fumi flag
void ReadLock ()
 Setting a read lock.
void ReadUnlock ()
 Unlock the reading.
void WriteLock ()
 Setting a write lock.
void WriteUnlock ()
 Unlock the writing.
bool CheckLock ()
 Check if a lock is set.
int Num ()
 Return the number of resource in the domain.
void AddResource (NewSimulatorResource *res)
 Add a resource to the domain.
bool CleanupResource (NewSimulatorResource *res)
 Cleanup one resource.
void RemResource (NewSimulatorResource *res)
 Remove a resource from the domain.
NewSimulatorResourceGetResource (int i)
 Get Resource.
NewSimulatorResourceFindResource (NewSimulatorResource *res)
 Find resource by resource pointer.
NewSimulatorResourceFindResource (const NewSimulatorEntityPath &ep)
 Find resource by entity path.
 NewSimulatorDomain ()
 Constructor.
virtual ~NewSimulatorDomain ()
 Destructor.
bool Init (NewSimulatorFile *file)
 Initialization and filling the domain with resources and rdr by calling NewSimulatorFile::Discover().
void Cleanup ()
 Ceanup all resources in the domain.
NewSimulatorResourceVerifyResource (NewSimulatorResource *res)
 Verify Resource.
NewSimulatorRdrVerifyRdr (NewSimulatorRdr *rdr)
 Verify Rdr.
NewSimulatorSensorVerifySensor (NewSimulatorSensor *s)
 Verify Sensor.
NewSimulatorControlVerifyControl (NewSimulatorControl *c)
 Verify Control.
NewSimulatorAnnunciatorVerifyAnnunciator (NewSimulatorAnnunciator *a)
 Verify Annunciator.
NewSimulatorWatchdogVerifyWatchdog (NewSimulatorWatchdog *c)
 Verify Watchdog.
NewSimulatorFumiVerifyFumi (NewSimulatorFumi *f)
 Verify Fumi.
NewSimulatorDimiVerifyDimi (NewSimulatorDimi *d)
 Verify Dimi.
NewSimulatorInventoryVerifyInventory (NewSimulatorInventory *i)
 Verify Inventory.
virtual void AddHpiEvent (oh_event *event)=0
 abstract method for adding a hpi event
virtual oh_evt_queue * GetHpiEventList ()=0
 abstract method for getting a hpi event
virtual const NewSimulatorEntityPathEntityRoot ()=0
 abstract method for getting a reference on the entity root
virtual oh_handler_state * GetHandler ()=0
 abstract method for getting a pointer on the handler
virtual SaHpiRptEntryT * FindResource (SaHpiResourceIdT id)=0
 abstract method for finding a resource with a given id
void Dump (NewSimulatorLog &dump) const
 Dump some information about the resources hold in the domain.

Public Attributes

cThreadLock m_initial_discover_lock
 lock m_initial_discover
int m_initial_discover
 > 0 => initial discover in progress

Protected Attributes

NewSimulatorFilem_file
 pointer on the Simulation file to be used
SaHpiDomainIdT m_did
 own domain id
NewSimulatorTextBuffer m_domain_tag
 own domain tag
SaHpiTimeoutT m_insert_timeout
 insertion timeout value
SaHpiTimeoutT m_extract_timeout
 extraction timeout value
bool m_own_domain
 TBD: to be clarified if needed.
int m_handler_id
 id of the used plugin handler
bool m_running_wdt
 flag if a watchdog is running and should be checked
bool m_running_fumi
 flag if a fumi is running and should be checked
unsigned int m_major_version
 Major version.
unsigned int m_minor_version
 Minor version.
cThreadLockRw m_lock
 global lock for reading/writing:
cArray< NewSimulatorResourcem_resources
 Array with all resources of the rpt.

Detailed Description

The domain class includes funtions for the access of NewSimulatorResource objects and the verification of the rdr classes.

Inside the method NewSimulatorDomain:Init the preparation for reading the simulation data file is done.


Member Function Documentation

void NewSimulatorDomain::AddResource NewSimulatorResource res  ) 
 

Add a resource to the domain.

Parameters:
res pointer to the resource

bool NewSimulatorDomain::CleanupResource NewSimulatorResource res  ) 
 

Cleanup one resource.

Parameters:
res Pointer on NewSimulorResource to be cleaned up
Returns:
true if it was found and was deleted

void NewSimulatorDomain::Dump NewSimulatorLog dump  )  const
 

Dump some information about the resources hold in the domain.

For each resource in the array the dump method is called.

Parameters:
dump Address of the NewSimulatorlog in which the dump should be written

NewSimulatorResource * NewSimulatorDomain::FindResource const NewSimulatorEntityPath ep  ) 
 

Find resource by entity path.

Parameters:
ep address of entity path to be found
Returns:
return pointer on resource if it could be found successfully

NewSimulatorResource * NewSimulatorDomain::FindResource NewSimulatorResource res  ) 
 

Find resource by resource pointer.

Parameters:
res pointer on the resource to be found
Returns:
return the same pointer if it could be found successfully

NewSimulatorResource * NewSimulatorDomain::GetResource int  i  ) 
 

Get Resource.

Parameters:
i with the number of the resource
Returns:
pointer on the resource which was found

bool NewSimulatorDomain::Init NewSimulatorFile file  ) 
 

Initialization and filling the domain with resources and rdr by calling NewSimulatorFile::Discover().

Todo:
Here the domain is set hard coded to '0'.
How should this be done for more than one domain ...?

Parameters:
file pointer to NewSimulatorfile which includes system information
Returns:
true

void NewSimulatorDomain::RemResource NewSimulatorResource res  ) 
 

Remove a resource from the domain.

Parameters:
res pointer to the resource

NewSimulatorAnnunciator * NewSimulatorDomain::VerifyAnnunciator NewSimulatorAnnunciator a  ) 
 

Verify Annunciator.

Parameters:
a pointer on a NewSimulatorAnnunciator to be verified
Returns:
a pointer for successfull verification

NewSimulatorControl * NewSimulatorDomain::VerifyControl NewSimulatorControl c  ) 
 

Verify Control.

Parameters:
c pointer on a NewSimulatorControl to be verified
Returns:
c pointer for successfull verification

NewSimulatorDimi * NewSimulatorDomain::VerifyDimi NewSimulatorDimi d  ) 
 

Verify Dimi.

Parameters:
d pointer on a NewSimulatorDimi object to be verified
Returns:
d pointer for successfull verification

NewSimulatorFumi * NewSimulatorDomain::VerifyFumi NewSimulatorFumi f  ) 
 

Verify Fumi.

Parameters:
f pointer on a NewSimulatorFumi object to be verified
Returns:
f pointer for successfull verification

NewSimulatorInventory * NewSimulatorDomain::VerifyInventory NewSimulatorInventory inv  ) 
 

Verify Inventory.

Parameters:
inv pointer on a NewSimulatorInventory object to be verified
Returns:
inv pointer for successfull verification

NewSimulatorRdr * NewSimulatorDomain::VerifyRdr NewSimulatorRdr rdr  ) 
 

Verify Rdr.

Parameters:
rdr pointer on a NewSimulatorRdr to be verified
Returns:
rdr pointer for successful verification

NewSimulatorResource * NewSimulatorDomain::VerifyResource NewSimulatorResource res  ) 
 

Verify Resource.

Parameters:
res pointer on a NewSimulatorResource to be verified
Returns:
res pointer for successful verification

NewSimulatorSensor * NewSimulatorDomain::VerifySensor NewSimulatorSensor s  ) 
 

Verify Sensor.

Parameters:
s pointer on a NewSimulatorSensor to be verified
Returns:
s pointer for successfull verification

NewSimulatorWatchdog * NewSimulatorDomain::VerifyWatchdog NewSimulatorWatchdog c  ) 
 

Verify Watchdog.

Parameters:
c pointer on a NewSimulatorInventory object to be verified
Returns:
c pointer for successfull verification


The documentation for this class was generated from the following files:
Generated on Mon Apr 26 14:39:16 2010 for New Simulator by  doxygen 1.4.4