Class AbstractOpenemsMbusComponent

All Implemented Interfaces:
Direct Known Subclasses:

public abstract class AbstractOpenemsMbusComponent extends AbstractOpenemsComponent
  • Field Details

    • channelDataRecordsList

      protected final List<ChannelRecord> channelDataRecordsList
  • Constructor Details

    • AbstractOpenemsMbusComponent

      protected AbstractOpenemsMbusComponent(ChannelId[] firstInitialChannelIds, ChannelId[]... furtherInitialChannelIds)
  • Method Details

    • getChannelDataRecordsList

      public List<ChannelRecord> getChannelDataRecordsList()
    • getPrimaryAddress

      public Integer getPrimaryAddress()
    • activate

      protected boolean activate(org.osgi.service.component.ComponentContext context, String id, String alias, boolean enabled, int primaryAddress, cm, String mbusReference, String mbusId)
      Call this method from Component implementations activate().
      context - ComponentContext of this component. Receive it from parameter for @Activate
      id - ID of this component. Typically ''
      alias - Human-readable name of this Component. Typically 'config.alias()'. Defaults to 'id' if empty
      enabled - Whether the component should be enabled. Typically 'config.enabled()'
      primaryAddress - Primary address of the M-Bus device. Typically 'config.primaryAddress'
      cm - An instance of ConfigurationAdmin. Receive it using @Reference
      mbusReference - The name of the @Reference setter method for the M-Bus bridge
      mbusId - The ID of the M-Bus bridge. Typically 'config.mbus_id()'
      true if the target filter was updated. You may use it to abort the activate() method.
    • addChannelDataRecords

      protected abstract void addChannelDataRecords()
      Define channels of the mbus device and the record position of its corresponding values or the datatype if the channel displays secondary address values.