public class Frame
extends Object
Block| Constructor and Description | 
|---|
Frame(Series series,
     int address)
Creates a new configuration frame based on the provides series and address 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
copyWords(Frame frame)
Copies all frame data into this frame. 
 | 
int | 
getAddress()
Gets the frame address within the configuration. 
 | 
int | 
getBit(int index)
Gets the bit value at the specified index within the frame. 
 | 
List<BitLocation> | 
getDiff(Frame otherFrame)
Examines another frame for differences and reports them as a list of
  
BitLocation objects. | 
Series | 
getSeries()
Gets the series based on the number of word allocated in the frame. 
 | 
int[] | 
getWords()
Gets the linear array of integer words where the bits of the frame data are
 stored. 
 | 
static int | 
getWordsPerFrame(Series series)
Gets the number of words in a frame of the provided Series 
 | 
boolean | 
isBitIndexECC(int bitIdx)
Checks if the current bit index corresponds to an ECC bit 
 | 
void | 
setAddress(int address)
Sets the frame address for this frame. 
 | 
boolean | 
setBit(int index,
      int value)
Sets the bit at the provided index to the specified value. 
 | 
void | 
setWords(int[] words)
Updates the linear array of integer words in the frame. 
 | 
void | 
toggleBit(int index)
Toggles or flips the bit stored at the location index within the frame. 
 | 
String | 
toString()  | 
String | 
toString(boolean printData)
Creates a formatted string of the frame and optionally data in the frame (hex
 words) 
 | 
void | 
updateECCBits()
Updates the ECC bits based on the current frame contents 
 | 
public Frame(Series series, int address)
series - The series to use to template the frame (appropriate size,
                etc)address - The address to which this frame correspondspublic static int getWordsPerFrame(Series series)
series - The Series of interestpublic int[] getWords()
public void setWords(int[] words)
words - The desired words to be stored in the framepublic boolean copyWords(Frame frame)
frame - The source frame from which to copy the data.public int getAddress()
public void setAddress(int address)
address - The address to set for this framepublic boolean setBit(int index,
                      int value)
index - Index of the desired bit to set.value - The desired value (0 or 1) to set.public void toggleBit(int index)
index - Index of the bit to flip.public int getBit(int index)
index - Index of the desired bitpublic Series getSeries()
public String toString()
toString in class Objectpublic String toString(boolean printData)
printData - flag indicating if the frame data should be added to the
                  Stringpublic void updateECCBits()
public boolean isBitIndexECC(int bitIdx)
bitIdx - The desired bit index to querypublic List<BitLocation> getDiff(Frame otherFrame)
BitLocation objects.otherFrame - The other frame to check against