Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
QueueIO.h
Go to the documentation of this file.
1 /*
2  * BufferedCameraLinkIO.h
3  *
4  * Created on: Feb 9, 2015
5  * Author: mitycam
6  */
7 
8 #ifndef QUEUEIO_H_
9 #define QUEUEIO_H_
10 
11 #include <list>
12 
13 #include "IOChannel/IOChannel.h"
14 
15 namespace SocCamera
16 {
17 
22 public:
24 
25  virtual ~tcQueueWatcher() {}
26 
30  virtual void imageEnqueued() {}
31 
35  virtual void thresholdExceeded() {}
36 };
37 
38 class tcQueueIO: public tcIOChannel
39 {
40 public:
41  tcQueueIO(tcSensorBoard *apSensor);
42 
43  virtual ~tcQueueIO();
44 
53 
58  virtual void sendUpdate(tsNewFrameMsg *apMsg);
59 
69 
78  void setThreshold(uint32_t anMaxSize);
79 
86 
92  tcImage* takeImage();
93 
100  uint32_t currentSize();
101 
105  void flush();
106 
107  void registerWatcher(tcQueueWatcher *apNewWatcher);
108 
109  void unregisterWatcher(tcQueueWatcher *apWatcher);
110 
111 private:
112  uint32_t mnThreshold;
113  uint32_t mnImagesQueued;
114 
115  enum teWatcherUpdate {
116  eeNewImage,
117  eeThreshold
118  };
119 
120  void updateWatchers(teWatcherUpdate aeType);
121 
122  std::list<tcQueueWatcher*> mcWatchers;
123 
124  std::list<tsNewFrameMsg> mcQueue;
125 };
126 
127 } /* namespace SocCamera */
128 
129 #endif /* QUEUEIO_H_ */
SocCamera::tcQueueWatcher::tcQueueWatcher
tcQueueWatcher()
Definition: QueueIO.h:23
SocCamera::tcQueueIO::flush
void flush()
Definition: QueueIO.cpp:106
SocCamera::tcQueueIO::~tcQueueIO
virtual ~tcQueueIO()
Definition: QueueIO.cpp:25
SocCamera::tcQueueIO::sendUpdate
virtual void sendUpdate(tsNewFrameMsg *apMsg)
Definition: QueueIO.cpp:48
SocCamera::tcQueueIO::tcQueueIO
tcQueueIO(tcSensorBoard *apSensor)
Definition: QueueIO.cpp:17
SocCamera::tcQueueIO::setBpp
virtual SocCamera::teNackCode setBpp(SocCamera::teBPPMode aeBppMode)
Definition: QueueIO.cpp:61
SocCamera::tcQueueWatcher::thresholdExceeded
virtual void thresholdExceeded()
Definition: QueueIO.h:35
SocCamera::tcQueueWatcher::imageEnqueued
virtual void imageEnqueued()
Definition: QueueIO.h:30
SocCamera::tcQueueIO::takeImage
tcImage * takeImage()
Definition: QueueIO.cpp:72
SocCamera::teNackCode
teNackCode
Definition: CameraTypes.h:62
tcIOChannel
Camera Output IO channel management class.
Definition: IOChannel.h:34
SocCamera::teBPPMode
teBPPMode
Definition: CameraTypes.h:133
SocCamera::tcQueueIO::registerWatcher
void registerWatcher(tcQueueWatcher *apNewWatcher)
Definition: QueueIO.cpp:111
SocCamera::tcQueueIO::takeMessage
tsNewFrameMsg takeMessage()
Definition: QueueIO.cpp:121
SocCamera::tcQueueIO::setThreshold
void setThreshold(uint32_t anMaxSize)
Definition: QueueIO.cpp:67
SocCamera
Definition: CameraTypes.h:7
SocCamera::tcQueueIO
Definition: QueueIO.h:38
tcImage
Definition: Image.h:34
SocCamera::tcQueueIO::capture
virtual SocCamera::teNackCode capture(tsCaptureRequest asRequest)
Definition: QueueIO.cpp:29
SocCamera::tcQueueWatcher
Definition: QueueIO.h:21
tsNewFrameMsg
Definition: IOCallback.h:11
SocCamera::tcQueueIO::unregisterWatcher
void unregisterWatcher(tcQueueWatcher *apWatcher)
Definition: QueueIO.cpp:116
SocCamera::tcSensorBoard
Definition: SensorBoard.h:40
tsCaptureRequest
Definition: IOCallback.h:56
IOChannel.h
SocCamera::tcQueueIO::currentSize
uint32_t currentSize()
Definition: QueueIO.cpp:101
SocCamera::tcQueueWatcher::~tcQueueWatcher
virtual ~tcQueueWatcher()
Definition: QueueIO.h:25