cradle.js contains the methods necessary to interact with the cradle. It also contains the event constants necessary to register for cradle events.
Field Summary | |
static java.lang.String |
EVENT_CRADLE_CHANGE
The event constant used to register for the onCradleChange event |
static int |
SLOT_REPAIR_CLEARED
The primary and backup areas were corrupt. |
static int |
SLOT_REPAIR_FAILED
The repair operation failed. |
static int |
SLOT_REPAIR_PRIMARY_RESTORED
The slot information repair operation restored the primary area from the backup. |
static int |
SLOT_REPAIR_PRIMARY_VALID
The slot information repair operation was unnecessary. |
Method Summary | |
int |
getRackLocation()
Obtains the current or last known rack location |
int |
getRackNumber()
Obtains the current or last known rack number |
int |
getSlotNumber()
Obtains the current or last known slot number |
int |
getStoreNumber()
Obtains the current or last known store number |
boolean |
isCradled()
|
void |
onCradleChange(java.lang.String slotNumber,
java.lang.String rackNumber,
java.lang.String rackLocation,
java.lang.String storeNumber)
This is the prototype for an event. |
boolean |
setRackLocation(int n)
Sets the rack location value of the current cradle (valid values 1-0xfe). |
boolean |
setRackNumber(int n)
Sets the rack number of the current cradle (valid values 1-0xfe). |
boolean |
setSlotNumber(int n)
Sets the slot number of the current cradle (valid values 1-9). |
boolean |
setStoreNumber(int n)
Sets the store number of the current cradle (valid values 1-0xfffe). |
int |
slotInformationRepair()
If the slot information is in error, this method can be used to restore the slot information areas. |
Field Detail |
public static final int SLOT_REPAIR_PRIMARY_VALID
public static final int SLOT_REPAIR_PRIMARY_RESTORED
public static final int SLOT_REPAIR_CLEARED
public static final int SLOT_REPAIR_FAILED
public static final java.lang.String EVENT_CRADLE_CHANGE
basic.registerForEvent(String)
,
Constant Field ValuesMethod Detail |
public int slotInformationRepair()
SLOT_REPAIR_PRIMARY_VALID
,
SLOT_REPAIR_PRIMARY_RESTORED
,
SLOT_REPAIR_CLEARED
,
SLOT_REPAIR_FAILED
public void onCradleChange(java.lang.String slotNumber, java.lang.String rackNumber, java.lang.String rackLocation, java.lang.String storeNumber)
slotNumber
- the slot number into which the tablet has been docked. Empty string when the tablet leaves the cradle/slot.rackNumber
- the rack number into which the tablet has been docked. Empty string when the tablet leaves the cradle/slot.rackLocation
- the location of the rack into which the tablet has been docked. Empty string when the tablet leaves the cradle/slot.storeNumber
- the store number of the rack into which the tablet has been docked. Empty string when the tablet leaves the cradle/slot.EVENT_CRADLE_CHANGE
Host Application | (TBD) |
Host Applet | (TBD) |
Message Classes | (TBD) |
public boolean isCradled()
public int getSlotNumber()
public int getRackNumber()
public int getRackLocation()
public int getStoreNumber()
public boolean setSlotNumber(int n)
n
- The slot number to program
isCradled()
public boolean setRackNumber(int n)
n
- The rack number to program
isCradled()
public boolean setRackLocation(int n)
n
- The rack location to program
isCradled()
public boolean setStoreNumber(int n)
n
- The store number to program
isCradled()