All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.arcsinc.hardwarehost.HdwCommImpl

java.lang.Object
   |
   +----com.arcsinc.hardwarehost.HdwCommImpl

public class HdwCommImpl
extends Object
implements HdwComm
The HdwCommImpl class implements communications with the hardware at the native layer.

See Also:
HdwComm, HdwHostImpl, PhysHdwCommImpl

Variable Index

 o DN_LD_COMPLETE
DN_LD_COMPLETE is "down load application is complete" indicator
 o DN_LD_PRG
DN_LD_PRG is download an application program.
 o GET_FLOAT
GET_FLOAT is get a float
 o GET_FLOAT_BLK
GET_FLOAT_BLK is get a contiguous block of floats
 o GET_FLOAT_BLK_PTR
GET_FLOAT_BLK_PT is get a contiguous block of floats pointed to
 o GET_FLOAT_PTR
GET_INT_PTR is get a float pointed to
 o GET_INT
GET_INT is get an integer
 o GET_INT_BLK
GET_INT_BLK is get a contiguous block of integers
 o GET_INT_BLK_PTR
GET_INT_BLK_PT is get a contiguous block of integers pointed to
 o GET_INT_PTR
GET_INT_PTR is get an integer pointed to
 o IS_CMD_VALID
IS_CMD_VALID queries if the previous command was valid
 o maxBlkLength
maxBlkLength is the maximum data length that can be transferred by a single command.
 o NO_OP
NO_OP is no operation
 o SET_FLOAT
SET_FLOAT is set a float
 o SET_FLOAT_BLK
SET_FLOAT_BLK is set a contiguous block of floats
 o SET_FLOAT_BLK_PTR
SET_FLOAT_BLK_PT is set a contiguous block of floats pointed to
 o SET_FLOAT_PTR
SET_INT_PTR is set a float pointed to
 o SET_INT
SET_INT is set an integer
 o SET_INT_BLK
SET_INT_BLK is set a contiguous block of integers
 o SET_INT_BLK_PTR
SET_INT_BLK_PT is set a contiguous block of integers guous block of integers pointed to
 o SET_INT_PTR
SET_INT_PTR is set an integer pointed to
 o START_PRG
START_PRG is start the application program
 o STOP_PRG
STOP_PRG is stop the application program

Constructor Index

 o HdwCommImpl(HdwHostImpl)
A construct which assume that no object will receive communication messages.
 o HdwCommImpl(HdwHostImpl, CommMessageRcvr)
A construct.

Method Index

 o announciateCommFail()
Provides a utility function for announcing a communicat for announcing a communications failure to the rest of the system.
 o announciateHdwFail()
Provides a utility function for announcing a hardware failure to the rest of the system.
 o downloadCode(int, int[], int[][])
Download code to the hardware.
 o finalize()
Standard destructor
 o getFloat(int)
Get a float at hardware memory location, address
 o getFloatBlock(int, int)
Get an array of floats starting at hardware memory location, address, with a range, blkLength.
 o getFloatBlock(int, int, boolean, int)
 o getFloatPtr(int, int)
Get a float
Get a float pointed to by the value at hardware memory location, address.
 o getInteger(int)
Get an integer at hardware memory location, address
 o getIntegerBlock(int, int)
Get an array of integers starting at hardware memory location, address, with a range, blkLength.
 o getIntegerBlock(int, int, boolean, int)
 o getIntegerPtr(int, int)
Get an integer pointed to by the value at hardware memory location, address.
 o getPhysHdw()
Get a reference to the PhysHdwCommImpl for this instance.
 o getVerifyMessages(int, int)
Provide a corresponding textual message for a call verifyComm
 o processCmd(HdwCmd)
Send the hdwCmd to the hardware, retrieve any expected return data.
 o rebootHdw()
Commands a hardware reboot.
 o setFloat(int, float)
Set a float at hardware memory location, address, with value, value.
 o setFloatBlock(int, float[])
Set an array of floats starting at hardware memory location, addcode>address, with value, value.
 o setFloatBlock(int, float[], boolean, int)
 o setFloatPtr(int, int, float)
Set a float pointed to by the value at hardware memory location, address, with value, value.
 o setInteger(int, int)
Set an integer at hardware memory location, address, with value, value.
 o setIntegerBlock(int, int[])
Set an array of integers starting at hardware memory location, address, with value, value.
 o setIntegerBlock(int, int[], boolean, int)
 o setIntegerPtr(int, int, int)
Set an integer pointed to by the value at hardware value at hardware memory location, address, with value, value.
 o verifyComm(int)
Provides a detailed test and verification of the communications with the hardware.

Variables

 o NO_OP
 public static final char NO_OP
NO_OP is no op NO_OP is no operation

 o START_PRG
 public static final char START_PRG
START_PRG is start the application program

 o STOP_PRG
 public static final char STOP_PRG
STOP_PRG is stop the application program

 o DN_LD_COMPLETE
 public static final char DN_LD_COMPLETE
DN_LD_COMPLETE is "down load application is complete" indicator

 o GET_INT
 public static final char GET_INT
GET_INT is get an integer

 o GET_FLOAT
 public static final char GET_FLOAT
GET_FLOAT is get a float

 o SET_INT
 public static final char SET_INT
SET_INT is set an integer

 o SET_FLOAT
 public static fino ">
SET_FLOAT
 public static final char SET_FLOAT
SET_FLOAT is set a float

 o GET_INT_PTR
 public static final char GET_INT_PTR
GET_INT_PTR is get an integer pointed to

 o GET_FLOAT_PTR
 public static final char GET_FLOAT_PTR
GET_INT_PTR is get a float pointed to

 o SET_INT_PTR
 public static final char SET_INT_PTR
SET_INT_PTR is set an integer pointed to

 o SET_FLOAT_PTR
 public static final char SET_FLOAT_PTR
SET_INT_PTR is set a float pointed to

 o IS_CMD_VALID
 public static final char IS_CMD_VALID
IS_CMD_VALID queries if the previous command was valid

 o GET_INT_BLK
 public static final char GET_INT_BLK
GET_INT_BLK is get a contiguous block of integers

 o GET_FLOAT_BLK
 public static final char GET_FLOAT_BLK
GET_FLOAT_BLK is get a contiguous block of floats

 o SET_INT_BLK
 public static final char SET_INT_BLK
SET_INT_BLK is set a contiguous block of integers

 o SET_FLOAT_BLK
 public static final char SET_FLOAT_BLK
SET_FLOAT_BLK is set a contiguous block of floats

 o GET_INT_BLK_PTR
 public static final char GET_INT_BLK_PTR
GET_INT_BLK_PT is get a contiguous block of integers pointed to

 o GET_FLOAT_BLK_PTR
 public static final char GET_FLOAT_BLK_PTR

GET_FLOAT_BLK_PT is get a contiguous block of floats pointed to

 o SET_INT_BLK_PTR
 public static final char SET_INT_BLK_PTR
SET_INT_BLK_PT is set a contiguous block of integers pointed to

 o SET_FLOAT_BLK_PTR
 public static final char SET_FLOAT_BLK_PTR
SET_FLOAT_BLK_PT is set a contiguous block of floats pointed to

 o DN_LD_PRG
 public static final char DN_LD_PRG
DN_LD_PRG is download an application program.

 o maxBlkLength
 protected static int maxBlkLength
maxBlkLength is the maximum data length that can be transferred by a single command.

Constructors

 o HdwCommImpl
 public HdwCommImpl(HdwHostImpl hdwHost)
A construct which assume that no object will receive communication messages.

Parameters:
hdwHost - the hardware host object.
 o HdwCommImpl
 public HdwCommImpl(HdwHostImpl hdwHostl hdwHost,
                    CommMessageRcvr messageRcvr)
A construct.

Parameters:
hdwHost - the hardware host object.
messageRcvr - an object which will receive communication messages.

Methods

 o finalize
 public void finalize()
Standard destructor

Overrides:
finalize in class Object
 o getPhysHdw
 public PhysHdwCommImpl getPhysHdw()
Get a reference to the PhysHdwCommImpl for this instance.

Returns:
the PhysHdwCommImpl for this
 o announciateHdwFail
 public void announciateFail
 public void announciateHdwFail()
Provides a utility function for announcing a hardware failure to the rest of the system.

 o announciateCommFail
 public void announciateCommFail()
Provides a utility function for announcing a communications failure to the rest of the system.

 o rebebootHdw">rebootHdw
 public synchronized boolean rebootHdw()
Commands a hardware reboot.

Returns:
true if successfully completed.
 o verifyComm
 public synchronized int verifyComm(int level)
Provides a detailed test and verification of the communications with the hardware.

Parameters:
level - level of the diagnostic
Returns:
the number of attempts for success or a failure/diagnostic code.
 o getVerifyMessages
 public String[] getVerifyMessages(int level,
                                   int code)
Provide a corresponding textual message for a call verifyComm

Parameters:
level - passed to verifyComm
code - returned from verifyComm
Returns:
message
 o setInteger setInteger
 public synchronized void setInteger(int address,
                                     int value)
Set an integer at hardware memory location, address, with value, value.

Parameters:
address - memory location
value - value to be set
 o getInteger
 public synchronized int getInteger(int address)
Get an integer at hardware memory location, address

Parameters:
address - memory location
Returns:
its value
 o setIntegerPtr
 public synchronized void setIntegerPtr(int address,
                                        int offset,
                                        int value)
Set an integer pointed to by the value at hardware memory location, address, with value, value.

Parameters:
address - pointer memory location
offset - an additional offset to the pointer value.
value - value to be set
 o getIntegerPtr
 public synchronized int getIntegerPtr(int address,
                                       int offset)
Get an integer pointed to by the value at hardware memory location, address.

Parameters:
address - pointer memory location
offset - an additional offset to the pointer value.
Returns:
lue.
Returns:
its value
 o setIntegerBlock
 public synchronized void setIntegerBlock(int address,
                                          int values[])
Set an array of integers starting at hardware memory location, address, with value, value.

Parameters:
address - starting memory location
values - values to be set
be set
 o setIntegerBlock
 protected void setIntegerBlock(int address,
                                int values[],
                                boolean ptr,
                                int offset)
 o getIntegerBlock
 public synchronized int[] getIntegerBlock(int address,
                                           int blkLength)
Get an array of integers starting at hardware memory location, address, with a range, blkLength.

Parameters:
address - starting memory location
blkLength - number of locations to be retrieved
Returns:
values
 o getIntegerBlock
 protected int[] getIntegerBlock(int address,
                                 int blkLength,
                                 boolean ptr,
                                 int offset)
 o setFloat
 public synchronized void setFloat(int address,
                                   float value)
Set a float at hardware memory location, address, with value, value.

Parameters:
address - memory location
value - value to be set
 o getFloat
 public syn
 public synchronized float getFloat(int address)
Get a float at hardware memory location, address

Parameters:
address - memory location
Returns:
its value
 o setFloatPtr
 public synchronized void setFloatPtr(int address,
                                      int offset,
                                      float value)
Set a float pointed to by the value at hardware memory location, address, with value, value.

Parameters:
address - pointer memory location
offset - an additional offset to the pointer value.
value - value to be set
 o getFloatPtr
 public synchronized float getFloatPtr(int address,
                                       int offset)
Get a float pointed to by the value at hardware memory location, address.

Parameters:
address - pointer memory location
offset - an additional offset to the pointer value. dditional offset to the pointer value.
Returns:
its value
 o setFloatBlock
 public synchronized void setFloatBlock(int address,
                                        float values[])
Set an array of floats starting at hardware memory location, address, with value, value.

Parameters:
address - starting memory location
values - v
values - values to be set
 o setFloatBlock
 protected void setFloatBlock(int address,
                              float values[],
                              boolean ptr,
                              int offset)
 o getFloatBlock
 public synchronized float[] getFloatBlock(int address,
                                           int blkLength)
Get an array of floats starting at hardware memory location, address, with a range, blkLength.

Parameters:
address - starting memory location
range - number of locations to be retrieved
Returns:
values
 o getFloatBlock
 protected float[] getFloatBlock(int address,
                                 int blkLength,
                                 boolean ptr,
                                 int offset)
 o downloadCode
 public synchronized void downloadCode(int entryPtr,
                                       int sectionAddr[],
                                       int sectionData[][])
Download code to the hardware.

Parameters:
entryPtr - starting address for code execution
sectionAddr - starting address for each loadable section of the application
sectionData - each loadable section
dl>  o processCmd
 public synchronized void processCmd(HdwCmd hdwCmd)
Send the hdwCmd to the hardware, retrieve any expected return data.

Parameters:
hdwCmd - the command

All Packages  Class Hierarchy  This Package  Previous  Next  Index