Robochameleon  v1.0
sink.m
Go to the documentation of this file.
1 classdef sink < unit
2 
3  properties
4  nInputs;
5  nOutputs = 0;
6 
7  keep = 0;
8  end
9 
10  methods
11 
12  function obj = sink(nInputs)
13  if nargin<1
14  obj.nInputs = 1;
15 % elseif nInputs < 1
16 % error('Number of inputs must be a positive integer.');
17  else
18  obj.nInputs = nInputs;
19  end
20  end
21 
22  function traverse(~,~), end
23 
24  function [varargout] = readBuffer(obj)
25  varargout = obj.inputBuffer;
26  if(~ispref('robochameleon','debugMode') && ~getpref('robochameleon','debugMode'))
27  if(~obj.keep)
28  obj.inputBuffer = {};
29  end
30  end
31  end
32 
33  function setKeep(obj, keep)
34  obj.keep = keep;
35  end
36 
37  end
38 end
Superclass: basic building block to hold functions.
Definition: unit.m:27
stores the input signal.
Definition: sink.m:12
function robochameleon(in varargin)
Add robochameleon related directories to the MATLAB path.