public class MimdId extends Object implements IMimdMetadataValue
The MIMD instance Identifier (mimdId) is a pair of two unsigned integer values that uniquely identifies a specific instance of a class within the MIMD Model.
The first unsigned integer is an instance identifier serial number. The minimum serial number value is one; however, classes may have attributes that reference a serial number set to zero to indicate special meanings (e.g. a MISB ST 1906 Stage class instance uses a parentStage reference of zero to signify the Stage is a root stage).
The second unsigned integer is the group identifier to which the instance belongs. The first group is group zero which is the default group. If an instance belongs to the default group, the mimdId does not need to specify the group’s identity, which saves bandwidth. Systems using more than one group need to add a group identifier to each mimdId when the group is greater than zero.
Together the serial number and group identifier provide a unique identity within the whole MIMD Model instance hierarchy.
When creating class instances the mimdId attribute is optional unless another class instance references it. When a class instance does not have other class instances referencing it there is no need to create a mimdId, thus reducing data bits and saving bandwidth. To allow for packet-to-packet instance correlation (e.g., Report-on-Change), the mimdId remains constant for a class instance from MIMD Packet-to-MIMD Packet for the duration of the MIMD Stream.
Constructor and Description |
---|
MimdId(byte[] data)
Create a MimdId from encoded bytes.
|
MimdId(int serialNumber)
Create a MimdId from value using default group identifier.
|
MimdId(int serialNumber,
int groupIdentifier)
Create a MimdId from values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static MimdId |
fromBytes(byte[] data)
Parse a MimdId out of a byte array.
|
byte[] |
getBytes()
Get the encoded bytes.
|
String |
getDisplayableValue()
Return a string of the displayable value.
|
String |
getDisplayName()
Get the human-readable name for the value.
|
int |
getGroupIdentifier()
The group identifier for this MimdId.
|
int |
getSerialNumber()
The serial number for this MimdId.
|
int |
hashCode() |
String |
toString() |
public MimdId(int serialNumber)
serialNumber
- the serial number of this MimdId (not zero)public MimdId(int serialNumber, int groupIdentifier)
serialNumber
- the serial number of this MimdIdgroupIdentifier
- the group identifier for this MimdIdpublic MimdId(byte[] data) throws KlvParseException
data
- the byte array to parse the MimdId from.KlvParseException
- if the parsing failspublic static MimdId fromBytes(byte[] data) throws KlvParseException
data
- the byte array to parse the MimdId from.KlvParseException
- if the parsing failspublic byte[] getBytes()
IMimdMetadataValue
getBytes
in interface IMimdMetadataValue
public String getDisplayName()
IKlvValue
getDisplayName
in interface IKlvValue
public String getDisplayableValue()
IKlvValue
getDisplayableValue
in interface IKlvValue
public int getSerialNumber()
public int getGroupIdentifier()
Group identifier 0 is the default group.
Copyright © 2022 West Ridge Systems. All rights reserved.