NSCL DDAS 12.2-009
Support for XIA DDAS at FRIB
CPixieSystemUtilities.h
Go to the documentation of this file.
1
7#ifndef CPIXIESYSTEMUTILITIES_H
8#define CPIXIESYSTEMUTILITIES_H
9
10#include <vector>
11
12#include <Configuration.h>
13
30private:
32 std::string m_lastErrorMessage;
33 int m_bootMode;
34 bool m_booted;
35 bool m_ovrSetFile;
36
37public:
40
49 int Boot();
57 int SaveSetFile(char *fileName);
65 int LoadSetFile(char *fileName);
72 int ExitSystem();
73
78 void SetBootMode(int mode) { m_bootMode = mode; };
84 void SetLastErrorMessage(const char *msg) { m_lastErrorMessage = msg; };
85
93 int GetBootMode() { return m_bootMode; };
100 bool GetBootStatus() { return m_booted; };
105 int GetNumModules() { return m_config.getNumberOfModules(); };
113 int GetModuleMSPS(int module);
121 int GetModuleChannelCount(int module);
126 const char *GetLastErrorMessage() { return m_lastErrorMessage.c_str(); };
127};
128
131extern "C" {
138 char *fName);
141 char *fName);
156 int mod);
158const char *
162}
163
164#endif
int CPixieSystemUtilities_GetModuleChannelCount(CPixieSystemUtilities *utils, int mod)
Wrapper to get the channel count for a single module.
Definition: CPixieSystemUtilities.cpp:320
int CPixieSystemUtilities_GetBootMode(CPixieSystemUtilities *utils)
Wrapper to get the boot mode.
Definition: CPixieSystemUtilities.cpp:297
void CPixieSystemUtilities_delete(CPixieSystemUtilities *utils)
Wrapper for the class destructor.
Definition: CPixieSystemUtilities.cpp:332
const char * CPixieSystemUtilities_GetLastErrorMessage(CPixieSystemUtilities *utils)
Wrapper to get the last error message. Cannot throw; unguarded.
Definition: CPixieSystemUtilities.cpp:328
bool CPixieSystemUtilities_GetBootStatus(CPixieSystemUtilities *utils)
Wrapper to get the boot status.
Definition: CPixieSystemUtilities.cpp:303
int CPixieSystemUtilities_SaveSetFile(CPixieSystemUtilities *utils, char *fName)
Wrapper to save a settings file.
Definition: CPixieSystemUtilities.cpp:272
int CPixieSystemUtilities_GetNumModules(CPixieSystemUtilities *utils)
Wrapper to get the number of modules.
Definition: CPixieSystemUtilities.cpp:308
int CPixieSystemUtilities_ExitSystem(CPixieSystemUtilities *utils)
Wrapper to exit the system file.
Definition: CPixieSystemUtilities.cpp:286
int CPixieSystemUtilities_LoadSetFile(CPixieSystemUtilities *utils, char *fName)
Wrapper to load a settings file.
Definition: CPixieSystemUtilities.cpp:279
CPixieSystemUtilities * CPixieSystemUtilities_new()
Wrapper for the class constructor.
Definition: CPixieSystemUtilities.cpp:262
int CPixieSystemUtilities_GetModuleMSPS(CPixieSystemUtilities *utils, int mod)
Wrapper to get a single module ADC MSPS from the HW map.
Definition: CPixieSystemUtilities.cpp:314
int CPixieSystemUtilities_Boot(CPixieSystemUtilities *utils)
Wrapper to boot the crate.
Definition: CPixieSystemUtilities.cpp:267
void CPixieSystemUtilities_SetBootMode(CPixieSystemUtilities *utils, int mode)
Wrapper to set the boot mode.
Definition: CPixieSystemUtilities.cpp:292
Defines a class for storing system configuration information.
System manager class for DDAS.
Definition: CPixieSystemUtilities.h:29
const char * GetLastErrorMessage()
Get the reason text from the most recent failed operation.
Definition: CPixieSystemUtilities.h:126
int GetNumModules()
Get the number of installed modules.
Definition: CPixieSystemUtilities.h:105
int GetModuleChannelCount(int module)
Get the number of channels on the module.
Definition: CPixieSystemUtilities.cpp:239
bool GetBootStatus()
Get the crate boot status.
Definition: CPixieSystemUtilities.h:100
int GetBootMode()
Get the boot mode.
Definition: CPixieSystemUtilities.h:93
int GetModuleMSPS(int module)
Get the module ADC sampling rate in MSPS.
Definition: CPixieSystemUtilities.cpp:207
int LoadSetFile(char *fileName)
Load a new settings file.
Definition: CPixieSystemUtilities.cpp:135
int ExitSystem()
Exit the system and release resources from the modules.
Definition: CPixieSystemUtilities.cpp:172
CPixieSystemUtilities()
Constructor.
Definition: CPixieSystemUtilities.cpp:29
int SaveSetFile(char *fileName)
Save the currently loaded DSP settings to a settings file.
Definition: CPixieSystemUtilities.cpp:109
void SetLastErrorMessage(const char *msg)
Set the last error message. Used by the extern "C" shims when their catch-all fires.
Definition: CPixieSystemUtilities.h:84
void SetBootMode(int mode)
Set the boot mode.
Definition: CPixieSystemUtilities.h:78
int Boot()
Boot the entire system.
Definition: CPixieSystemUtilities.cpp:37
Store the system configuration information needed by Readout.
Definition: Configuration.h:88
size_t getNumberOfModules() const
Return the number of modules in the crate.
Definition: Configuration.h:131