public abstract class AbstractOpenemsMbusComponent extends AbstractOpenemsComponent
OpenemsComponent.ChannelId
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ChannelRecord> |
channelDataRecordsList |
Modifier | Constructor and Description |
---|---|
protected |
AbstractOpenemsMbusComponent(ChannelId[] firstInitialChannelIds,
ChannelId[]... furtherInitialChannelIds) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
activate(org.osgi.service.component.ComponentContext context,
java.lang.String id,
java.lang.String alias,
boolean enabled,
int primaryAddress,
org.osgi.service.cm.ConfigurationAdmin cm,
java.lang.String mbusReference,
java.lang.String mbusId)
Call this method from Component implementations activate().
|
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.
|
java.util.List<ChannelRecord> |
getChannelDataRecordsList() |
java.lang.Integer |
getPrimaryAddress() |
_channel, activate, addChannel, addChannels, addChannels, alias, channels, deactivate, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_getChannelAs, channel, channel, debugLog, getModbusSlaveNatureTable, getState, getStateChannel, hasFaults, logDebug, logError, logInfo, logWarn, serviceFactoryPid, servicePid, updateConfigurationProperty, updateReferenceFilter
protected final java.util.List<ChannelRecord> channelDataRecordsList
public java.util.List<ChannelRecord> getChannelDataRecordsList()
public java.lang.Integer getPrimaryAddress()
protected boolean activate(org.osgi.service.component.ComponentContext context, java.lang.String id, java.lang.String alias, boolean enabled, int primaryAddress, org.osgi.service.cm.ConfigurationAdmin cm, java.lang.String mbusReference, java.lang.String mbusId)
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()'protected abstract void addChannelDataRecords()