Package io.openems.edge.bridge.mbus.api
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractOpenemsMbusComponent
(ChannelId[] firstInitialChannelIds, ChannelId[]... furtherInitialChannelIds) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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().protected abstract void
Define channels of the mbus device and the record position of its corresponding values or the datatype if the channel displays secondary address values.Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, activate, addChannel, addChannels, addChannels, alias, channels, deactivate, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_getChannelAs, channel, channel, debugLog, getState, getStateChannel, hasFaults, serviceFactoryPid, servicePid
-
Field Details
-
channelDataRecordsList
-
-
Constructor Details
-
AbstractOpenemsMbusComponent
-
-
Method Details
-
getChannelDataRecordsList
-
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 @Activateid
- ID of this component. Typically 'config.id()'alias
- Human-readable name of this Component. Typically 'config.alias()'. Defaults to 'id' if emptyenabled
- 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 @ReferencembusReference
- The name of the @Reference setter method for the M-Bus bridgembusId
- 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.
-