|
Real-Time Java AOCS Framework v1.0 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--RtjAocsFramework.BasicObjects.RootObject
|
+--RtjAocsFramework.BasicObjects.AocsObject
|
+--JbedSmmApplication.TelemetryManagement.JbedSmmTelemetryStream
Implement the telemetry stream for the Jbed SMM application. The telemetry data are written to an integer array buffer which is called "the TM Buffer". Boolean variables are encoded as usual with 1 being true and 0 being false. Floating point variables are multiplied by a scaling factor and then converted to integer. A saturation check is introduced to prevent overflow. The telemetry stream internally maintains two TM buffers: the active buffer and the idle buffer. The active buffer is the buffer that is being filled in with telemetry data. The idel buffer is available for forwarding to the telemetry channel. The telemetry stream toggles between the active and idle buffers: After the active buffer has been filled, it becomes the idle buffer and the idle buffer becomes the active buffer.
The telemetry stream maintains a frame counter that is initialized to zero and is incremented by one every time a TM buffer has been completely filled.
The layout of a TM buffer that has been filled is as follows: element [0] contains the number of items N written to the buffer; element [1] contains the frame number; [2..N+1] contain the TM data written to the buffer by the telemetry manager. Change Record:
IntArray
to encapsulate an array. Removed one unnecessary 'import' statement. Changed calls to
method setSize on class IntArray to calls to method
setArraySize. Removed all dependencies on JbedSmmConfiguration.
Done on 26.03.03isConfigured modified to include a check on
tmScalingFactor. Done on 13.05.03
| Field Summary |
| Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable |
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM |
| Constructor Summary | |
JbedSmmTelemetryStream()
Create an application specific telemetry stream. |
|
| Method Summary | |
void |
flushBuffer()
Toggle the active and idle buffers. |
int |
getBufferLength()
Returns a number of items stored in the active TM buffer. |
int |
getBufferSize()
Returns the length of the TM buffer in bytes. |
IntArray |
getIdleBuffer()
Get the idle buffer. |
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. |
int |
getTmScalingFactor()
Get the scaling factor for the telemetry data. |
boolean |
isConfigured()
Checks that the TM buffers have been initialized. |
void |
resetBuffer()
Reset the item counter, increment the frame counter and initializes the active buffer with the frame number. |
int |
scale(double val)
Transform the argument into an integer suitable for storing in the TM buffer. |
int |
scale(float val)
Transform the argument into an integer suitable for storing in the TM buffer. |
void |
setBufferSize(int bufferSize)
This method initializes the size of the TM buffers. |
void |
setIdleBuffer(IntArray newIdleBuffer)
Set the idle buffer. |
void |
setTmScalingFactor(int s)
Set the scaling factor for the telemetry data. |
void |
write(boolean data)
Write the boolean 'data' to the telemetry stream |
void |
write(byte d,
int n,
int m)
Write bits n to m of byte 'd' to the telemetry stream This method is required by the TelemetryStream interface but has a dummy implementation in th case of Jbed SMM application. |
void |
write(double data)
Write the double 'data' to the telemetry stream |
void |
write(float data)
Write the float 'data' to the telemetry stream |
void |
write(int data)
Write the integer 'd' to the telemetry stream |
void |
write(int address,
int n)
Write to telemetry stream n bytes starting from address 'address' This method is required by the TelemetryStream interface but has a dummy implementation in th case of Jbed SMM application. |
void |
write(int d,
int n,
int m)
Write bits n to m of integer 'd' to the telemetry stream This method is required by the TelemetryStream interface but has a dummy implementation in th case of Jbed SMM application. |
void |
write(short data)
Write the short integer 'data' to the telemetry stream |
void |
write(short d,
int n,
int m)
Write bits n to m of short 'd' to the telemetry stream This method is required by the TelemetryStream interface but has a dummy implementation in th case of Jbed SMM application. |
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)
Causes the object to write its own state to the telemetry stream. |
| 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 |
public JbedSmmTelemetryStream()
| Method Detail |
public boolean isConfigured()
isConfigured in interface ConfigurableisConfigured in class AocsObjectpublic void setIdleBuffer(IntArray newIdleBuffer)
public IntArray getIdleBuffer()
public void writeFrameNumber(int n)
writeFrameNumber in interface TelemetryStreamn - the telemetry frame number.public void writeNumberOfBytes(int n)
writeNumberOfBytes in interface TelemetryStreamn - the number of bytes in the current telemetry frame.public void writeNumberOfBits(int n)
writeNumberOfBits in interface TelemetryStreamn - 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.
public void write(int address,
int n)
write in interface TelemetryStreampublic void write(double data)
write in interface TelemetryStreampublic void write(float data)
write in interface TelemetryStreampublic void write(int data)
write in interface TelemetryStreampublic void write(short data)
write in interface TelemetryStreampublic void write(boolean data)
write in interface TelemetryStream
public void write(int d,
int n,
int m)
write in interface TelemetryStream
public void write(short d,
int n,
int m)
write in interface TelemetryStream
public void write(byte d,
int n,
int m)
write in interface TelemetryStreampublic void flushBuffer()
flushBuffer in interface TelemetryStreampublic void resetBuffer()
resetBuffer in interface TelemetryStreampublic void setTmScalingFactor(int s)
s - the telemetry scaling factorscale(float)public int getTmScalingFactor()
scale(float)public void setBufferSize(int bufferSize)
setBufferSize in interface TelemetryStreampublic int getBufferSize()
getBufferSize in interface TelemetryStreampublic int getBufferLength()
public void writeToTelemetry(TelemetryStream tmStream)
writeToTelemetry in interface TelemeterablewriteToTelemetry in class AocsObjectpublic int getTelemetryImageLength()
getTelemetryImageLength in interface TelemeterablegetTelemetryImageLength in class AocsObjectpublic int scale(float val)
public int scale(double val)
|
Real-Time Java AOCS Framework v1.0 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||