public class LogicalDevice
extends java.lang.Object
Constructor and Description |
---|
LogicalDevice(int logicalDeviceId,
java.lang.String logicalDeviceName,
java.lang.String manufacturerId,
long deviceId)
Creates a new Logical Device.
|
Modifier and Type | Method and Description |
---|---|
Authentication |
addRestriction(int clientId,
Authentication authentication)
Adds a restriction to the Logical Device.
|
org.openmuc.jdlms.internal.asn1.cosem.Conformance |
getConformance() |
int |
getLogicalDeviceId() |
java.lang.String |
getLogicalDeviceName() |
java.lang.String |
getManufacturerId() |
java.util.Map<java.lang.Integer,Authentication> |
getRestrictions() |
byte[] |
getSystemTitle() |
LogicalDevice |
registerCosemClass(java.util.List<java.lang.Object> dlmsClasses)
Register a new COSEM class.
|
LogicalDevice |
registerCosemClass(java.lang.Object... dlmsClass)
Register a new COSEM class.
|
LogicalDevice |
setConformance(LnConformanceSetting... conformanceSetting)
Sets the logical device conformance.
|
public LogicalDevice(int logicalDeviceId, java.lang.String logicalDeviceName, java.lang.String manufacturerId, long deviceId)
logicalDeviceId
- logical device id. Id to identify the logical device. Integer greater than 0.logicalDeviceName
- The logical device name is defined as an octet-string of up to 16 octets/characters. The first three
octets/characters shall carry the manufacturer identifier. The manufacturer shall ensure that the
logical device name, starting with the three octets/characters identifying the manufacturer and
followed by up to 13 octets/characters, is unique.manufacturerId
- unique String ID of three characters.
deviceId
- 5 byte device ID.java.lang.IllegalArgumentException
- if a parameter does not fulfill its requirements.public java.lang.String getLogicalDeviceName()
public java.lang.String getManufacturerId()
public int getLogicalDeviceId()
public Authentication addRestriction(int clientId, Authentication authentication)
clientId
- the client ID. Value greater than zero.authentication
- a new restriction for the logical device.null
if there was no mapping for
the clientId.java.lang.IllegalArgumentException
- if the arguments don't fulfill their requirements.public LogicalDevice registerCosemClass(java.lang.Object... dlmsClass)
dlmsClass
- a class annotated with CosemClass
.CosemClass
public LogicalDevice registerCosemClass(java.util.List<java.lang.Object> dlmsClasses)
dlmsClasses
- a class annotated with CosemClass
.public java.util.Map<java.lang.Integer,Authentication> getRestrictions()
public org.openmuc.jdlms.internal.asn1.cosem.Conformance getConformance()
public byte[] getSystemTitle()
public LogicalDevice setConformance(LnConformanceSetting... conformanceSetting)
conformanceSetting
- set the conformance settings.