|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This service sets and observes the status of doors in the car.
right front door - 00001 ( 1)
left front door - 00010 ( 2)
right rear door - 00100 ( 4)
left rear door - 01000 ( 8)
trunk - 10000 (16)
A set bit within the given bitmask means the door is closed.
Field Summary | |
static int |
LEFT_BACK
|
static int |
LEFT_FRONT
|
static String |
PUBLISH_KEY
The path in the environment where the DoorAgent expects this
service to be published. |
static int |
REAR
|
static int |
RIGHT_BACK
|
static int |
RIGHT_FRONT
|
Method Summary | |
byte |
getStatus()
Returns current state, means the current position of all doors |
boolean |
isOpen(int which)
Returns true if door is open |
void |
setStatus(int newstate)
Sets the states of all doors. |
Field Detail |
public static final String PUBLISH_KEY
environment
where the DoorAgent
expects this
service to be published.
Value: /local/public/car/doors
public static final int RIGHT_FRONT
public static final int LEFT_FRONT
public static final int RIGHT_BACK
public static final int LEFT_BACK
public static final int REAR
Method Detail |
public byte getStatus()
public boolean isOpen(int which)
which
- number of the door to be checked. Use the
constants defined in DoorService
.
public void setStatus(int newstate)
newstate
- the new state status is set to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |