public class FAR
extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BOT_HALF
The encoding in the FAR for an address to be specified in the bottom half of
the device (Series 7 only)
|
static int |
TOP_HALF
The encoding in the FAR for an address to be specified in the top half of the
device (Series 7 only)
|
Constructor and Description |
---|
FAR(ConfigArray configArray)
Creates a new frame address register object
|
Modifier and Type | Method and Description |
---|---|
int |
getBlockAddress()
Gets the current FAR address of the current block.
|
static int |
getBlockAddress(int farAddress,
Series series)
Gets the unique block address for the given FAR address.
|
int |
getBlockType()
Gets the current integer block type of the current address the FAR points
to
|
static int |
getBlockType(int farAddress,
Series s)
Extracts the block type from a 32-bit FAR address.
|
int |
getColumn()
Gets the current column to which the FAR address is currently set
|
static int |
getColumnAddress(int farAddress,
Series s)
Extracts the column address from a 32-bit FAR address.
|
ConfigArray |
getConfigArray()
Gets the current config array associated with the FAR
|
Block |
getConfigBlock()
Gets the configuration block from current FAR address, assumes a single SLR
or SLR with config order 0.
|
Block |
getConfigBlock(int slrCfgOrder)
Gets the configuration block from current FAR address.
|
int |
getCurrentFAR()
Gets the current address of the FAR object.
|
Device |
getDevice()
Gets the current device associated with this FAR
|
static int |
getFARConfigRowIndex(Tile tile)
Gets the FAR row index based on the the tile's clock region.
|
int |
getMinor()
Gets the minor frame address to which the FAR address is currently set
|
static int |
getMinorAddress(int farAddress,
Series s)
Extracts the minor address frame index from a 32-bit FAR address.
|
int |
getRow()
Gets the current row to which the FAR address is currently set
|
static int |
getRowAddress(int farAddress,
Series s)
Extracts the row address from a 32-bit FAR address.
|
Series |
getSeries()
Gets the target series of this FAR
|
static int |
getTopBot(Tile tile)
Gets the top/bottom bit for a particular tile by looking at the config row
and SLR.
|
int |
getTopBotBit()
Gets the top/bottom bit from the current address set in this FAR (only
relevant for Series 7 devices)
|
static int |
getTopBotBit(int farAddress,
Series s)
For Series 7 devices, it returns the top or bottom bit.
|
boolean |
hasTopBotBit()
Checks if the FAR has a top/bottom bit field (only relevant for Series 7
devices)
|
int |
incrementFAR()
Gets the next valid FAR address in the device given the current address.
|
boolean |
isFirstFrameInRow()
Checks if the FAR is currently pointing at the first frame in the config row
|
boolean |
isLastFrameInRow()
Checks if the FAR is currently pointing at the last frame in the config row
|
void |
setBlockType(int blockType)
Updates the current address the FAR address to point to the block type
provided
|
void |
setColumn(int col)
Updates the current column to which the FAR address is currently set
|
void |
setConfigArray(ConfigArray configArray)
Sets the current config array associated with this FAR
|
boolean |
setFAR(int address)
Sets the FAR object to the specified address.
|
void |
setMinor(int minor)
Updates the minor frame address to which the FAR address is currently set
|
void |
setRow(int row)
Updates the current row to which the FAR address is currently set
|
void |
setTopBotBit(int topBotBit)
Updates the top/bottom bit from the current address set in this FAR (only
relevant for Series 7 devices)
|
String |
toString() |
public static final int TOP_HALF
public static final int BOT_HALF
public FAR(ConfigArray configArray)
configArray
- The corresponding config array for which the FAR can
addresspublic int getBlockType()
public void setBlockType(int blockType)
blockType
- The desired block type to set within the FAR addresspublic int getRow()
public void setRow(int row)
row
- The desired config rowpublic int getColumn()
public void setColumn(int col)
col
- The desired config columnpublic int getMinor()
public void setMinor(int minor)
minor
- The desired minor frame indexpublic Device getDevice()
public void setConfigArray(ConfigArray configArray)
configArray
- The desired config array for this FARpublic ConfigArray getConfigArray()
public Series getSeries()
public boolean setFAR(int address)
address
- The desired FAR address to set.public int getCurrentFAR()
public int incrementFAR()
public Block getConfigBlock()
public Block getConfigBlock(int slrCfgOrder)
slrCfgOrder
- The config order index of the SLR of the block to getpublic String toString()
toString
in class Object
public boolean hasTopBotBit()
public int getTopBotBit()
public void setTopBotBit(int topBotBit)
topBotBit
- The desired top/bottom bit in the FAR.public static int getMinorAddress(int farAddress, Series s)
farAddress
- The full 32-bit FAR addresss
- The series of the device being targetedpublic static int getColumnAddress(int farAddress, Series s)
farAddress
- The full 32-bit FAR addresss
- The series of the device being targetedpublic static int getRowAddress(int farAddress, Series s)
farAddress
- The full 32-bit FAR addresss
- The devices series this FAR address targetspublic static int getTopBotBit(int farAddress, Series s)
farAddress
- The full 32-bit FAR addresss
- The devices series this FAR address targetspublic static int getBlockType(int farAddress, Series s)
farAddress
- The full 32-bit FAR addresss
- The series of the device being targetedpublic int getBlockAddress()
public static int getBlockAddress(int farAddress, Series series)
farAddress
- The FAR addressseries
- The series of the target devicepublic static int getTopBot(Tile tile)
tile
- The tile in the device of interest.public static int getFARConfigRowIndex(Tile tile)
tile
- The tile of interestpublic boolean isLastFrameInRow()
public boolean isFirstFrameInRow()