/** * Decorator pattern to construct a new HTMSensor wrapping the specified {@link Sensor}. * * @param sensor */ public HTMSensor(ISensor sensor) { this.@delegate = sensor; sensorParams = sensor.GetSensorParams(); header = new Header(sensor.GetInputStream().GetMeta()); if (header == null || header.Size() < 3) { throw new InvalidOperationException("Header must always be present; and have 3 lines."); } CreateEncoder(); }
/** * <p> * Main method by which this Sensor's information is retrieved. * </p><p> * This method returns a subclass of Stream ({@link MetaStream}) * capable of returning a flag indicating whether a terminal operation * has been performed on the stream (i.e. see {@link MetaStream#isTerminal()}); * in addition the MetaStream returned can return meta information (see * {@link MetaStream#getMeta()}. * </p> * @return a {@link MetaStream} instance. */ public override IMetaStream GetInputStream() { return((IMetaStream)@delegate.GetInputStream()); }