CARMA C++
SystemFrameBuffer.h
Go to the documentation of this file.
1 #ifndef CARMA_MONITOR_SYSTEMFRAME_BUFFER_H
2 #define CARMA_MONITOR_SYSTEMFRAME_BUFFER_H
3 
15 #include <memory>
16 
18 // To get the default queueDepth...
20 
21 namespace carma {
22 namespace monitor {
23 
24 
25 class MonitorPointSet;
26 
27 
28 class SystemFrameBuffer : public SystemFrame {
29  public:
30  void write () ; // update to shared memeory
31 
38  unsigned int read( );
39  bool readNewest( );
40  bool readNewestIfStale( );
41  bool readNewestConditionalCopy();
42 
54  MonitorPointSet& getMonitorPointSet (ushort subsystemID,
55  int numMonitorPoints = 0,
56  int numSamples = 0);
57 
67  static SystemFrameBuffer &
68  getSystemFrameBuffer(
69  const ::std::string& name = "Carma",
70  long maxSubsystems = 0,
71  long maxMonitorPoints = 0,
72  long maxSamples = 0,
73  int queueDepth = SubsystemFrameBuffer::kDefaultQueueDepth);
74 
78  virtual ~SystemFrameBuffer ();
79 
80  void setNoneAvailable();
81 
82  private:
83  // No copying
84  SystemFrameBuffer( const SystemFrameBuffer & rhs );
85  SystemFrameBuffer & operator=( const SystemFrameBuffer & rhs );
86 
106  SystemFrameBuffer( const ::std::string & fname,
107  long maxSubsystems,
108  long maxMonitorPoints,
109  long maxSamples,
110  bool isCreator,
111  int queueDepth );
112 
113  class InternalIpq;
114 
115  ::std::auto_ptr< InternalIpq > ipq_;
116 };
117 
118 
119 } // namespace carma::monitor
120 } // namespace carma
121 
122 
123 #endif
Class for managing IPQ for monitor subsystem.
Class wrapper for monitor system frame structure that manages storage for a monitor system frame...