Class AbstractOpenemsMbusComponent

java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.bridge.mbus.api.AbstractOpenemsMbusComponent
All Implemented Interfaces:
OpenemsComponent
Direct Known Subclasses:
MeterAbbB23Impl

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, org.osgi.service.cm.ConfigurationAdmin cm, String mbusReference, String mbusId)
      Call this method from Component implementations activate().
      Parameters:
      context - ComponentContext of this component. Receive it from parameter for @Activate
      id - ID of this component. Typically 'config.id()'
      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()'
      Returns:
      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.