Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.SequentialDataProcessing
Class AbstractControlChannel

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.SequentialDataProcessing.AbstractControlChannel
All Implemented Interfaces:
Configurable, DataSink, DataSource, Resettable, Telemeterable
Direct Known Subclasses:
ControlChannelBlock, ControlChannelSuperBlock

public abstract class AbstractControlChannel
extends AocsObject
implements DataSource, DataSink

The AbstractControlChannel class is the interface through which any control channel is seen by its clients. Abstract control channel is a pure virtual class that exposes the functionalities that are common to all control channels, regardless of whether they are blocks or superblocks and regardless of the input and output order of the control channel. Control channel are always seen as instances of this class.

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  AbstractControlChannel[] ccLink
          i-th element contains channel linked to i-th input of this channel.
protected static int channelPropagation
          The propagation flag.
protected  AbstractControlChannel enclosingControlChannel
          In the variable enclosingControlChannel is stored a reference to a enclosing control channel.
protected  int lastPropagatedTime
          Time to which state was last propagated.
protected  int m
          Specifies a number of outputs.
protected  int n
          Specifies a number of inputs.
protected static int noPropagation
          The propagation flag.
protected  int propagationToken
          The variable propagationToken is used for storing a token value.
protected  RecoveryAction recoveryAction
          Recovery action used when propagateTime is called with illegal target time.
protected static int totalPropagation
          The propagation flag.
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
AbstractControlChannel()
          Creates a new AbstractControlChannel object with default description variables n, m, and propagationToken and performs localReset() and localResetConfiguration().
 
Method Summary
 AbstractControlChannel getEnclosingControlChannel()
          Getter method for the reference of an enclosing control channel.
 RecoveryAction getIllegalTimeRecoveryAction()
          If method propagate is called with a target time that is lower than lastPropagatedTime, then a failure event is raised.
 int getLastPropagatedTime()
          Returns the last propagated time.
 int getNumberOfInputs()
          Returns the number of inputs in the control channel.
 int getNumberOfOutputs()
          Returns the number of outputs in the control channel.
abstract  double getOutput(int j)
          Returns the j-th output of the control channel as a double.
 int getPropagationToken()
          Returns the propagation token.
 boolean isConfigured()
          The abstract method from the interface Configurable.
abstract  void linkInput(AbstractControlChannel c, int i, int j)
          Links j-th input to i-th output of control channel c.
abstract  void linkInput(DataSource d, int i, int j)
          Links the j-th input to i-th output of the data source d.
abstract  void propagate(int t)
          Propagates state and output equations from the current time to the target time t.
 void reset()
          Resets super object state and performs a local reset.
 void reset(int flag, int token)
          Performs the reset operation of source blocks.
 void resetConfiguration()
          Resets configuration of a super object and performs a local reset of the configuration.
 void setEnclosingControlChannel(AbstractControlChannel c)
          Setter method for the reference of an enclosing control channel.
 void setIllegalTimeRecoveryAction(RecoveryAction r)
          If method propagate is called with a target time that is lower than lastPropagatedTime, then a failure event is raised.
abstract  void setInput(double d, int i)
          Sets the new value of the i-th input.
protected  void setNumberOfInputs(int i)
          Setter method for the number of inputs.
protected  void setNumberOfOutputs(int i)
          Setter method for the number of outputs.
abstract  void setOnHold(boolean holdStatus)
          Setter method that suspends or resumes the state propagation.
 void setPropagationToken(int newToken)
           
 
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

n

protected int n
Specifies a number of inputs.


m

protected int m
Specifies a number of outputs.


propagationToken

protected int propagationToken
The variable propagationToken is used for storing a token value. The token mechanism is used in order to ensure that operations are called only once.


recoveryAction

protected RecoveryAction recoveryAction
Recovery action used when propagateTime is called with illegal target time.


enclosingControlChannel

protected AbstractControlChannel enclosingControlChannel
In the variable enclosingControlChannel is stored a reference to a enclosing control channel.


noPropagation

protected static final int noPropagation
The propagation flag.

See Also:
Constant Field Values

channelPropagation

protected static final int channelPropagation
The propagation flag.

See Also:
Constant Field Values

totalPropagation

protected static final int totalPropagation
The propagation flag.

See Also:
Constant Field Values

ccLink

protected AbstractControlChannel[] ccLink
i-th element contains channel linked to i-th input of this channel.


lastPropagatedTime

protected int lastPropagatedTime
Time to which state was last propagated.

Constructor Detail

AbstractControlChannel

public AbstractControlChannel()
Creates a new AbstractControlChannel object with default description variables n, m, and propagationToken and performs localReset() and localResetConfiguration().

Method Detail

propagate

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

Parameters:
t - the target time

setOnHold

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


linkInput

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

Parameters:
d - the fixed data source
i - the output of the fixed data source
j - the input of the control channel

linkInput

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

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 a local reset.

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

reset

public void reset(int flag,
                  int token)
Performs the reset operation of source blocks.

Parameters:
flag - is the propagation flag
token - is the propagation token

resetConfiguration

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

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

isConfigured

public boolean isConfigured()
The abstract method from the interface Configurable.

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

getOutput

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

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

setInput

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

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

getLastPropagatedTime

public int getLastPropagatedTime()
Returns the last propagated time.

Returns:
the last propagated time

getNumberOfInputs

public int getNumberOfInputs()
Returns the number of inputs in the control channel.

Specified by:
getNumberOfInputs in interface DataSink
Returns:
the number of inputs

setNumberOfInputs

protected void setNumberOfInputs(int i)
Setter method for the number of inputs.

Parameters:
i - the number of inputs

getNumberOfOutputs

public int getNumberOfOutputs()
Returns the number of outputs in the control channel.

Specified by:
getNumberOfOutputs in interface DataSource
Returns:
the number of outputs

setNumberOfOutputs

protected void setNumberOfOutputs(int i)
Setter method for the number of outputs.

Parameters:
i - number of outputs

getIllegalTimeRecoveryAction

public RecoveryAction getIllegalTimeRecoveryAction()
If method propagate is called with a target time that is lower than lastPropagatedTime, then a failure event is raised. getIllegalTimeRecoveryAction() is the getter method for such recovery action.

Returns:
the recovery action associated to a failure event

setIllegalTimeRecoveryAction

public void setIllegalTimeRecoveryAction(RecoveryAction r)
If method propagate is called with a target time that is lower than lastPropagatedTime, then a failure event is raised. setIllegalTimeRecoveryAction(RecoveryAction r) is the setter method for such recovery action.

Parameters:
r - the recovery action

getEnclosingControlChannel

public AbstractControlChannel getEnclosingControlChannel()
Getter method for the reference of an enclosing control channel.

Returns:
the reference of an enclosing control channel

setEnclosingControlChannel

public void setEnclosingControlChannel(AbstractControlChannel c)
Setter method for the reference of an enclosing control channel.

Parameters:
c - reference to an enclosing control channel

getPropagationToken

public int getPropagationToken()
Returns the propagation token. Should never be called by the application developers.

Returns:
the token value

setPropagationToken

public void setPropagationToken(int newToken)

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