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

NewSimulator Class Reference

Interface to the openhpi abi. More...

#include <new_sim.h>

Inheritance diagram for NewSimulator:

Inheritance graph
[legend]
Collaboration diagram for NewSimulator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool CheckMagic ()
 Check the Magic number.
bool CheckHandler (oh_handler_state *handler)
 Check the oh_handler.
virtual void IfEnter ()
 Interface function Enter - only a lock is set.
virtual void IfLeave ()
 Interface function Leave - only a lock is unset.
virtual bool IfOpen (GHashTable *handler_config)
 Interface Open.
virtual void IfClose ()
 Interface Close - deletion of file object.
virtual SaErrorT IfGetEvent (oh_event *event)
 Interface GetEvent m_event_lock is set and unset.
virtual SaErrorT IfDiscoverResources ()
 Interface Discover - check whether all resources are discovered.
virtual SaErrorT IfSetResourceTag (NewSimulatorResource *ent, SaHpiTextBufferT *tag)
 HPI function saHpiResourceTagSet().
virtual SaErrorT IfSetResourceSeverity (NewSimulatorResource *res, SaHpiSeverityT sev)
 HPI function saHpiResourceSeveritySet().
virtual SaErrorT IfSetAutoInsertTimeout (SaHpiTimeoutT timeout)
 HPI function saHpiAutoInsertTimeoutSet().
virtual SaErrorT IfGetPowerState (NewSimulatorResource *res, SaHpiPowerStateT &state)
 HPI function saHpiResourcePowerStateGet().
virtual SaErrorT IfSetPowerState (NewSimulatorResource *res, SaHpiPowerStateT state)
 HPI function saHpiResourcePowerStateSet().
virtual SaErrorT IfGetIndicatorState (NewSimulatorResource *res, SaHpiHsIndicatorStateT &state)
 HPI function saHpiHotSwapIndicatorStateGet().
virtual SaErrorT IfSetIndicatorState (NewSimulatorResource *res, SaHpiHsIndicatorStateT state)
 HPI function saHpiHotSwapIndicatorStateSet().
virtual SaErrorT IfGetResetState (NewSimulatorResource *res, SaHpiResetActionT &state)
 HPI function saHpiResourceResetStateGet().
virtual SaErrorT IfSetResetState (NewSimulatorResource *res, SaHpiResetActionT state)
 HPI function saHpiResourceResetStateSet().
virtual SaErrorT IfControlParm (NewSimulatorResource *res, SaHpiParmActionT act)
 HPI function saHpiParmControl().
virtual void AddHpiEvent (oh_event *event)
 Add an HPI event in the queue.
virtual oh_evt_queue * GetHpiEventList ()
 Return the HPI event list.
 NewSimulator ()
 Constructor.
 ~NewSimulator ()
 Destructor.
void SetHandler (oh_handler_state *handler)
 Set handler pointer.
oh_handler_state * GetHandler ()
 Return pointer on the plugin handler.
virtual const NewSimulatorEntityPathEntityRoot ()
 Return the root entity path.
virtual SaHpiRptEntryT * FindResource (SaHpiResourceIdT id)
 Return the rpt entry of a resource.

Public Attributes

cThreadLock m_event_lock
 lock for the hpi event queue

Detailed Description

Interface to the openhpi abi.


Member Function Documentation

void NewSimulator::AddHpiEvent oh_event *  event  )  [virtual]
 

Add an HPI event in the queue.

Parameters:
event pointer on event to be added

Implements NewSimulatorDomain.

bool NewSimulator::CheckHandler oh_handler_state *  handler  )  [inline]
 

Check the oh_handler.

Parameters:
handler pointer to be verified
Returns:
true if it is the same

bool NewSimulator::CheckMagic  )  [inline]
 

Check the Magic number.

Returns:
true if it is the same defined by dNewSimulatorMagic

const NewSimulatorEntityPath & NewSimulator::EntityRoot  )  [virtual]
 

Return the root entity path.

Returns:
address of root entity path

Implements NewSimulatorDomain.

SaHpiRptEntryT * NewSimulator::FindResource SaHpiResourceIdT  rid  )  [virtual]
 

Return the rpt entry of a resource.

Parameters:
rid resource id to be found
Returns:
pointer on plugin handler

Implements NewSimulatorDomain.

oh_handler_state * NewSimulator::GetHandler  )  [virtual]
 

Return pointer on the plugin handler.

Returns:
pointer on plugin handler

Implements NewSimulatorDomain.

virtual oh_evt_queue* NewSimulator::GetHpiEventList  )  [inline, virtual]
 

Return the HPI event list.

Returns:
pointer on the HPI event queue

Implements NewSimulatorDomain.

SaErrorT NewSimulator::IfControlParm NewSimulatorResource res,
SaHpiParmActionT  act
[virtual]
 

HPI function saHpiParmControl().

See also the description of the function inside the specification or header file. Conrol the parameter of a resource.

Todo:
it fits better to implement it in class NewSimulatorResource - at the moment it is only a method stub
Parameters:
res pointer on NewSimulatorResource to be used
act parm action to be done
Returns:
HPI error code
Todo:
implementation

SaErrorT NewSimulator::IfDiscoverResources  )  [virtual]
 

Interface Discover - check whether all resources are discovered.

m_initial_discover_lock is set and unset.

Returns:
SA_OK

int NewSimulator::IfGetEvent oh_event *  event  )  [virtual]
 

Interface GetEvent m_event_lock is set and unset.

It is also used to reduce the keep alive interval time

Parameters:
event pointer on oh_event
Returns:
0

SaErrorT NewSimulator::IfGetIndicatorState NewSimulatorResource res,
SaHpiHsIndicatorStateT &  state
[virtual]
 

HPI function saHpiHotSwapIndicatorStateGet().

See also the description of the function inside the specification or header file. Get the indicator state of a resource.

Todo:
it fits better to implement it in class NewSimulatorResource
Parameters:
res pointer on NewSimulatorResource to be used
state address of indicator state to be filled
Returns:
HPI error code

SaErrorT NewSimulator::IfGetPowerState NewSimulatorResource res,
SaHpiPowerStateT &  state
[virtual]
 

HPI function saHpiResourcePowerStateGet().

See also the description of the function inside the specification or header file. Get the power state of a resource.

Todo:
it fits better to implement it in class NewSimulatorResource
Parameters:
res pointer on NewSimulatorResource to be used
state address of power state to be filled
Returns:
HPI error code

SaErrorT NewSimulator::IfGetResetState NewSimulatorResource res,
SaHpiResetActionT &  state
[virtual]
 

HPI function saHpiResourceResetStateGet().

See also the description of the function inside the specification or header file. Get the reset state of a resource.

Todo:
it fits better to implement it in class NewSimulatorResource
Parameters:
res pointer on NewSimulatorResource to be used
state address of reset state to be filled
Returns:
HPI error code

bool NewSimulator::IfOpen GHashTable *  handler_config  )  [virtual]
 

Interface Open.

The parameters entity root and filename are read from the hash table and it is tried to open the file by generating a new NewSimulatorFile object and calling NewSimulatorFile::Open().
The Initializiation itself is done inside NewSimulatorDomain::Init() which is called inside this method.

Parameters:
handler_config pointer on the configuration hash table
Returns:
error code of initialization

SaErrorT NewSimulator::IfSetAutoInsertTimeout SaHpiTimeoutT  timeout  )  [virtual]
 

HPI function saHpiAutoInsertTimeoutSet().

See also the description of the function inside the specification or header file. Set the insertion timeout value

Todo:
it fits better to implement it in class NewSimulatorDomain
Parameters:
timeout timeout value to be set
Returns:
HPI error code

SaErrorT NewSimulator::IfSetIndicatorState NewSimulatorResource res,
SaHpiHsIndicatorStateT  state
[virtual]
 

HPI function saHpiHotSwapIndicatorStateSet().

See also the description of the function inside the specification or header file. Get the indicator state of a resource.

Todo:
it fits better to implement it in class NewSimulatorResource
Parameters:
res pointer on NewSimulatorResource to be used
state indicator state to be set
Returns:
HPI error code

SaErrorT NewSimulator::IfSetPowerState NewSimulatorResource res,
SaHpiPowerStateT  state
[virtual]
 

HPI function saHpiResourcePowerStateSet().

See also the description of the function inside the specification or header file. Set the power state of a resource.

Todo:
it fits better to implement it in class NewSimulatorResource
Parameters:
res pointer on NewSimulatorResource to be used
state power state to be set
Returns:
HPI error code
Todo:
Generate some proper events for the power state transition
Todo:
: Depentend on the state of the resource send the transition event

SaErrorT NewSimulator::IfSetResetState NewSimulatorResource res,
SaHpiResetActionT  state
[virtual]
 

HPI function saHpiResourceResetStateSet().

See also the description of the function inside the specification or header file. Get the reset state of a resource.

Todo:
it fits better to implement it in class NewSimulatorResource
Parameters:
res pointer on NewSimulatorResource to be used
state Reset action
Returns:
HPI error code
Todo:
Send proper transition events as if a reset was done

SaErrorT NewSimulator::IfSetResourceSeverity NewSimulatorResource ent,
SaHpiSeverityT  sev
[virtual]
 

HPI function saHpiResourceSeveritySet().

See also the description of the function inside the specification or header file. The resource severity is set.

Todo:
it fits better to implement it in class NewSimulatorResource
Parameters:
ent pointer on NewSimulatorResource object for which severity should be set
sev severity to be set
Returns:
HPI error code

SaErrorT NewSimulator::IfSetResourceTag NewSimulatorResource ent,
SaHpiTextBufferT *  tag
[virtual]
 

HPI function saHpiResourceTagSet().

See also the description of the function inside the specification or header file. The resource tag is set.

Todo:
it fits better to implement it in class NewSimulatorResource
Parameters:
ent pointer on NewSimulatorResource object for which the resource tag should be set
tag pointer on SaHpiTextBufferT with tag information to be set
Returns:
HPI error code

void NewSimulator::SetHandler oh_handler_state *  handler  ) 
 

Set handler pointer.

Parameters:
handler pointer on plugin handler


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