CSIM: csiminputclass.h Source File

csiminputclass.h

00001 #ifndef __CSIMINPUTCLASS_H__
00002 #define __CSIMINPUTCLASS_H__
00003 
00004 #include "globaldefinitions.h"
00005 #include "csimlist.h"
00006 
00008 struct csimInputChannel {
00010   int length;
00011 
00013   int next;
00014 
00016   double dt;
00017 
00019   double lastSpikeTime;
00020 
00022   double *data;
00023 
00025   uint32 *idx;
00026   int    nIdx;
00027 };
00028 
00030 class csimInputClass {
00031 public:
00032   csimInputClass() { channelIdChecked=0; };
00033   virtual ~csimInputClass() {};
00034   inline int nChannels(void) { return channel.n; }
00035   virtual int addInputChannel(csimInputChannel *c)=0;
00036   void clearInputChannels(void);
00037 protected:
00038   inline csimInputChannel* getChannel(uint32 c);
00039   void addChannel(csimInputChannel *c);
00040 private:
00041   csimList<csimInputChannel,1> channel;
00042   bool channelIdChecked;
00043 };
00044 
00046 class csimSpikingInputClass : public csimInputClass {
00047 public:
00048   int addInputChannel(csimInputChannel *c);
00049   int nextValue(int i);
00050 };
00051 
00053 class csimAnalogInputClass : public csimInputClass {
00054 public:
00055   int addInputChannel(csimInputChannel *c);
00056   double nextValue(int i);
00057 };
00058 
00059 #endif

 
(C) 2003, Thomas Natschläger last modified 07/10/2006