Class AbstractOpenemsMbusComponent

    • Field Detail

      • channelDataRecordsList

        protected final java.util.List<ChannelRecord> channelDataRecordsList
    • Constructor Detail

      • AbstractOpenemsMbusComponent

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

      • getChannelDataRecordsList

        public java.util.List<ChannelRecord> getChannelDataRecordsList()
      • getPrimaryAddress

        public java.lang.Integer getPrimaryAddress()
      • activate

        protected boolean activate​(org.osgi.service.component.ComponentContext context,
                                   java.lang.String id,
                                   java.lang.String alias,
                                   boolean enabled,
                                   int primaryAddress,
                                   java.lang.String mbusReference,
                                   java.lang.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.