Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.TelemetryManagement
Class TestTelemetryStream

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.TelemetryManagement.TestTelemetryStream
All Implemented Interfaces:
Configurable, Resettable, Telemeterable, TelemetryStream

public class TestTelemetryStream
extends AocsObject
implements TelemetryStream

This class encapsulates a test telemetry stream that directs the telemetry data to an output file. The name of the output file is TestTelemetryStream.txt. This file is opened in the directory in which the test program is run.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The Telemetry Management Framelet Document.

Field Summary
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
TestTelemetryStream(String outFileName)
           
 
Method Summary
protected  void finalize()
          Report a failure if an AocsObject is destroyed.
 void flushBuffer()
          Flush the current telemetry frame to the telemetry stream
 int getBufferSize()
          Return the size of the telemetry buffer in bytes
 int getTelemetryImageLength()
          Return the length (in bits) of the telemetry image of the object.
 void resetBuffer()
          Reset the telemetry buffer
 void setBufferSize(int size)
          Set the size of the telemetry buffer in bytes.
 void write(boolean d)
          Write the boolean 'd' to the telemetry stream
 void write(byte d, int n, int m)
          Write bits n to m of byte 'd' to the telemetry stream
 void write(double d)
          Write the double 'd' to the telemetry stream
 void write(float d)
          Write the float 'd' to the telemetry stream
 void write(int d)
          Write the integer 'd' to the telemetry stream
 void write(int address, int n)
          Write to telemetry stream n bytes starting from address 'address'
 void write(int d, int n, int m)
          Write bits n to m of integer 'd' to the telemetry stream
 void write(short d)
          Write the short integer 'd' to the telemetry stream
 void write(short d, int n, int m)
          Write bits n to m of short 'd' to the telemetry stream
 void writeFrameNumber(int n)
          Write the telemetry frame number to the telemetry stream.
 void writeNumberOfBits(int n)
          Write the number of bits in the current frame to the telemetry stream.
 void writeNumberOfBytes(int n)
          Write the number of bytes in the current frame to the telemetry stream.
 void writeToTelemetry(TelemetryStream tmStream)
          Direct the object to write its own state to the telemetry stream.
 
Methods inherited from class RtjAocsFramework.BasicObjects.AocsObject
addConfigurationListener, addFailureListener, getAocsClock, getConfigurationListenerList, getCycle, getDestructionRecoveryAction, getFailureListenerList, getSystemManager, getTelemetryFormat, getTime, isConfigured, removeConfigurationListener, removeFailureListener, reportConfigurationEvent, reportFailure, reset, resetConfiguration, 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
 

Constructor Detail

TestTelemetryStream

public TestTelemetryStream(String outFileName)
Method Detail

writeToTelemetry

public void writeToTelemetry(TelemetryStream tmStream)
Description copied from interface: Telemeterable
Direct the object to write its own state to the telemetry stream.

Specified by:
writeToTelemetry in interface Telemeterable
Overrides:
writeToTelemetry in class AocsObject

getTelemetryImageLength

public int getTelemetryImageLength()
Description copied from interface: Telemeterable
Return the length (in bits) of the telemetry image of the object. This method is useful to verify that the quantity of data generated by a given object is compatible with the capacity of the telemetry channel.

Specified by:
getTelemetryImageLength in interface Telemeterable
Overrides:
getTelemetryImageLength in class AocsObject

writeFrameNumber

public void writeFrameNumber(int n)
Description copied from interface: TelemetryStream
Write the telemetry frame number to the telemetry stream. A telemetry frame is a set of telemetry data that are sent to the telemetry stream at the same time. The method is provided for the case when the telemetry frame number must be written to a particular location in the telemetry image.

Specified by:
writeFrameNumber in interface TelemetryStream
Parameters:
n - the telemetry frame number.

writeNumberOfBytes

public void writeNumberOfBytes(int n)
Description copied from interface: TelemetryStream
Write the number of bytes in the current frame to the telemetry stream. The method is provided for the case when the telemetry frame number must be written to a particular location in the telemetry image.

Specified by:
writeNumberOfBytes in interface TelemetryStream
Parameters:
n - the number of bytes in the current telemetry frame.

writeNumberOfBits

public void writeNumberOfBits(int n)
Description copied from interface: TelemetryStream
Write the number of bits in the current frame to the telemetry stream. The method is provided for the case when: a) the telemetry frame number must be written to a particular location in the telemetry image b) bits and bytes are written to separate locations.

Specified by:
writeNumberOfBits in interface TelemetryStream
Parameters:
n - the number of bits that were written using bit writing methods. The bit writing methods are those that write individual bits to the telemetry stream.

write

public void write(int address,
                  int n)
Description copied from interface: TelemetryStream
Write to telemetry stream n bytes starting from address 'address'

Specified by:
write in interface TelemetryStream

write

public void write(double d)
Description copied from interface: TelemetryStream
Write the double 'd' to the telemetry stream

Specified by:
write in interface TelemetryStream

write

public void write(float d)
Description copied from interface: TelemetryStream
Write the float 'd' to the telemetry stream

Specified by:
write in interface TelemetryStream

write

public void write(int d)
Description copied from interface: TelemetryStream
Write the integer 'd' to the telemetry stream

Specified by:
write in interface TelemetryStream

write

public void write(short d)
Description copied from interface: TelemetryStream
Write the short integer 'd' to the telemetry stream

Specified by:
write in interface TelemetryStream

write

public void write(boolean d)
Description copied from interface: TelemetryStream
Write the boolean 'd' to the telemetry stream

Specified by:
write in interface TelemetryStream

write

public void write(int d,
                  int n,
                  int m)
Description copied from interface: TelemetryStream
Write bits n to m of integer 'd' to the telemetry stream

Specified by:
write in interface TelemetryStream

write

public void write(short d,
                  int n,
                  int m)
Description copied from interface: TelemetryStream
Write bits n to m of short 'd' to the telemetry stream

Specified by:
write in interface TelemetryStream

write

public void write(byte d,
                  int n,
                  int m)
Description copied from interface: TelemetryStream
Write bits n to m of byte 'd' to the telemetry stream

Specified by:
write in interface TelemetryStream

flushBuffer

public void flushBuffer()
Description copied from interface: TelemetryStream
Flush the current telemetry frame to the telemetry stream

Specified by:
flushBuffer in interface TelemetryStream

resetBuffer

public void resetBuffer()
Description copied from interface: TelemetryStream
Reset the telemetry buffer

Specified by:
resetBuffer in interface TelemetryStream

getBufferSize

public int getBufferSize()
Description copied from interface: TelemetryStream
Return the size of the telemetry buffer in bytes

Specified by:
getBufferSize in interface TelemetryStream

setBufferSize

public void setBufferSize(int size)
Description copied from interface: TelemetryStream
Set the size of the telemetry buffer in bytes. This is an initialization method.

Specified by:
setBufferSize in interface TelemetryStream

finalize

protected void finalize()
Description copied from class: AocsObject
Report a failure if an AocsObject is destroyed.

By design, AOCS objects should never be destroyed. If they are, a failure event is generated by the object destructor.

Overrides:
finalize in class AocsObject

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