27 #ifndef _nidas_dynld_raf_2d_usb_h_
28 #define _nidas_dynld_raf_2d_usb_h_
38 namespace nidas {
namespace dynld {
namespace raf {
40 using namespace nidas::core;
92 virtual int NumberOfDiodes()
const = 0;
103 void printStatus(std::ostream& ostr) throw();
112 virtual
int TASToTap2D(
void * t2d,
float tas);
125 Tap2DToTAS(const
Tap2D * t2d) const;
131 Tap2DToTAS(const
Tap2Dv1 * t2d) const;
138 Particle() : height(0), width(0), area(0), edgeTouch(0), liveTime(0), dofReject(false) { } ;
139 void zero() { height = width = area = liveTime = 0; edgeTouch = 0; dofReject =
false; }
174 virtual void init_parameters()
181 virtual
void sendTrueAirspeed(
float tas) throw(nidas::util::
IOException);
190 virtual
void processParticleSlice(
Particle& p, const
unsigned char * slice);
197 virtual
void countParticle(const
Particle& p,
float resolutionUsec);
205 virtual
bool acceptThisParticle1D(const
Particle& p) const;
206 virtual
bool acceptThisParticle2D(const
Particle& p) const;
218 virtual
void createSamples(
dsm_time_t nextTimeTag,std::list<const
Sample *>&results) throw();
223 virtual
void clearData();
237 unsigned int _numImages;
242 long long _lastStatusTime;
248 float _resolutionMeters;
253 unsigned int _resolutionMicron;
276 unsigned int * _size_dist_1D;
277 unsigned int * _size_dist_2D;
291 unsigned int _totalRecords;
292 unsigned int _totalParticles;
293 unsigned int _rejected1D_Cntr, _rejected2D_Cntr;
294 unsigned int _overLoadSliceCount;
295 unsigned int _overSizeCount_2D;
296 unsigned int _tasOutOfRange;
297 unsigned int _misAligned;
298 unsigned int _suspectSlices;
299 unsigned int _recordsPerSecond;
303 unsigned int _totalPixelsShadowed;
311 long long _histoEndTime;
318 float _twoDAreaRejectRatio;
347 void saveBuffer(const
unsigned char * cp, const
unsigned char * eod);
359 void setupBuffer(const
unsigned char ** cp, const
unsigned char ** eod);
364 unsigned char * _saveBuffer;
376 static const
float DefaultTrueAirspeed;
384 TwoD_USB& operator=(const TwoD_USB&);
388 template <typename T, typename V>
394 for (
unsigned int i = 0; i < nbins; ++i)
396 if (sizedist[i] == 0)
Definition: TwoD_USB.h:135
Struct to adjust probe slice rate for true airspeed.
Definition: usbtwod.h:69
int getTASRate() const
Definition: TwoD_USB.h:66
unsigned int getResolutionMicron() const
The probe resolution in micrometers.
Definition: TwoD_USB.h:84
unsigned int dsm_sample_id_t
Definition: Sample.h:63
unsigned int width
Max particle length, along flight path.
Definition: TwoD_USB.h:144
bool dofReject
Depth Of Field Reject? Last bit of sync word.
Definition: TwoD_USB.h:162
long long dsm_time_t
Posix time in microseconds, the number of non-leap microseconds since 1970 Jan 1 00:00 UTC...
Definition: Sample.h:61
static const nidas::util::EndianConverter * bigEndian
Definition: TwoD_USB.h:166
unsigned int area
Actual number of shadowed diodes.
Definition: TwoD_USB.h:149
This version is for rev2 of Spowarts USB board.
Definition: usbtwod.h:84
float getResolution() const
The probe resolution in meters.
Definition: TwoD_USB.h:76
void setTASRate(int val)
Definition: TwoD_USB.h:68
unsigned int liveTime
Amount of time consumed by the particle as it passed through the array.
Definition: TwoD_USB.h:159
void zero()
Definition: TwoD_USB.h:139
Virtual base class declaring methods for converting numeric values between little-endian and big-endi...
Definition: EndianConverter.h:304
unsigned int height
Max particle height, along diode array.
Definition: TwoD_USB.h:142
Particle()
Definition: TwoD_USB.h:138
unsigned char edgeTouch
Was an edge diode triggered.
Definition: TwoD_USB.h:154
An interface to an IO device.
Definition: IODevice.h:41
Interface to a data sample.
Definition: Sample.h:189
DSMSensor provides the basic support for reading, processing and distributing samples from a sensor a...
Definition: DSMSensor.h:87
Definition: IOException.h:37
A scanner of sample data.
Definition: SampleScanner.h:73
static const nidas::util::EndianConverter * littleEndian
Definition: TwoD_USB.h:169
This class will read, parse and make available the parameters in the onboard real-time broadcast of d...
Definition: DerivedDataReader.h:44
Base class for PMS 2D particle probes on a USB interface.
Definition: TwoD_USB.h:46
Interface of a DerivedDataClient of the DerivedDataReader.
Definition: DerivedDataClient.h:37
Definition: InvalidParameterException.h:35
void stream_histogram(T &out, V *sizedist, unsigned int nbins)
Definition: TwoD_USB.h:391