Package org.osgi.service.enocean
Interface EnOceanDevice
-
public interface EnOceanDeviceThis interface represents a physical device that communicates over the EnOcean protocol.- Author:
- $Id: 93ab66783daf739ccd92210cd704eaea799ffc10 $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCHIP_IDProperty name for the mandatory CHIP_ID of the devicestatic java.lang.StringDEVICE_CATEGORYProperty name for the mandatory DEVICE_CATEGORY of the devicestatic java.lang.StringENOCEAN_EXPORTProperty name that defines if the device is exported or not.static java.lang.StringFUNCProperty name for the radiotelegram functional type of the profile associated with this device.static java.lang.StringMANUFACTURERProperty name for the manufacturer ID that may be specified by some teach-in messages.static java.lang.StringRORGProperty name for the radiotelegram main type of the profile associated with this device.static java.lang.StringSECURITY_LEVEL_FORMATProperty name for the security level mask for this device.static java.lang.StringTYPEProperty name for the radiotelegram subtype of the profile associated with this device.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetChipId()byte[]getEncryptionKey()Returns the current encryption key used by this device.intgetFunc()int[]getLearnedDevices()Gets the list of devices the device already has learned.intgetManufacturer()intgetRollingCode()Get the current rolling code of the device.intgetRorg()java.util.Map<java.lang.Integer,java.lang.Integer[]>getRPCs()Retrieves the currently available RPCs to this device; those are stored using their manfufacturerId:commandId identifiers.intgetSecurityLevelFormat()intgetType()voidinvoke(EnOceanRPC rpc, EnOceanHandler handler)Sends an RPC to the remote device.voidremove()Removes the device's OSGi service from OSGi service platform.voidsetEncryptionKey(byte[] key)Sets the encryption key of the device.voidsetFunc(int func)Manually sets the EEP FUNC of the device.voidsetLearningMode(boolean learnMode)Switches the device into learning mode.voidsetRollingCode(int rollingCode)Sets the rolling code of this device.voidsetType(int type)Manually sets the EEP TYPE of the device.
-
-
-
Field Detail
-
DEVICE_CATEGORY
static final java.lang.String DEVICE_CATEGORY
Property name for the mandatory DEVICE_CATEGORY of the device- See Also:
- Constant Field Values
-
CHIP_ID
static final java.lang.String CHIP_ID
Property name for the mandatory CHIP_ID of the device- See Also:
- Constant Field Values
-
RORG
static final java.lang.String RORG
Property name for the radiotelegram main type of the profile associated with this device.- See Also:
- Constant Field Values
-
FUNC
static final java.lang.String FUNC
Property name for the radiotelegram functional type of the profile associated with this device.- See Also:
- Constant Field Values
-
TYPE
static final java.lang.String TYPE
Property name for the radiotelegram subtype of the profile associated with this device.- See Also:
- Constant Field Values
-
MANUFACTURER
static final java.lang.String MANUFACTURER
Property name for the manufacturer ID that may be specified by some teach-in messages.- See Also:
- Constant Field Values
-
SECURITY_LEVEL_FORMAT
static final java.lang.String SECURITY_LEVEL_FORMAT
Property name for the security level mask for this device. The format of that mask is specified in EnOcean Security Draft.- See Also:
- Constant Field Values
-
ENOCEAN_EXPORT
static final java.lang.String ENOCEAN_EXPORT
Property name that defines if the device is exported or not. If present, the device is exported.- See Also:
- Constant Field Values
-
-
Method Detail
-
getChipId
int getChipId()
- Returns:
- The EnOcean device chip ID.
-
getRorg
int getRorg()
- Returns:
- The EnOcean profile RORG.
-
getFunc
int getFunc()
- Returns:
- The EnOcean profile FUNC, or -1 if unknown.
-
getType
int getType()
- Returns:
- The EnOcean profile TYPE, or -1 if unknown.
-
getManufacturer
int getManufacturer()
- Returns:
- The EnOcean manufacturer code, -1 if unknown.
-
getSecurityLevelFormat
int getSecurityLevelFormat()
- Returns:
- The EnOcean security level format, or 0 as default (no security)
-
setFunc
void setFunc(int func)
Manually sets the EEP FUNC of the device.- Parameters:
func- the EEP func of the device;
-
setType
void setType(int type)
Manually sets the EEP TYPE of the device.- Parameters:
type- the EEP type of the device;
-
setLearningMode
void setLearningMode(boolean learnMode)
Switches the device into learning mode.- Parameters:
learnMode- the desired state: true for learning mode, false to disable it.
-
getRollingCode
int getRollingCode()
Get the current rolling code of the device.- Returns:
- The current rolling code in use with this device's communications.
-
setRollingCode
void setRollingCode(int rollingCode)
Sets the rolling code of this device.- Parameters:
rollingCode- the rolling code to be set or initiated.
-
getEncryptionKey
byte[] getEncryptionKey()
Returns the current encryption key used by this device.- Returns:
- The current encryption key, or null.
-
setEncryptionKey
void setEncryptionKey(byte[] key)
Sets the encryption key of the device.- Parameters:
key- the encryption key to be set.
-
getLearnedDevices
int[] getLearnedDevices()
Gets the list of devices the device already has learned.- Returns:
- The list of currently learned device's CHIP_IDs.
-
getRPCs
java.util.Map<java.lang.Integer,java.lang.Integer[]> getRPCs()
Retrieves the currently available RPCs to this device; those are stored using their manfufacturerId:commandId identifiers.- Returns:
- A list of the available RPCs, in a
Map<Integer, Integer[]>form.
-
invoke
void invoke(EnOceanRPC rpc, EnOceanHandler handler)
Sends an RPC to the remote device.- Parameters:
rpc-handler-- Throws:
java.lang.IllegalArgumentException
-
remove
void remove()
Removes the device's OSGi service from OSGi service platform.
-
-