NSCL DDAS 12.2-009
Support for XIA DDAS at FRIB
Public Member Functions | List of all members
CInventory Class Reference

#include <Inventory.h>

Inheritance diagram for CInventory:
Inheritance graph
[legend]
Collaboration diagram for CInventory:
Collaboration graph
[legend]

Public Member Functions

 CInventory (Tcl_Interp *pInterp, DAQ::DDAS::Configuration &config)
 
virtual ~CInventory ()
 
virtual int operator() (std::vector< Tcl_Obj * > &argv)
 
- Public Member Functions inherited from CTclCommand
 CTclCommand (Tcl_Interp *pInterp, const char *cmdName)
 
virtual ~CTclCommand ()
 
virtual int operator() (std::vector< Tcl_Obj * > &argv)=0
 

Additional Inherited Members

- Protected Member Functions inherited from CTclCommand
Tcl_Interp * getInterpreter ()
 
void requireExactly (std::vector< Tcl_Obj * > &objv, int nParams)
 
void requireAtMost (std::vector< Tcl_Obj * > &objv, int max)
 
void setResult (const char *result)
 
void setResult (Tcl_Obj *result)
 
void setResult (double value)
 
void setResult (int value)
 
int getInteger (Tcl_Obj *intObj)
 
double getDouble (Tcl_Obj *dblObj)
 

Detailed Description

This class provides the pixie16::inventory command it returns information about the moduels that are int the crate. The returned value is a Tcl list of lists. The list item index is the module number. The list subelements will be: {slot revision serial bits Mhz}.

Constructor & Destructor Documentation

◆ CInventory()

CInventory::CInventory ( Tcl_Interp *  pInterp,
DAQ::DDAS::Configuration config 
)

constructor

Parameters
pInterpInterpreter we register the pixie16::inventory command.
configReferences the configuration from which we get slots.

◆ ~CInventory()

CInventory::~CInventory ( )
virtual

destructor, currently empty.

Member Function Documentation

◆ operator()()

int CInventory::operator() ( std::vector< Tcl_Obj * > &  argv)
virtual

operator() Process the command:

  • Require no parameters.
  • Create a list object with which to provide the result.
  • Loop over all modules in the configuration calling Pixie16ReadModuleInfo to get information.
  • Build the list of outputs.
Parameters
argv- the command line parameters
Returns
int - TCL_OK On success with the result set to the inventory
Return values
TCL_ERRORon failure with an english error message.

Implements CTclCommand.


The documentation for this class was generated from the following files: