examples.carcontrol
Interface WindowService

All Known Implementing Classes:
WindowServiceImpl

public interface WindowService

This service provides control and status of windows in the car.


Field Summary
static int LEFT_BACK
           
static int LEFT_FRONT
           
static String PUBLISH_KEY
          The path in the environment where the LockAgent expects this service to be published.
static int RIGHT_BACK
           
static int RIGHT_FRONT
           
 
Method Summary
 void down(int which)
          Lowers a window and changes current state.
 byte getStatus()
          Returns current state of all windows.
 boolean isLowered(int which)
           
 void setStatus(int newstate)
          Sets the states of all doors.
 void up(int which)
          Raises a window and changes current state.
 

Field Detail

PUBLISH_KEY

public static final String PUBLISH_KEY
The path in the environment where the LockAgent expects this service to be published.

Value: /local/public/car/windows

See Also:
Constant Field Values

RIGHT_FRONT

public static final int RIGHT_FRONT
See Also:
Constant Field Values

LEFT_FRONT

public static final int LEFT_FRONT
See Also:
Constant Field Values

RIGHT_BACK

public static final int RIGHT_BACK
See Also:
Constant Field Values

LEFT_BACK

public static final int LEFT_BACK
See Also:
Constant Field Values
Method Detail

up

public void up(int which)
Raises a window and changes current state.

Parameters:
which - number of the window to be opened or closed Use the constants defined in WindowService.

down

public void down(int which)
Lowers a window and changes current state.

Parameters:
which - number of the window to be opened or closed Use the constants defined in WindowService.

isLowered

public boolean isLowered(int which)
Returns:
true if a specific window is lowered

getStatus

public byte getStatus()
Returns current state of all windows.

Returns:
The first four bits of the byte represent the windows. When a window is closed, its according bit is set. If state = 0, all bits are zero, means all windows are lowered

setStatus

public void setStatus(int newstate)
Sets the states of all doors. JUST FOR TESTING PURPOSES

Parameters:
newstate - the new state status is set to.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.