Package org.openmuc.framework.dataaccess
Interface ChannelSettings
-
- All Known Subinterfaces:
Channel
public interface ChannelSettingsTheChannelclass is used to access a single data field of a communication device.- Get configuration information about this channel such as its unit.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetChannelAddress()Returns the address of this channel.ChannelStategetChannelState()Returns the current channel state.java.lang.StringgetDescription()Returns the description of this channel.java.lang.StringgetDeviceAddress()Returns the channel's device address.java.lang.StringgetDeviceDescription()Returns the description of the communication device that this channel belongs to.java.lang.StringgetDeviceName()Returns the name of the communication device that this channel belongs to.DeviceStategetDeviceState()Returns the current state of the communication device that this channel belongs to.java.lang.StringgetDriverName()Returns the unique name of the communication driver that is used by this channel to read/write data.java.lang.StringgetId()Returns the ID of this channel.intgetLoggingInterval()Returns the channel's configured logging interval in milliseconds.java.lang.StringgetLoggingSettings()Returns the logging settings of this channel.intgetLoggingTimeOffset()Returns the channel's configured logging time offset in milliseconds.intgetSamplingInterval()Returns the channel's configured sampling interval in milliseconds.intgetSamplingTimeOffset()Returns the channel's configured sampling time offset in milliseconds.intgetSamplingTimeout()Returns the parent's device's configured sampling timeout in milliseconds.doublegetScalingFactor()Returns the scaling factor.java.lang.StringgetSettings()Returns the settings of this channel.java.lang.StringgetUnit()Returns the unit of this channel.ValueTypegetValueType()Returns the value type of this channel.
-
-
-
Method Detail
-
getId
java.lang.String getId()
Returns the ID of this channel. The ID is usually a meaningful string. It is used to get Channel objects using theDataAccessService.- Returns:
- the ID of this channel.
-
getChannelAddress
java.lang.String getChannelAddress()
Returns the address of this channel. Returns the empty string if not configured.- Returns:
- the address of this channel.
-
getDescription
java.lang.String getDescription()
Returns the description of this channel. Returns the empty string if not configured.- Returns:
- the description of this channel.
-
getSettings
java.lang.String getSettings()
Returns the settings of this channel. Returns the empty string if not configured.- Returns:
- the settings of this channel.
-
getLoggingSettings
java.lang.String getLoggingSettings()
Returns the logging settings of this channel. Returns the empty string if not configured.- Returns:
- the logging settings of this channel.
-
getUnit
java.lang.String getUnit()
Returns the unit of this channel. Returns the empty string if not configured. The unit is used for informational purposes only. Neither the framework nor any driver does value conversions based on the configured unit.- Returns:
- the unit of this channel.
-
getValueType
ValueType getValueType()
Returns the value type of this channel. The value type specifies how the value of the latest record of a channel is stored. A data logger is encouraged to store values using the configured value type if it supports that value type.Usually an application does not need to know the value type of the channel because it can use the value type of its choice by using the corresponding function of
Value(e.g.Value.asDouble()). Necessary conversions will be done transparently.If no value type was configured, the default
ValueType.DOUBLEis used.- Returns:
- the value type of this channel.
-
getScalingFactor
double getScalingFactor()
Returns the scaling factor. Returns 1.0 if the scaling factor is not configured.The scaling factor is applied in the following cases:
- Values received by this channel's driver or from apps through
ChannelRuntime.setLatestRecord(Record)are multiplied with the scaling factor before they are stored in the latest record. - Values written (e.g. using
ChannelRuntime.write(Value)) are divided by the scaling factor before they are handed to the driver for transmission.
- Returns:
- the scaling factor
- Values received by this channel's driver or from apps through
-
getSamplingInterval
int getSamplingInterval()
Returns the channel's configured sampling interval in milliseconds. Returns -1 if not configured.- Returns:
- the channel's configured sampling interval in milliseconds.
-
getSamplingTimeOffset
int getSamplingTimeOffset()
Returns the channel's configured sampling time offset in milliseconds. Returns the default of 0 if not configured.- Returns:
- the channel's configured sampling time offset in milliseconds.
-
getSamplingTimeout
int getSamplingTimeout()
Returns the parent's device's configured sampling timeout in milliseconds. Returns the default of 0 if not configured.- Returns:
- the parent's device's configured sampling timeout in milliseconds.
-
getLoggingInterval
int getLoggingInterval()
Returns the channel's configured logging interval in milliseconds. Returns -1 if not configured.- Returns:
- the channel's configured logging interval in milliseconds.
-
getLoggingTimeOffset
int getLoggingTimeOffset()
Returns the channel's configured logging time offset in milliseconds. Returns the default of 0 if not configured.- Returns:
- the channel's configured logging time offset in milliseconds.
-
getDriverName
java.lang.String getDriverName()
Returns the unique name of the communication driver that is used by this channel to read/write data.- Returns:
- the unique name of the communication driver that is used by this channel to read/write data.
-
getDeviceAddress
java.lang.String getDeviceAddress()
Returns the channel's device address.- Returns:
- the channel's device address.
-
getDeviceName
java.lang.String getDeviceName()
Returns the name of the communication device that this channel belongs to. The empty string if not configured.- Returns:
- the name of the communication device that this channel belongs to.
-
getDeviceDescription
java.lang.String getDeviceDescription()
Returns the description of the communication device that this channel belongs to. The empty string if not configured.- Returns:
- the description of the communication device that this channel belongs to.
-
getChannelState
ChannelState getChannelState()
Returns the current channel state.- Returns:
- the current channel state.
-
getDeviceState
DeviceState getDeviceState()
Returns the current state of the communication device that this channel belongs to.- Returns:
- the current state of the communication device that this channel belongs to.
-
-