Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.SequentialDataProcessing
Class MatlabBlock

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

public abstract class MatlabBlock
extends ControlChannelBlock

Control block acting as a container for an autocode procedure generated by Matlab.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Vaclav Cechticky (IfA ETHZ)
See Also:
The Sequential Data Processing Framelet Document

Field Summary
protected  RecoveryAction matlabErrorRecoveryAction
          Recovery action used when the sampling period is incorrect.
 
Fields inherited from class RtjAocsFramework.SequentialDataProcessing.ControlChannelBlock
dataSourceOutputPosition, initFlag, input, inputLink, onHold, output, outputBuffer, p, state, validityTime
 
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
MatlabBlock(int i, int j, int sT)
          Creates a new MatlabBlock object with the specified number of inputs, number of outputs and sampling time.
 
Method Summary
protected abstract  String ErrorStatus()
          Checks if an error status has been set by the generated code or by the developer.
 void finalizeMatlabBlock()
          Releases resourses when the matlab block is no longer referred.
 RecoveryAction getMatlabErrorRecoveryAction()
          If method propagate is called with a sampling time that is different from the sampling time defined in a matlab block, then a failure event is raised.
 int getTelemetryImageLength()
          Return the length in bits of the telemetry image that would be written by the object in response to a call to method writeToTelemetry.
protected abstract  void init(boolean flag)
          Calls model's generated termination code.
protected abstract  void internalLoadInput()
          Updates the input.
protected abstract  void internalUpdateOutput()
          Updates the output.
protected  void propagationAlgorithm(int t)
          The propagation algorithm of the matlab block.
 void reset()
          Resets the super object state.
 void resetConfiguration()
          Resets configuration of the super object and performs the local reset of the configuration.
 void setMatlabErrorRecoveryAction(RecoveryAction r)
          If method propagate is called with a sampling time that is different from the sampling time defined in a matlab block, then a failure event is raised.
protected abstract  void step()
          Calls model's generated step function.
protected abstract  void term()
          Calls model's generated termination code.
 void writeToTelemetry(TelemetryStream stream)
          Causes the object to write its own state to the telemetry stream.
 
Methods inherited from class RtjAocsFramework.SequentialDataProcessing.ControlChannelBlock
getNumberOfStates, getOutput, getState, getValidityTime, isConfigured, isOnHold, linkInput, linkInput, propagate, resetMemory, setInput, setInputSize, setOnHold, setOutputSize, setState, setStateSize
 
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, getTime, removeConfigurationListener, removeFailureListener, reportConfigurationEvent, reportFailure, resetStaticConfiguration, setAocsClock, setDestructionRecoveryAction, setMaxNumberOfConfigurationListeners, setMaxNumberOfFailureListeners, setSystemManager, setTelemetryFormat
 
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

matlabErrorRecoveryAction

protected RecoveryAction matlabErrorRecoveryAction
Recovery action used when the sampling period is incorrect.

Constructor Detail

MatlabBlock

public MatlabBlock(int i,
                   int j,
                   int sT)
Creates a new MatlabBlock object with the specified number of inputs, number of outputs and sampling time.

Parameters:
i - the number of inputs
j - the number of outputs
sT - the sampling time of the matlab model
Method Detail

finalizeMatlabBlock

public void finalizeMatlabBlock()
Releases resourses when the matlab block is no longer referred.


propagationAlgorithm

protected void propagationAlgorithm(int t)
The propagation algorithm of the matlab block.

Specified by:
propagationAlgorithm in class ControlChannelBlock
Parameters:
t - the target time

init

protected abstract void init(boolean flag)
Calls model's generated termination code.

Parameters:
flag - if the flag is true the function initializes data structures private to the model. If the flag is false the model resets the model's states.

step

protected abstract void step()
Calls model's generated step function.


term

protected abstract void term()
Calls model's generated termination code.


internalLoadInput

protected abstract void internalLoadInput()
Updates the input.


internalUpdateOutput

protected abstract void internalUpdateOutput()
Updates the output.


ErrorStatus

protected abstract String ErrorStatus()
Checks if an error status has been set by the generated code or by the developer.


reset

public void reset()
Resets the super object state.

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

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 ControlChannelBlock

getMatlabErrorRecoveryAction

public RecoveryAction getMatlabErrorRecoveryAction()
If method propagate is called with a sampling time that is different from the sampling time defined in a matlab block, then a failure event is raised. getMatlabErrorRecoveryAction() is the getter method for such recovery action.

Returns:
the recovery action associated to a failure event

setMatlabErrorRecoveryAction

public void setMatlabErrorRecoveryAction(RecoveryAction r)
If method propagate is called with a sampling time that is different from the sampling time defined in a matlab block, then a failure event is raised. setMatlabErrorRecoveryAction(RecoveryAction r) is the setter method for such recovery action.

Parameters:
r - the recovery action

getTelemetryImageLength

public int getTelemetryImageLength()
Return the length in bits of the telemetry image that would be written by the object in response to a call to method writeToTelemetry.

Specified by:
getTelemetryImageLength in interface Telemeterable
Overrides:
getTelemetryImageLength in class AocsObject
Returns:
the length in bits of the telemetry image

writeToTelemetry

public void writeToTelemetry(TelemetryStream stream)
Causes the object to write its own state to the telemetry stream.

Specified by:
writeToTelemetry in interface Telemeterable
Overrides:
writeToTelemetry in class AocsObject
Parameters:
stream - the telemetry stream

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