Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.UnitManagement
Class Unit

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.UnitManagement.Unit
All Implemented Interfaces:
Configurable, DataSink, DataSource, Resettable, Telemeterable, UnitFunctional, UnitHousekeeping
Direct Known Subclasses:
JbedSmmAnalogActuator, JbedSmmAnalogSensor, TestAnalogActuator, TestAnalogSensor, TestSmmAnalogActuator, TestSmmAnalogSensor

public abstract class Unit
extends AocsObject
implements UnitFunctional, UnitHousekeeping

The abstract class Unit is an abstract unit model for basic and smart units. The units are passive components, namely incapable of initiating data exchanges with the computer. All data transactions with a unit occur in response to a command from the computer. Change Record:

Copyright: see the Copyright Notice.

Version:
1.1
Author:
Vaclav Cechticky (IfA ETHZ), Alessandro Pasetti (University of Konstanz)
See Also:
Unit Framelet Document

Field Summary
protected  int[] fcDestInput
           
protected  DataSink[] fcDestLink
           
protected  AocsData fcHwInpBuf
           
protected  AocsData fcHwOutBuf
           
protected  int[] hkDestInput
           
protected  DataSink[] hkDestLink
           
protected  AocsData hkHwInpBuf
           
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
Unit()
          Creates a new Unit object.
 
Method Summary
 int getNumberOfInputs()
          Return the number of the unit inputs.
 int getNumberOfOutputs()
          Return the number of the unit outputs.
 double getOutput(int i)
          Return the value of the i-th unit output.
 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.
 short getType()
          Return the unit type.
 boolean isConfigured()
          Checks a configuration of the unit model, housekeeping and functionals input and output buffers and convertors.
 void refreshFunctionalIn()
          Functional data are acquired at raw data level and placed in a hardware buffer internal to the unit.
 void refreshFunctionalOut()
          Sent functional data to the external unit are taken from hardware buffer internal to the unit.
 void refreshHousekeepingIn()
          Housekeeping data are acquired at raw data level and placed in a hardware buffer internal to the unit.
 void reset()
          Reset super object state and performs a local reset.
 void resetConfiguration()
          Reset configuration of the super object and performs the local reset of the configuration.
 void setFunctionalInConverter(AbstractControlChannel c)
          Initialization method to set data conversion from raw data level to customized data level, and any other processing on the raw data (eg. bias correction), is done by a control channel object.
 void setFunctionalInLink(DataSink destLink)
          Initialization method to set the functional input data link for the data converted from raw data level to customized data level.
 void setFunctionalInLink(DataSink destLink, int i, int j)
          Initialization method to set the functional input data link for the data converted from raw data level to customized data level.
 void setFunctionalOutConverter(AbstractControlChannel c)
          Initialization method to set data conversion from customized data level (in the source buffers) to raw data level (in the hardware buffer) is done by a control channel object.
 void setFunctionalOutLink(DataSource sourceLink)
          Initialization method to set the functional output data link for the data at AOCS data level.
 void setFunctionalOutLink(DataSource sourceLink, int i, int j)
          Initialization method to set the functional output data link for the data at customized data level.
 void setHkBufferSize(int nHkInpBuf)
          Initialization method to set a size of the internal buffer for housekeeping data.
 void setHousekeepingConverter(AbstractControlChannel c)
          Initialization method to set the data conversion from raw data level to customized data level, and any other processing on the raw data (eg. bias correction), is done by a control channel object.
 void setHousekeepingLink(DataSink hkLink)
          Initialization method to set the housekeeping data link for the housekeeping data.
 void setHousekeepingLink(DataSink hkLink, int i, int j)
          Initialization method to set the housekeeping data link for the housekeeping data.
 void setInBufferSize(int nFcInpBuf)
          Initialization method to set a size of the internal buffer for functional input data.
 void setInput(double newValue, int i)
          Set the i-th unit input.
 void setOutBufferSize(int nFcOutBuf)
          Initialization method to set a size of the internal buffer for functional output data.
 void writeToTelemetry(TelemetryStream stream)
          Causes the object to write its own state to the telemetry stream.
 
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
 
Methods inherited from interface RtjAocsFramework.UnitManagement.UnitFunctional
acquireFunctionalData, isAcquireTransactionFinished, isSendTransactionFinished, isSynchronizeFunctionalFinished, sendFunctionalData, synchronizeFunctional
 
Methods inherited from interface RtjAocsFramework.UnitManagement.UnitHousekeeping
acquireHousekeepingData, getSelfTestResults, initialize, isHousekeepingTransactionFinished, isInitialized, isSelfTestFinished, isSwitchedOn, isSynchronizeHousekeepingFinished, performSelfTest, resetUnit, switchOff, switchOn, synchronizeHousekeeping
 

Field Detail

fcHwInpBuf

protected AocsData fcHwInpBuf

fcHwOutBuf

protected AocsData fcHwOutBuf

hkHwInpBuf

protected AocsData hkHwInpBuf

fcDestLink

protected DataSink[] fcDestLink

hkDestLink

protected DataSink[] hkDestLink

fcDestInput

protected int[] fcDestInput

hkDestInput

protected int[] hkDestInput
Constructor Detail

Unit

public Unit()
Creates a new Unit object.

Method Detail

isConfigured

public boolean isConfigured()
Checks a configuration of the unit model, housekeeping and functionals input and output buffers and convertors.

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

getType

public short getType()
Return the unit type. In the current implementation, the type of an unit is the same as its class identifier.


reset

public void reset()
Reset super object state and performs a local reset.

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

resetConfiguration

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

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

setInBufferSize

public void setInBufferSize(int nFcInpBuf)
Initialization method to set a size of the internal buffer for functional input data. The method has to be called before the instance of the class Unit is used.

Parameters:
nFcInpBuf - represents a size of the funct. hw input buffer

setOutBufferSize

public void setOutBufferSize(int nFcOutBuf)
Initialization method to set a size of the internal buffer for functional output data. The method has to be called before the instance of the class Unit is used.

Parameters:
nFcOutBuf - represents a size of the funct. hw output buffer

setHkBufferSize

public void setHkBufferSize(int nHkInpBuf)
Initialization method to set a size of the internal buffer for housekeeping data. The method has to be called before the instance of the class Unit is used.

Parameters:
nHkInpBuf - represents a size of the housekeeping. hw buffer

setFunctionalInLink

public void setFunctionalInLink(DataSink destLink)
Initialization method to set the functional input data link for the data converted from raw data level to customized data level.

Specified by:
setFunctionalInLink in interface UnitFunctional

setFunctionalInLink

public void setFunctionalInLink(DataSink destLink,
                                int i,
                                int j)
Initialization method to set the functional input data link for the data converted from raw data level to customized data level. Links the j-th output of the Unit to the i-th input of a DataSink.

Specified by:
setFunctionalInLink in interface UnitFunctional

setFunctionalOutLink

public void setFunctionalOutLink(DataSource sourceLink)
Initialization method to set the functional output data link for the data at AOCS data level.

Specified by:
setFunctionalOutLink in interface UnitFunctional

setFunctionalOutLink

public void setFunctionalOutLink(DataSource sourceLink,
                                 int i,
                                 int j)
Initialization method to set the functional output data link for the data at customized data level. Links the j-th input of the Unit to the i-th output of a DataSource.

Specified by:
setFunctionalOutLink in interface UnitFunctional

setHousekeepingLink

public void setHousekeepingLink(DataSink hkLink)
Initialization method to set the housekeeping data link for the housekeeping data.

Specified by:
setHousekeepingLink in interface UnitHousekeeping

setHousekeepingLink

public void setHousekeepingLink(DataSink hkLink,
                                int i,
                                int j)
Initialization method to set the housekeeping data link for the housekeeping data. Links the j-th housekeeping output of the Unit to the i-th input of a DataSink.

Specified by:
setHousekeepingLink in interface UnitHousekeeping

setFunctionalInConverter

public void setFunctionalInConverter(AbstractControlChannel c)
Initialization method to set data conversion from raw data level to customized data level, and any other processing on the raw data (eg. bias correction), is done by a control channel object. This method allows the converter control channel to be loaded. The control channel will in general be a multi-input-multi-output control channel. The correct number of inputs and outputs is checked when the control channel is loaded, the number of inputs and outputs has to be equal. An incorrect number of inputs and/or outputs represents a configuration error.

Specified by:
setFunctionalInConverter in interface UnitFunctional
Parameters:
c - particular control channel object

setFunctionalOutConverter

public void setFunctionalOutConverter(AbstractControlChannel c)
Initialization method to set data conversion from customized data level (in the source buffers) to raw data level (in the hardware buffer) is done by a control channel object. This method allows the converter control channel for outgoing data to be loaded. The control channel will in general be a multi-input-multi-output control channel. The correct number of inputs and outputs is checked when the control channel is loaded, the number of inputs and outputs has to be equal. An incorrect number of inputs and/or outputs represents a configuration error.

Specified by:
setFunctionalOutConverter in interface UnitFunctional
Parameters:
c - particular control channel object

setHousekeepingConverter

public void setHousekeepingConverter(AbstractControlChannel c)
Initialization method to set the data conversion from raw data level to customized data level, and any other processing on the raw data (eg. bias correction), is done by a control channel object. This method allows the converter control channel to be loaded. The control channel will in general be a multi-input-multi-output control channel. The correct number of inputs and outputs is checked when the control channel is loaded, the number of inputs and outputs has to be equal. An incorrect number of inputs and/or outputs represents a configuration error.

Specified by:
setHousekeepingConverter in interface UnitHousekeeping
Parameters:
c - particular control channel object

refreshFunctionalIn

public void refreshFunctionalIn()
Functional data are acquired at raw data level and placed in a hardware buffer internal to the unit. A call to this method causes them to be converted to customized data level and transferred to linked DataSink object.

Specified by:
refreshFunctionalIn in interface UnitFunctional

refreshFunctionalOut

public void refreshFunctionalOut()
Sent functional data to the external unit are taken from hardware buffer internal to the unit. A call to this method causes the content of the hardware buffer to be updated with the latest data from linked DataSource object.

Specified by:
refreshFunctionalOut in interface UnitFunctional

refreshHousekeepingIn

public void refreshHousekeepingIn()
Housekeeping data are acquired at raw data level and placed in a hardware buffer internal to the unit. A call to this method causes them to be converted to customized data level and transferred to linked DataSink object.

Specified by:
refreshHousekeepingIn in interface UnitHousekeeping

getNumberOfOutputs

public int getNumberOfOutputs()
Return the number of the unit outputs.

Specified by:
getNumberOfOutputs in interface DataSource

getOutput

public double getOutput(int i)
Return the value of the i-th unit output.

Specified by:
getOutput in interface DataSource
Parameters:
i - the output of the unit

getNumberOfInputs

public int getNumberOfInputs()
Return the number of the unit inputs.

Specified by:
getNumberOfInputs in interface DataSink

setInput

public void setInput(double newValue,
                     int i)
Set the i-th unit input.

Specified by:
setInput in interface DataSink
Parameters:
newValue - the new value
i - the input of the unit

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