Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.SequentialDataProcessing
Class ControlChannelBlock

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.SequentialDataProcessing.AbstractControlChannel
                    |
                    +--RtjAocsFramework.SequentialDataProcessing.ControlChannelBlock
All Implemented Interfaces:
Configurable, DataSink, DataSource, Resettable, Telemeterable
Direct Known Subclasses:
AdderBlock, BiasScalingCompensator, D_Block, DifferenceBlock, I_Block, LimitBlock, MatlabBlock, P_Block, PassThruBlock, SplitterBlock, TorqueToThrusterPrototype, TwoByTwoMatrixBlock, XmathUcbBlock

public abstract class ControlChannelBlock
extends AbstractControlChannel

ControlChannelBlock is an abstract class that acts as base class for all concrete control blocks. It provides concrete implementations of methods and data structure to manage block operations. This class provides data structures to buffer the input and the output signals and operations to reset them. Such data operations are common to all control channel blocks. This class is abstract because it does not provide any implementation for the method propagate.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz), Vaclav Cechticky (IfA ETHZ)
See Also:
The Sequential Data Processing Framelet Document

Field Summary
protected  int[] dataSourceOutputPosition
          Array index represents particular inputs of the control channel block, the data stored in the array represent an output of a DataSource connected to the inputs of a control channel block.
protected  boolean initFlag
          The value is true when the block is reset.
protected  double[] input
          Working input buffer.
protected  DataSource[] inputLink
          Array of links for input from external signals.
protected  boolean onHold
          The value is true if block is currently on hold.
protected  double[] output
          Working output buffer.
protected  double[] outputBuffer
          Array holding last set of computed outputs.
protected  int p
          Specifies a number of states.
protected  double[] state
          State buffer.
protected  int validityTime
          Validity time for output buffer.
 
Fields inherited from class RtjAocsFramework.SequentialDataProcessing.AbstractControlChannel
ccLink, channelPropagation, enclosingControlChannel, lastPropagatedTime, m, n, noPropagation, propagationToken, recoveryAction, totalPropagation
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
ControlChannelBlock()
          Creates a new ControlChannelBlock object with a default description variable p.
 
Method Summary
 int getNumberOfStates()
          Returns a size of the state buffer.
 double getOutput(int j)
          Returns the j-th output of the control channel as a double.
 double getState(int i)
          Getter method for the i-th component of the block's internal state.
 int getValidityTime()
          Returns the validity time.
 boolean isConfigured()
          Checks the configuration.
 boolean isOnHold()
          Checks whether the state propagation is suspended.
 void linkInput(AbstractControlChannel c, int i, int j)
          Links j-th input to i-th output of control channel c.
 void linkInput(DataSource d, int i, int j)
          Links the j-th input to i-th output of the data source d.
 void propagate(int t)
          Propagates state and output equations from the current time to the target time t.
protected abstract  void propagationAlgorithm(int t)
          A particular propagation algorithm.
 void reset()
          Resets super object state and performs the local reset.
 void resetConfiguration()
          Resets configuration of the super object and performs the local reset of the configuration.
protected  void resetMemory()
          Performs the local reset and the local reset of the configuation.
 void setInput(double d, int i)
          Sets the new value of the i-th input.
protected  void setInputSize(int i)
          Allocates memory for the input buffers.
 void setOnHold(boolean holdStatus)
          Setter method that suspends or resumes the state propagation.
protected  void setOutputSize(int j)
          Allocates memory for the output buffers.
 void setState(int i, double value)
          Setter method for the i-th component of the block's internal state.
protected  void setStateSize(int k)
          Allocates memory for the state buffers.
 
Methods inherited from class RtjAocsFramework.SequentialDataProcessing.AbstractControlChannel
getEnclosingControlChannel, getIllegalTimeRecoveryAction, getLastPropagatedTime, getNumberOfInputs, getNumberOfOutputs, getPropagationToken, reset, setEnclosingControlChannel, setIllegalTimeRecoveryAction, setNumberOfInputs, setNumberOfOutputs, setPropagationToken
 
Methods inherited from class RtjAocsFramework.BasicObjects.AocsObject
addConfigurationListener, addFailureListener, finalize, getAocsClock, getConfigurationListenerList, getCycle, getDestructionRecoveryAction, getFailureListenerList, getSystemManager, getTelemetryFormat, getTelemetryImageLength, getTime, removeConfigurationListener, removeFailureListener, reportConfigurationEvent, reportFailure, resetStaticConfiguration, setAocsClock, setDestructionRecoveryAction, setMaxNumberOfConfigurationListeners, setMaxNumberOfFailureListeners, setSystemManager, setTelemetryFormat, writeToTelemetry
 
Methods inherited from class RtjAocsFramework.BasicObjects.RootObject
getClassId, getInstanceId, setClassId
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

protected int p
Specifies a number of states.


onHold

protected boolean onHold
The value is true if block is currently on hold.


initFlag

protected boolean initFlag
The value is true when the block is reset.


inputLink

protected DataSource[] inputLink
Array of links for input from external signals.


dataSourceOutputPosition

protected int[] dataSourceOutputPosition
Array index represents particular inputs of the control channel block, the data stored in the array represent an output of a DataSource connected to the inputs of a control channel block.


outputBuffer

protected double[] outputBuffer
Array holding last set of computed outputs.


validityTime

protected int validityTime
Validity time for output buffer.


input

protected double[] input
Working input buffer.


output

protected double[] output
Working output buffer.


state

protected double[] state
State buffer.

Constructor Detail

ControlChannelBlock

public ControlChannelBlock()
Creates a new ControlChannelBlock object with a default description variable p.

Method Detail

setInputSize

protected void setInputSize(int i)
Allocates memory for the input buffers. This method can be called only once!

Parameters:
i - an order of the input

setOutputSize

protected void setOutputSize(int j)
Allocates memory for the output buffers. This method can be called only once!

Parameters:
j - an order of the output

setStateSize

protected void setStateSize(int k)
Allocates memory for the state buffers. This method can be called only once!

Parameters:
k - an order of the state

resetMemory

protected void resetMemory()
Performs the local reset and the local reset of the configuation. Can be called only after methods setInputSize(int i), setOutputSize(int j), setStateSize(int k).


propagationAlgorithm

protected abstract void propagationAlgorithm(int t)
A particular propagation algorithm.

Parameters:
t - the target time

propagate

public void propagate(int t)
Propagates state and output equations from the current time to the target time t.

Specified by:
propagate in class AbstractControlChannel
Parameters:
t - the target time

linkInput

public void linkInput(DataSource d,
                      int i,
                      int j)
Links the j-th input to i-th output of the data source d.

Specified by:
linkInput in class AbstractControlChannel
Parameters:
d - the fixed data source
i - the output of the fixed data source
j - the input of the control channel

linkInput

public void linkInput(AbstractControlChannel c,
                      int i,
                      int j)
Links j-th input to i-th output of control channel c.

Specified by:
linkInput in class AbstractControlChannel
Parameters:
c - another control channel
i - the output of another control channel
j - the input of the control channel

reset

public void reset()
Resets super object state and performs the local reset.

Specified by:
reset in interface Resettable
Overrides:
reset in class AbstractControlChannel

resetConfiguration

public void resetConfiguration()
Resets configuration of the super object and performs the local reset of the configuration.

Specified by:
resetConfiguration in interface Configurable
Overrides:
resetConfiguration in class AbstractControlChannel

isConfigured

public boolean isConfigured()
Checks the configuration.

Specified by:
isConfigured in interface Configurable
Overrides:
isConfigured in class AbstractControlChannel
Returns:
the true value if the object is configured, otherwise returns false

setOnHold

public void setOnHold(boolean holdStatus)
Setter method that suspends or resumes the state propagation.

Specified by:
setOnHold in class AbstractControlChannel

isOnHold

public boolean isOnHold()
Checks whether the state propagation is suspended.

Returns:
the true value if the state propagation is suspended, otherwise returns false

getValidityTime

public int getValidityTime()
Returns the validity time.

Returns:
the validity time for the output buffer

getOutput

public double getOutput(int j)
Returns the j-th output of the control channel as a double.

Specified by:
getOutput in interface DataSource
Specified by:
getOutput in class AbstractControlChannel
Parameters:
j - determines a particular output of the control channel
Returns:
the j-th output of the control channel

setInput

public void setInput(double d,
                     int i)
Sets the new value of the i-th input.

Specified by:
setInput in interface DataSink
Specified by:
setInput in class AbstractControlChannel
Parameters:
d - the new value
i - the particular input

getNumberOfStates

public int getNumberOfStates()
Returns a size of the state buffer.

Returns:
the size of the state buffer

getState

public double getState(int i)
Getter method for the i-th component of the block's internal state.

Parameters:
i - the particular state
Returns:
the i-th component of the block's internal state

setState

public void setState(int i,
                     double value)
Setter method for the i-th component of the block's internal state.

Parameters:
i - the particular state
value - the required value

Real-Time Java AOCS Framework v1.0 API Specification

Real-Time Java AOCS Framework project home page

Automatic Control Laboratory, ETH Zuerich
Physikstrasse 3
CH-8092 Zuerich, Switzerland