|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.fs.Frames
class Frames
This class manages a sequential list of frames. When given a Buffer, it uses it to fill frames, advancing to the next frame or creating one when necessary. It resets the annotation on any frame it fills, but it does not set set annotation fields.
This class reuses its Frame objects, so subsequent users must not cache frames.
Nested Class Summary | |
---|---|
(package private) class |
Frames.FrameCaddy
This class holds a Frame and is responsible for filling it with data. |
Field Summary | |
---|---|
private Frames.FrameCaddy |
caddy
|
private Frame |
currentFrame
|
private int |
currentFrameIndex
|
private int |
frameLength
|
private java.util.ArrayList<Frame> |
frames
|
Constructor Summary | |
---|---|
Frames(int frameLength)
Create a Frames object. |
Method Summary | |
---|---|
(package private) int |
copyBufferToFrame(Buffer buffer,
boolean invert)
Copy as much of buffer as needed or as possible to fill the current frame. |
(package private) void |
flushAllData()
Reset the frame list so it contains no full or partial frames. |
(package private) void |
flushCompleteFrames()
Remove all complete frames from the list but keep the last partial frame if it exists. |
(package private) FrameAnnotation |
getCurrentFrameAnnotation()
Get the FrameAnnotation object from the current frame. |
(package private) Frame[] |
getFrameList()
Get a list of complete frames in time order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int frameLength
private java.util.ArrayList<Frame> frames
private Frame currentFrame
private int currentFrameIndex
private Frames.FrameCaddy caddy
Constructor Detail |
---|
Frames(int frameLength)
frameLength
- The frame length in bytes. All frames must have the
same length.Method Detail |
---|
void flushAllData()
void flushCompleteFrames()
Frame[] getFrameList()
FrameAnnotation getCurrentFrameAnnotation()
int copyBufferToFrame(Buffer buffer, boolean invert)
buffer
- The buffer to copy to the frameinvert
- If true, invert the buffer's bits while copying
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |