00001 #ifndef __PORT_H__
00002 #define __PORT_H__
00003
00004 #include <vector>
00005
00006 namespace DiscreteTimeSystems {
00007
00011 class OutputPort {
00012 std::vector<double> _array;
00013 int _size;
00014
00015 int update_time;
00016
00017 Block *myblock;
00018
00019 public:
00022 OutputPort(int size, Block *b);
00023
00025 int getSize() { return _size; }
00026
00028 std::vector<double> getData();
00029
00031 void setData(const std::vector<double> &d);
00032 };
00033
00037 class InputPort {
00038 OutputPort *_port;
00039 int _size;
00040 public:
00045 InputPort(int size);
00046
00051 void connect(OutputPort *p);
00052
00056 int getSize() { return _size; }
00057
00062 std::vector<double> getData();
00063
00064 };
00065 }
00066 #endif
00067