Package org.openmuc.jdlms
Class SnObjectInfo
- java.lang.Object
-
- org.openmuc.jdlms.SnObjectInfo
-
public class SnObjectInfo extends java.lang.Object
This class represents the mapping between the instance ID (Obis) and base name (object name) of a COSEM SN object.
-
-
Constructor Summary
Constructors Constructor Description SnObjectInfo(int baseName, ObisCode instanceId, SnClassVersion snClassVersion)
Create a new SN object info.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBaseName()
Get the base name of the SN object.ObisCode
getInstanceId()
Get the instance ID of the object.SnClassVersion
getSnClassVersion()
Get the tuple of class ID and version.static java.util.Map<ObisCode,SnObjectInfo>
retrieveLnToSnMappingFrom(DlmsConnection connection)
Retrieve the LN to SN mapping from the current connection.java.lang.String
toString()
-
-
-
Constructor Detail
-
SnObjectInfo
public SnObjectInfo(int baseName, ObisCode instanceId, SnClassVersion snClassVersion)
Create a new SN object info.- Parameters:
baseName
- the base name of the object. The base name is referring to the instance ID.Note: the base name is a
instanceId
- the instance id.snClassVersion
- the class version pair.
-
-
Method Detail
-
getSnClassVersion
public SnClassVersion getSnClassVersion()
Get the tuple of class ID and version.- Returns:
- the tuple of class ID and version.
-
getBaseName
public int getBaseName()
Get the base name of the SN object.- Returns:
- the base name.
-
getInstanceId
public ObisCode getInstanceId()
Get the instance ID of the object.- Returns:
- the instance ID of the object.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
retrieveLnToSnMappingFrom
public static java.util.Map<ObisCode,SnObjectInfo> retrieveLnToSnMappingFrom(DlmsConnection connection) throws java.io.IOException
Retrieve the LN to SN mapping from the current connection.- Parameters:
connection
- a DlmsConnection using short naming.- Returns:
- the LN -> SN mapping.
- Throws:
java.io.IOException
- if the connection is no a short name connection or an error occurs.
-
-