1 #ifndef CARMA_MONITOR_MONITORSYSTEM_H
2 #define CARMA_MONITOR_MONITORSYSTEM_H
36 class C3gMax8PipelineSubsystem;
37 class C3gMax23PipelineSubsystem;
38 class CarmaSlcBandSubsystem;
39 class Carma3GBandSubsystem;
40 class CentralIfSubsystem;
41 class ControlSubsystem;
42 class DataflowSubsystem;
43 class DelayEngineSubsystem;
47 class LineLengthSubsystem;
48 class LoberotatorSubsystem;
50 class MasterClockSubsystem;
51 class OpacityMonitorSubsystem;
53 class PhaseMonitorSubsystem;
54 class ProjectDatabaseManagerSubsystem;
55 class SignalPathSubsystem;
57 class SlPipelineSubsystem;
58 class SystemStatusSubsystem;
63 class WbcBandSubsystem;
64 class WbPipelineSubsystem;
65 class WeatherSubsystem;
66 class WbDataflowSubsystem;
67 class SlDataflowSubsystem;
68 class C3gDataflowSubsystem;
69 class WbRemapperSubsystem;
70 class SlRemapperSubsystem;
71 class C3gRemapperSubsystem;
73 class SystemFrameBuffer;
91 MonitorSystem(
const std::string& systemName,
long nSubsystems,
92 long nMonitorPoints,
long nSamples,
93 int queueDepth=SubsystemFrameBuffer::kDefaultQueueDepth);
117 AstroSubsystem&
astro( )
const {
return astro_; }
123 BimaSubsystem&
bima(
int index)
const {
return *(bimas_.at( index )); }
138 CentralIfSubsystem&
centralIf()
const {
return centralIf_; }
148 DataflowSubsystem&
dataflow()
const {
return dataflow_; }
153 DelayEngineSubsystem&
delay()
const {
return delayEngine_; }
158 FaultSubsystem &
fault( )
const;
163 ImrSubsystem&
imr()
const {
return imr_; };
168 AlarmSubsystem&
alarm()
const {
return alarm_; }
173 LineLengthSubsystem&
lineLength()
const {
return lineLength_; }
178 LoberotatorSubsystem&
loberotator()
const {
return loberotator_; }
183 LoRefSubsystem&
loRef()
const {
return loRef_; }
188 MasterClockSubsystem&
masterclock()
const {
return masterclock_; }
199 OvroSubsystem&
ovro(
int index)
const {
return *(ovros_.at( index )); }
210 const {
return projectDatabaseManager_; }
215 SignalPathSubsystem &
signalPath()
const {
return signalPath_; };
222 return *(carmaSlcBands_.at( index ));
235 return *(carma3gBands_.at( index ));
246 SldcSubsystem&
sldc()
const {
return sldc_; }
262 SzaSubsystem&
sza(
int index)
const {
return *(szas_.at( index )); }
268 WbcBandSubsystem &
wbcBand(
const int index )
const {
269 return *(wbcBands_.at(index));
280 WbdcSubsystem&
wbdc()
const {
return wbdc_; }
290 WeatherSubsystem&
weather()
const {
return weather_; }
295 TestSubsystem&
test()
const {
return test_; }
300 VlbiSubsystem&
vlbi()
const {
return vlbi_; }
308 return *( wbDataflow_.at(index) );
317 return *( wbRemapper_.at(index) );
326 return *( slDataflow_.at(index) );
335 return *( c3gDataflow_.at(index) );
344 return *( slRemapper_.at(index) );
353 return *( c3gRemapper_.at(index) );
407 virtual unsigned int read();
411 virtual void write();
440 void setRawReadTime(
double mjdTimestamp );
441 void setRawReadTime( );
461 void setFinalWriteTime(
double mjdTimestamp );
462 void setFinalWriteTime( );
681 SystemFrameBuffer& systemFrameBuffer_;
684 AstroSubsystem& astro_;
685 std::vector<BimaSubsystem*> bimas_;
688 CentralIfSubsystem& centralIf_;
690 DataflowSubsystem& dataflow_;
691 DelayEngineSubsystem& delayEngine_;
693 AlarmSubsystem& alarm_;
694 LineLengthSubsystem& lineLength_;
695 LoberotatorSubsystem& loberotator_;
696 LoRefSubsystem& loRef_;
697 MasterClockSubsystem& masterclock_;
698 OpacityMonitorSubsystem& opacityMonitor_;
699 std::vector<OvroSubsystem*> ovros_;
700 PhaseMonitorSubsystem& phaseMonitor_;
701 ProjectDatabaseManagerSubsystem& projectDatabaseManager_;
702 ::std::vector< CarmaSlcBandSubsystem * > carmaSlcBands_;
703 ::std::vector< Carma3GBandSubsystem * > carma3gBands_;
704 SignalPathSubsystem & signalPath_;
705 SldcSubsystem& sldc_;
707 SystemStatusSubsystem& systemStatus_;
708 ::std::vector< SzaSubsystem * > szas_;
709 TestSubsystem& test_;
710 VlbiSubsystem& vlbi_;
711 ::std::vector< WbcBandSubsystem * > wbcBands_;
712 WbdcSubsystem& wbdc_;
714 WeatherSubsystem& weather_;
715 FaultSubsystem & fault_;
716 ::std::vector< WbDataflowSubsystem * > wbDataflow_;
717 ::std::vector< SlDataflowSubsystem * > slDataflow_;
718 ::std::vector< C3gDataflowSubsystem * > c3gDataflow_;
719 ::std::vector< WbRemapperSubsystem * > wbRemapper_;
720 ::std::vector< SlRemapperSubsystem * > slRemapper_;
721 ::std::vector< C3gRemapperSubsystem * > c3gRemapper_;
728 class RawCarmaMonitorSystem;
827 inline carma::monitor::FaultSubsystem &
long getMaxNumMonitorSamples() const
Capacity related method - returns total allocated monitor sample capacity across all subsystems...
WbPipelineSubsystem & wbPipeline() const
Get reference to the wideband line pipeline subsystem.
short MonitorValueType
Enumeration of possible types for monitor point values.
SzaSubsystem & sza(int index) const
Get reference to sza antenna subsystem.
MonitorSubsystem & getChildSubsystem(int index) const
Get underlying subsystem by index.
LineLengthSubsystem & lineLength() const
Get reference to the lineLength subsystem.
OpacityMonitorSubsystem & opacityMonitor() const
Get reference to the opacityMonitor subsystem.
void resetTimes()
Resets collator write time - call clearAllTimes to conform to name of similar routine in ::carma:moni...
SystemFrameBuffer & systemFrameBuffer() const
Get reference to the underlying storage.
long getCountedNumMonitorPoints() const
Capacity usage related method - returns number of monitor points present across all subsystems - numb...
C3gMax23PipelineSubsystem & c3gMax23Pipeline() const
Get reference to carma 23 station 3g correlator pipeline.
void resetQueue()
Moves read pointer beyond top of queue so a read will block until the next write. ...
virtual bool readNewestConditionalCopy()
If new data is available it is copied from the queue into the monitor system.
AstroSubsystem & astro() const
Get reference to an Astro container.
CentralIfSubsystem & centralIf() const
Get reference to the centalIF subsystem.
long getActualNumMonitorSamples() const
Capacity related method - returns actual # of monitor samples across all subsystems.
size_t getCountedMonitorSystemSize() const
Capacity usage related method - returns total size counted, in bytes across all subsystems.
double getRawReadTime() const
Gets MJD when this system frame was actually read by the fault system.
The monitor system for the Control subsystem.
long getNumValidSubsystems() const
Returns number of valid subsystems.
WeatherSubsystem & weather() const
Get reference to the weather subsystem.
VlbiSubsystem & vlbi() const
Get reference to the vlbi subsystem.
C3gDataflowSubsystem & c3gDataflow(const int index) const
Carma3GBandSubsystem & carma3gBand(const int index) const
Get reference to a CARMA3G correlator band subsystem.
SlPipelineSubsystem & slPipeline() const
Get reference to the spectral line pipeline subsystem.
The monitor system for the WbPipeline subsystem.
long getTotalNumMonitorSamples() const
Capacity related method - returns total monitor sample capacity across all subsystems.
BimaSubsystem & bima(int index) const
Get reference to a bima antenna subsystem.
double getCollatorWriteDelay() const
Delay offset (in seconds) from the corrected UTC half-second when the System frame is written to IPQ ...
AlarmSubsystem & alarm() const
Get reference to the alarm subsystem.
LoRefSubsystem & loRef() const
Get reference to the LOref subsystem.
bool isCurrent() const
Returns true if the monitor subsystem contains data that is current.
WbdcSubsystem & wbdc() const
Get reference to wideband downconverter subsystem.
MasterClockSubsystem & masterclock() const
Get reference to the masterclock subsystem.
virtual ~MonitorSystem()
Destructor.
double getFinalWriteTime() const
Gets MJD when this system frame was actually read by the fault system.
TestSubsystem & test() const
Get reference to the test subsystem.
ImrSubsystem & imr() const
Get reference to imr subsystem.
Monitor system container interface definition.
The monitor system for the C3gMax8Pipeline subsystem.
CarmaMonitorSystem()
Full monitor system with all subsystems.
long getActualNumMultiSampleMonitorPoints() const
Capacity usage related method - returns actual # of monitor points with multiple samples across all s...
virtual unsigned int read()
Reads oldest unread data from the IPQ into the local set of monitor points.
WbcBandSubsystem & wbcBand(const int index) const
Get reference to a wideband correlator band subsystem.
CarmaSlcBandSubsystem & carmaSlcBand(const int index) const
Get reference to a spectral line correlator band subsystem.
long getTotalNumMonitorPoints() const
Capacity related method - returns total monitor point capacity across all subsystems.
SystemStatusSubsystem & systemStatus() const
Get reference to the system status subsystem.
FaultSubsystem & fault() const
Get reference to fault subsystem.
long getActualNumSubsystems() const
Capacity usage related method - returns actual number of subsystems allocated.
SlDataflowSubsystem & slDataflow(const int index) const
This is the full Carma monitor system before fault system processing and immediately following collat...
MonitorSystem(const std::string &systemName, long nSubsystems, long nMonitorPoints, long nSamples, int queueDepth=SubsystemFrameBuffer::kDefaultQueueDepth)
Constructor base subsystem configuration.
std::string addTransportTimesAsString(std::ostringstream o) const
Dumps transport statistics as a table, with write delays, and transport/write times printed out as do...
virtual std::string transportStatisticsToString(bool canonical=false) const
Dumps transport statistics as a table, with write delays, and transport/write times printed out as do...
This is the Final Carma Monitor system after monitor point values from the correlator pipeline have b...
WbDataflowSubsystem & wbDataflow(const int index) const
Class for managing IPQ for monitor subsystem.
long getActualNumMonitorPoints() const
Capacity usage related method - returns actual # of monitor points across all subsystems.
A generic monitor subsystem base class.
RawCarmaMonitorSystem()
Full monitor system with all subsystems, before fault processing.
SlRemapperSubsystem & slRemapper(const int index) const
DataflowSubsystem & dataflow() const
Get reference to the control subsystem.
The monitor system for the SlPipeline subsystem.
ProjectDatabaseManagerSubsystem & projectDatabaseManager() const
Get reference to the projectdatabase manager subsystem.
C3gMax8PipelineSubsystem & c3gMax8Pipeline() const
Get reference to carma 8 station 3g correlator pipeline.
long getMaxNumMonitorPoints() const
Capacity usage related method - returns total allocated monitor point capacity across all subsystems...
long getAllocatedNumMonitorPoints() const
Capacity usage related method - returns allocated monitor point capacity across all subsystems...
int getCarma3gBandCount() const
Get the number of carma3g bands.
double getCollatorWriteTime() const
MJD when this system frame was actually written to the IPQ.
virtual bool readNewest()
Reads in the newest data from the IPQ into the local set of monitor points.
long getAllocatedNumMonitorSamples() const
Capacity related method - returns total monitor sample capacity across all subsystems.
Monitor system base class.
WbRemapperSubsystem & wbRemapper(const int index) const
virtual bool readNewestIfStale()
Reads in data from the IPQ into the local set of monitor points if data is stale, that is...
size_t getTotalMonitorSystemSize() const
Capacity related method - returns total size available in bytes across all subsystems.
DelayEngineSubsystem & delay() const
Get reference to the delay engine subsystem.
AntennaCommon & antennaCommon(int index) const
Get reference to an AntennaCommon container in an ovro or bima or sza subsystem.
size_t getActualMonitorSystemSize() const
Capacity usage related method - returns actual size used in bytes across all subsystems.
Frame containing monitor points for a monitor subsystem frame.
virtual int getFrameCount() const
Get the frame count for the last read frame.
long getCountedNumMonitorSamples() const
Capacity related method - returns number of monitor samples counted across all subsystems.
PhaseMonitorSubsystem & phaseMonitor() const
Get reference to the phase monitor subsystem.
SldcSubsystem & sldc() const
Get reference to the spectral line downconverter subsystem.
The monitor system for the C3gMax23Pipeline subsystem.
int getCarmaSlcBandCount() const
Get the number of carmaSlcBands.
OvroSubsystem & ovro(int index) const
Get reference to ovro antenna subsystem.
LoberotatorSubsystem & loberotator() const
Get reference to the loberotator subsystem.
SignalPathSubsystem & signalPath() const
Get reference to the signal path subsystem.
SystemFrameBuffer & getSystemFrameBuffer() const
Get the underlying SystemFrameBuffer.
int getWbcBandCount() const
Get the number of wbcBands.
long getAllocatedNumSubsystems() const
Capacity usage related method - returns total number of subsystems allocated.
C3gRemapperSubsystem & c3gRemapper(const int index) const
virtual void write()
Write out the monitor point data values.
void synchronize(const CarmaMonitorSystem &src)
Method to synchronize this object with another CarmaMonitorSystem object.
ControlSubsystem & control() const
Get reference to the control subsystem.
size_t getMaxMonitorSystemSize() const
Capacity usage related method - returns total size allocated in bytes across all subsystems.
size_t getAllocatedMonitorSystemSize() const
Capacity usage related method - returns total size allocated in bytes across all subsystems.
Abstract MonitorSubsystem base class.
FinalCarmaMonitorSystem()
Full monitor system with all subsystems.
long getTotalNumSubsystems() const
Capacity related method - returns total subsystem capacity.