CPN
Computational Process Networks
ThresholdQueueAttr.h
Go to the documentation of this file.
1 //=============================================================================
2 // $Id: ThresholdQueue.h,v 1.1 2006/06/12 20:30:13 gallen Exp $
3 //-----------------------------------------------------------------------------
4 // Attribute class for ThresholdQueue
5 //=============================================================================
6 
7 
8 #ifndef ThresholdQueueAttr_h
9 #define ThresholdQueueAttr_h
10 #pragma once
11 #include "common_priv.h"
12 
13 class ThresholdQueueBase;
14 
16  public:
17  typedef unsigned long ulong;
18 
19  ThresholdQueueAttr(ulong queueLen, ulong maxThresh, ulong numChans=1,
20  bool useMBS_=1, ulong chanOffst=0, ulong baseOffst=0)
21  : queueLength(queueLen), maxThreshold(maxThresh), numChannels(numChans),
22  useMBS(useMBS_), chanOffset(chanOffst), baseOffset(baseOffst) {}
23 
24  ulong QueueLength(void) const { return queueLength; }
25  ulong QueueLength(ulong queueLen) { return queueLength = queueLen; }
26  ulong MaxThreshold(void) const { return maxThreshold; }
27  ulong MaxThreshold(ulong maxThresh) { return maxThreshold = maxThresh; }
28  ulong NumChannels(void) const { return numChannels; }
29  ulong NumChannels(ulong numChans) { return numChannels = numChans; }
30 
31  void UseMBS(bool useMBS_, ulong chanOffst=0, ulong baseOffst=0)
32  { useMBS=useMBS_; chanOffset=chanOffst; baseOffset=baseOffst; }
33 
34  protected:
38  bool useMBS;
41 
42  friend class ThresholdQueueBase;
43 };
44 
45 #endif
ulong MaxThreshold(void) const
ThresholdQueueAttr(ulong queueLen, ulong maxThresh, ulong numChans=1, bool useMBS_=1, ulong chanOffst=0, ulong baseOffst=0)
ulong QueueLength(void) const
void UseMBS(bool useMBS_, ulong chanOffst=0, ulong baseOffst=0)
ulong NumChannels(ulong numChans)
ulong MaxThreshold(ulong maxThresh)
ulong QueueLength(ulong queueLen)
ulong NumChannels(void) const