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

NewSimulatorInventory Class Reference

Class for simulating Inventory. More...

#include <new_sim_inventory.h>

Inheritance diagram for NewSimulatorInventory:

Inheritance graph
[legend]
Collaboration diagram for NewSimulatorInventory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NewSimulatorInventory (NewSimulatorResource *res)
 Constructor.
 NewSimulatorInventory (NewSimulatorResource *res, SaHpiRdrT rdr)
 Full qualified constructor to fill an object with the parsed data.
 NewSimulatorInventory (NewSimulatorResource *res, SaHpiRdrT rdr, SaHpiIdrInfoT inv_info)
 Full qualified constructor to fill an object with the parsed data including idr_info.
virtual ~NewSimulatorInventory ()
 Destructor.
virtual unsigned int Num () const
 Return Inventory Id.
SaHpiEntryIdT ValidAreaId ()
 Return a new entryId.
bool IsReadOnly ()
 Return the ReadOnly flag.
void IncUpdateCount ()
 Increment Update Counter.
NewSimulatorInventoryAreaFindInventoryArea (NewSimulatorInventoryArea *area)
 Find area by area pointer.
bool AddInventoryArea (NewSimulatorInventoryArea *area)
 Add a inventory area to the array if it isn't already included in the array.
bool SetData (SaHpiInventoryRecT idrRec)
 Set inventory record data.
bool SetInfo (SaHpiIdrInfoT idrInfo)
 Set inventory information data The fields UpdateCount and NumAreas are filled with internal values and are not overwritten.
virtual bool CreateRdr (SaHpiRptEntryT &resource, SaHpiRdrT &rdr)
 A rdr structure is filled with the data.
SaErrorT GetIdrInfo (SaHpiIdrInfoT &idrInfo)
 HPI function saHpiIdrInfoGet().
SaErrorT GetAreaHeader (SaHpiIdrAreaTypeT type, SaHpiEntryIdT areaId, SaHpiEntryIdT &nextId, SaHpiIdrAreaHeaderT &header)
 HPI function saHpiIdrAreaHeaderGet().
SaErrorT AddArea (SaHpiIdrAreaTypeT type, SaHpiEntryIdT &newId)
 HPI function saHpiIdrAreaAdd().
SaErrorT AddAreaById (SaHpiIdrAreaTypeT type, SaHpiEntryIdT id)
 HPI function saHpiIdrAreaAddById().
SaErrorT DeleteArea (SaHpiEntryIdT id)
 HPI function saHpiIdrAreaDel().
SaErrorT GetField (SaHpiEntryIdT areaId, SaHpiIdrFieldTypeT fieldType, SaHpiEntryIdT fieldId, SaHpiEntryIdT &nextId, SaHpiIdrFieldT &field)
 Start for HPI function saHpiIdrFieldGet().
SaErrorT AddField (SaHpiIdrFieldT &field)
 Start for HPI function saHpiIdrFieldAdd().
SaErrorT AddFieldById (SaHpiIdrFieldT &field)
 Start for HPI function saHpiIdrFieldAddById().
SaErrorT SetField (SaHpiIdrFieldT field)
 Start for HPI function saHpiIdrFieldSet().
SaErrorT DeleteField (SaHpiEntryIdT areaId, SaHpiEntryIdT fieldId)
 Start for HPI function saHpiIdrFieldDelete().
virtual void Dump (NewSimulatorLog &dump) const
 Dump the Inventory information.

Detailed Description

Class for simulating Inventory.


Member Function Documentation

SaErrorT NewSimulatorInventory::AddArea SaHpiIdrAreaTypeT  type,
SaHpiEntryIdT &  newId
 

HPI function saHpiIdrAreaAdd().

See also the description of the function inside the specification or header file.

Parameters:
type type of area to add
newId address to copy the Id of the new area header
Returns:
HPI return code

SaErrorT NewSimulatorInventory::AddAreaById SaHpiIdrAreaTypeT  type,
SaHpiEntryIdT  id
 

HPI function saHpiIdrAreaAddById().

See also the description of the function inside the specification or header file.

Parameters:
type Type of Area to add
id AreaId for the new Area to be created
Returns:
HPI return code

SaErrorT NewSimulatorInventory::AddField SaHpiIdrFieldT &  field  ) 
 

Start for HPI function saHpiIdrFieldAdd().

See also the description of the function inside the specification or header file. Inside the method the correct AreaId is identified and afterwards NewSimulatorInventoryArea::AddField() is called

Parameters:
field address to the field to add to the IDA
Returns:
HPI return code

SaErrorT NewSimulatorInventory::AddFieldById SaHpiIdrFieldT &  field  ) 
 

Start for HPI function saHpiIdrFieldAddById().

See also the description of the function inside the specification or header file. Inside the method the correct AreaId is identified and afterwards NewSimulatorInventoryArea::AddFieldById() is called

Parameters:
field address of field to add to the IDA
Returns:
HPI return code

bool NewSimulatorInventory::AddInventoryArea NewSimulatorInventoryArea area  ) 
 

Add a inventory area to the array if it isn't already included in the array.

Parameters:
area pointer to area to be added
Returns:
bool if successful

bool NewSimulatorInventory::CreateRdr SaHpiRptEntryT &  resource,
SaHpiRdrT &  rdr
[virtual]
 

A rdr structure is filled with the data.

This method is called by method NewSimulatorRdr::Populate().

Parameters:
resource Address of resource structure
rdr Address of rdr structure
Returns:
true

Reimplemented from NewSimulatorRdr.

SaErrorT NewSimulatorInventory::DeleteArea SaHpiEntryIdT  id  ) 
 

HPI function saHpiIdrAreaDel().

See also the description of the function inside the specification or header file.

Parameters:
id Identifier of Area entry to delete from the IDR
Returns:
HPI return code

SaErrorT NewSimulatorInventory::DeleteField SaHpiEntryIdT  areaId,
SaHpiEntryIdT  fieldId
 

Start for HPI function saHpiIdrFieldDelete().

See also the description of the function inside the specification or header file. Inside the method the correct AreaId is identified and afterwards NewSimulatorInventoryArea::DeleteField() is called

Parameters:
areaId identifier for the IDA
fieldId Identifier of Field to delete from the IDA
Returns:
HPI return code

void NewSimulatorInventory::Dump NewSimulatorLog dump  )  const [virtual]
 

Dump the Inventory information.

Parameters:
dump Address of the log

Implements NewSimulatorRdr.

NewSimulatorInventoryArea * NewSimulatorInventory::FindInventoryArea NewSimulatorInventoryArea area  ) 
 

Find area by area pointer.

Parameters:
area pointer on the inventory area to be found
Returns:
return the same pointer if it could be found successfully

SaErrorT NewSimulatorInventory::GetAreaHeader SaHpiIdrAreaTypeT  type,
SaHpiEntryIdT  areaId,
SaHpiEntryIdT &  nextId,
SaHpiIdrAreaHeaderT &  header
 

HPI function saHpiIdrAreaHeaderGet().

See also the description of the function inside the specification or header file. Copying the internal reading values (if a read is allowed).

Parameters:
type type of area to be found
areaId Id of area to be found
nextId address to copy the Id of the next area header
header address to be filled with the area header record
Returns:
HPI return code

SaErrorT NewSimulatorInventory::GetField SaHpiEntryIdT  areaId,
SaHpiIdrFieldTypeT  fieldType,
SaHpiEntryIdT  fieldId,
SaHpiEntryIdT &  nextId,
SaHpiIdrFieldT &  field
 

Start for HPI function saHpiIdrFieldGet().

See also the description of the function inside the specification or header file. Inside the method the correct AreaId is identified and afterwards NewSimulatorInventoryArea::GetField() is called.

Parameters:
areaId Identifier for the IDA
fieldType Type of Inventory Data Field
fieldId Identifier of Field to retrieve
nextId address to store the FieldId of next field
field address into which the field information is placed
Returns:
HPI return code

SaErrorT NewSimulatorInventory::GetIdrInfo SaHpiIdrInfoT &  idrInfo  ) 
 

HPI function saHpiIdrInfoGet().

See also the description of the function inside the specification or header file. Copying the internal reading values (if a read is allowed).

Parameters:
idrInfo address of the IdrInfo record to be filled
Returns:
HPI return code

bool NewSimulatorInventory::SetData SaHpiInventoryRecT  idrRec  ) 
 

Set inventory record data.

Parameters:
idrRec InventoryRecord data
Returns:
true (simple copy)

SaErrorT NewSimulatorInventory::SetField SaHpiIdrFieldT  field  ) 
 

Start for HPI function saHpiIdrFieldSet().

See also the description of the function inside the specification or header file. Inside the method the correct AreaId is identified and afterwards NewSimulatorInventoryArea::SetField() is called

Parameters:
field field to set in the IDA
Returns:
HPI return code

bool NewSimulatorInventory::SetInfo SaHpiIdrInfoT  idrInfo  ) 
 

Set inventory information data The fields UpdateCount and NumAreas are filled with internal values and are not overwritten.

Parameters:
idrInfo record with IdrInfo data
Returns:
true


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