Interface EnOceanDevice


public interface EnOceanDevice
This interface represents a physical device that communicates over the EnOcean protocol.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Property name for the mandatory CHIP_ID of the device
    static final String
    Property name for the mandatory DEVICE_CATEGORY of the device
    static final String
    Property name that defines if the device is exported or not.
    static final String
    Property name for the radiotelegram functional type of the profile associated with this device.
    static final String
    Property name for the manufacturer ID that may be specified by some teach-in messages.
    static final String
    Property name for the radiotelegram main type of the profile associated with this device.
    static final String
    Property name for the security level mask for this device.
    static final String
    Property name for the radiotelegram subtype of the profile associated with this device.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    byte[]
    Returns the current encryption key used by this device.
    int
     
    int[]
    Gets the list of devices the device already has learned.
    int
     
    int
    Get the current rolling code of the device.
    int
     
    Retrieves the currently available RPCs to this device; those are stored using their manfufacturerId:commandId identifiers.
    int
     
    int
     
    void
    Sends an RPC to the remote device.
    void
    Removes the device's OSGi service from OSGi service platform.
    void
    setEncryptionKey(byte[] key)
    Sets the encryption key of the device.
    void
    setFunc(int func)
    Manually sets the EEP FUNC of the device.
    void
    setLearningMode(boolean learnMode)
    Switches the device into learning mode.
    void
    setRollingCode(int rollingCode)
    Sets the rolling code of this device.
    void
    setType(int type)
    Manually sets the EEP TYPE of the device.
  • Field Details

    • DEVICE_CATEGORY

      static final String DEVICE_CATEGORY
      Property name for the mandatory DEVICE_CATEGORY of the device
      See Also:
    • CHIP_ID

      static final String CHIP_ID
      Property name for the mandatory CHIP_ID of the device
      See Also:
    • RORG

      static final String RORG
      Property name for the radiotelegram main type of the profile associated with this device.
      See Also:
    • FUNC

      static final String FUNC
      Property name for the radiotelegram functional type of the profile associated with this device.
      See Also:
    • TYPE

      static final String TYPE
      Property name for the radiotelegram subtype of the profile associated with this device.
      See Also:
    • MANUFACTURER

      static final String MANUFACTURER
      Property name for the manufacturer ID that may be specified by some teach-in messages.
      See Also:
    • SECURITY_LEVEL_FORMAT

      static final 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:
    • ENOCEAN_EXPORT

      static final String ENOCEAN_EXPORT
      Property name that defines if the device is exported or not. If present, the device is exported.
      See Also:
  • Method Details

    • 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

      Map<Integer,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:
      IllegalArgumentException
    • remove

      void remove()
      Removes the device's OSGi service from OSGi service platform.