Package org.osgi.service.enocean
Interface EnOceanHost
-
public interface EnOceanHost
This interface represents an EnOcean Host, a device that offers EnOcean networking features.- Author:
- $Id: 5cb1aa6ca0176904c533f012cc59342ecce3f05d $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Object
HOST_ID
The unique ID for this Host: this matches the CHIP_ID of the EnOcean Gateway Chip it embodies.static int
REPEATER_LEVEL_OFF
repeater level to disable repeating; this is the default.static int
REPEATER_LEVEL_ONE
repeater level to repeat every telegram at most once.static int
REPEATER_LEVEL_TWO
repeater level to repeat every telegram at most twice.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
apiVersion()
Returns the chip's API version info (cf.java.lang.String
appVersion()
Returns the chip's application version info (cf.int
getBaseID()
Gets the BASE_ID of the chip, if set (cf.int
getChipId(java.lang.String servicePID)
Retrieves the CHIP_ID associated with the given servicePID, if existing on this chip.int
getRepeaterLevel()
Gets the current repeater level of the host (cf.void
reset()
Reset the EnOcean Host (cf.void
setBaseID(int baseID)
Sets the base ID of the device, may be used up to 10 times (cf.void
setRepeaterLevel(int level)
Sets the repeater level on the host (cf.
-
-
-
Field Detail
-
HOST_ID
static final java.lang.Object HOST_ID
The unique ID for this Host: this matches the CHIP_ID of the EnOcean Gateway Chip it embodies.
-
REPEATER_LEVEL_OFF
static final int REPEATER_LEVEL_OFF
repeater level to disable repeating; this is the default.- See Also:
- Constant Field Values
-
REPEATER_LEVEL_ONE
static final int REPEATER_LEVEL_ONE
repeater level to repeat every telegram at most once.- See Also:
- Constant Field Values
-
REPEATER_LEVEL_TWO
static final int REPEATER_LEVEL_TWO
repeater level to repeat every telegram at most twice.- See Also:
- Constant Field Values
-
-
Method Detail
-
reset
void reset() throws EnOceanException
Reset the EnOcean Host (cf. ESP3 command 0x02: CO_WR_RESET)- Throws:
EnOceanException
- if any problem occurs.
-
appVersion
java.lang.String appVersion() throws EnOceanException
Returns the chip's application version info (cf. ESP3 command 0x03: CO_RD_VERSION)- Returns:
- a String object containing the application version info.
- Throws:
EnOceanException
- if any problem occurs.
-
apiVersion
java.lang.String apiVersion() throws EnOceanException
Returns the chip's API version info (cf. ESP3 command 0x03: CO_RD_VERSION)- Returns:
- a String object containing the API version info.
- Throws:
EnOceanException
- if any problem occurs.
-
getBaseID
int getBaseID() throws EnOceanException
Gets the BASE_ID of the chip, if set (cf. ESP3 command 0x08: CO_RD_IDBASE)- Returns:
- the BASE_ID of the device as defined in EnOcean specification
- Throws:
EnOceanException
- if any problem occurs.
-
setBaseID
void setBaseID(int baseID) throws EnOceanException
Sets the base ID of the device, may be used up to 10 times (cf. ESP3 command 0x07: CO_WR_IDBASE)- Parameters:
baseID
- to be set.- Throws:
EnOceanException
- if any problem occurs.
-
setRepeaterLevel
void setRepeaterLevel(int level) throws EnOceanException
Sets the repeater level on the host (cf. ESP3 command 0x09: CO_WR_REPEATER)- Parameters:
level
- one of the Repeater Level constants as defined above.- Throws:
EnOceanException
- if any problem occurs.
-
getRepeaterLevel
int getRepeaterLevel() throws EnOceanException
Gets the current repeater level of the host (cf. ESP3 command 0x0A: CO_RD_REPEATER)- Returns:
- one of the Repeater Level constants as defined above.
- Throws:
EnOceanException
- if any problem occurs.
-
getChipId
int getChipId(java.lang.String servicePID) throws EnOceanException
Retrieves the CHIP_ID associated with the given servicePID, if existing on this chip.- Parameters:
servicePID
-- Returns:
- the associated CHIP_ID of the exported device.
- Throws:
EnOceanException
- if any problem occurs.
-
-