public class SnObjectInfo
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
SnObjectInfo(int baseName,
int classId,
int version)
Create a new short name object info.
|
SnObjectInfo(int baseName,
int classId,
int version,
int firstMethodIndex,
int firstMethodOffset)
Create a new short name object info.
|
Modifier and Type | Method and Description |
---|---|
int |
getBaseName()
Get the base name (SN address) of a COSEM objec.
|
int |
getClassId()
Get the class COSEM ID.
|
MethodIdOffsetPair |
getFirstMethodIdOffsetPair()
Get the method id, method offset pair.
|
int |
getVersion()
Get the COSEM class version.
|
static java.util.Map<ObisCode,SnObjectInfo> |
retrieveLnSnMappingFrom(DlmsConnection connection)
Retrieve the LN to SN mapping from the current connection.
|
java.lang.String |
toString() |
public SnObjectInfo(int baseName, int classId, int version)
baseName
- the base name (SN Address).classId
- the class id of the COSEM object.version
- the version of the COSEM object.SnObjectInfo(int, int, int, int, int)
public SnObjectInfo(int baseName, int classId, int version, int firstMethodIndex, int firstMethodOffset)
baseName
- the base name (SN Address).classId
- the class id of the COSEM object.version
- the version of the COSEM object.firstMethodIndex
- the method index of the first method in the class. For Assoication SN version = 2, this is 3.firstMethodOffset
- the offset of the first method to the baseName. This must be a multiple of 0x08. For Assoication SN
version = 2, this is 0x30.public MethodIdOffsetPair getFirstMethodIdOffsetPair()
public int getBaseName()
public int getClassId()
public int getVersion()
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.Map<ObisCode,SnObjectInfo> retrieveLnSnMappingFrom(DlmsConnection connection) throws java.io.IOException
connection
- a DlmsConnection using short naming.java.io.IOException
- if the connection is no a short name connection or an error occurs.