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

NewSimulatorResource Class Reference

Class for simulating resources. More...

#include <new_sim_resource.h>

Inheritance diagram for NewSimulatorResource:

Inheritance graph
[legend]
Collaboration diagram for NewSimulatorResource:

Collaboration graph
[legend]
List of all members.

Public Member Functions

NewSimulatorRdrFindRdr (SaHpiRdrTypeT type, unsigned int num)
 Find a rdr entry with the correct type and number.
bool AddRdr (NewSimulatorRdr *rdr)
 Add a rdr entry.
bool RemRdr (NewSimulatorRdr *rdr)
 Remove a rdr entry.
int FindRdr (NewSimulatorRdr *rdr)
 Find a rdr object.
int NumRdr ()
 Return the number of rdr entries.
NewSimulatorRdrGetRdr (int idx)
 Get a rdr object by index.
int CreateSensorNum (SaHpiSensorNumT num)
unsigned int GetControlNum ()
 get a unique control num for this resource
NewSimulatorDomainDomain () const
 Return the domain to which the resource is mapped.
unsigned int & Oem ()
 set/get oem value
NewSimulatorEntityPathEntityPath ()
 set/get EntityPath
bool & IsFru ()
 set/get FRU flag
NewSimulatorTextBufferResourceTag ()
 set/get resource tag
SaHpiHsStateT HotSwapState ()
 get hotswap state
SaHpiPowerStateT & PowerState ()
 set/get power state
SaHpiHsIndicatorStateT & HSIndicator ()
 set/get hotswap indicator state
SaHpiResetActionT & ResetState ()
 set/get reset state
SaHpiEntryIdT & EntryId ()
 set/get entry id
SaHpiCapabilitiesT & ResourceCapabilities ()
 set/get resource capabilities
SaHpiHsCapabilitiesT & HotSwapCapabilities ()
 set/get hotswap capabilities
SaHpiResourceIdT ResourceId ()
 set/get resource id
SaHpiSeverityT & ResourceSeverity ()
 set/get resource severity
SaHpiBoolT & ResourceFailed ()
 set/get resource failed flag
 NewSimulatorResource (NewSimulatorDomain *domain)
 Constructor.
virtual ~NewSimulatorResource ()
 Destructor.
virtual bool Destroy ()
 Destroy the resource and clean up.
void Dump (NewSimulatorLog &dump) const
 Dump the information of the resource.
SaErrorT SetAutoExtractTimeout (SaHpiTimeoutT timeout)
 HPI Function implement in NewSimulatorHotSwap::SetExtractTimeout().
SaErrorT GetAutoExtractTimeout (SaHpiTimeoutT &timeout)
 HPI Function implement in NewSimulatorHotSwap::GetExtractTimeout().
SaErrorT RequestHotswapAction (SaHpiHsActionT action)
 HPI Function implement in NewSimulatorHotSwap::ActionRequest().
SaErrorT GetHotswapState (SaHpiHsStateT &state)
 HPI Function implement in NewSimulatorHotSwap::GetState().
SaErrorT SetStateActive ()
 HPI Function implement in NewSimulatorHotSwap::SetActive().
SaErrorT SetStateInactive ()
 HPI Function implement in NewSimulatorHotSwap::SetInactive().
SaErrorT HotswapPolicyCancel ()
 HPI Function implement in NewSimulatorHotSwap::CancelPolicy().
void SetResourceInfo (SaHpiResourceInfoT resinfo)
 Set the resource information.
virtual bool Create (SaHpiRptEntryT &entry)
 Initialize a new resource.
virtual bool Populate ()
 Popolate the resource.

Protected Attributes

NewSimulatorDomainm_domain
 pointer on the domain
NewSimulatorHotSwap m_hotswap
 hotswap state of the FRU
NewSimulatorEntityPath m_entity_path
 entity path of the resource
bool m_is_fru
 is the resource a FRU or not
unsigned int m_oem
 oem value
int m_sensor_num [256]
 mapping of sensor numbers - obsolet?
SaHpiRptEntryT m_rpt_entry
 rpt entry values
NewSimulatorTextBuffer m_resource_tag
 resource tag
unsigned int m_current_control_id
 highest control id
SaHpiPowerStateT m_power_state
 power state
SaHpiHsIndicatorStateT m_hotswap_indicator
 indicator state
SaHpiResetActionT m_reset_state
 reset action

Detailed Description

Class for simulating resources.


Member Function Documentation

bool NewSimulatorResource::AddRdr NewSimulatorRdr rdr  ) 
 

Add a rdr entry.

Parameters:
rdr pointer on the rdr to be added
Returns:
success

bool NewSimulatorResource::Create SaHpiRptEntryT &  entry  )  [virtual]
 

Initialize a new resource.

Parameters:
entry address of RptEntry structure
Returns:
success

int NewSimulatorResource::CreateSensorNum SaHpiSensorNumT  num  ) 
 

Deprecated:
Create a Sensor number
Parameters:
num sensor number
Returns:
sensor number to be used in HPI

bool NewSimulatorResource::Destroy  )  [virtual]
 

Destroy the resource and clean up.

Returns:
success

NewSimulatorDomain * NewSimulatorResource::Domain  )  const
 

Return the domain to which the resource is mapped.

Returns:
pointer on domain

void NewSimulatorResource::Dump NewSimulatorLog dump  )  const
 

Dump the information of the resource.

Parameters:
dump address of logfile

NewSimulatorRdr * NewSimulatorResource::FindRdr SaHpiRdrTypeT  type,
unsigned int  num
 

Find a rdr entry with the correct type and number.

Parameters:
type type of rdr entry
num number of rdr entry
Returns:
pointer on the rdr object

bool NewSimulatorResource::Populate  )  [virtual]
 

Popolate the resource.

Returns:
success

bool NewSimulatorResource::RemRdr NewSimulatorRdr rdr  ) 
 

Remove a rdr entry.

Parameters:
rdr pointer on the rdr to be deleted
Returns:
success

void NewSimulatorResource::SetResourceInfo SaHpiResourceInfoT  resinfo  ) 
 

Set the resource information.

Parameters:
resinfo resource information to be set in the resource


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