public class LLDP extends Packet
Modifier and Type | Field and Description |
---|---|
static byte[] |
LLDPMulticastMac |
corrupted, hdrFieldCoordMap, hdrFieldsMap, LOG, parent, payload, payloadClass, rawPayload, writeAccess
Constructor and Description |
---|
LLDP()
Default constructor that creates the tlvList LinkedHashMap
|
LLDP(boolean writeAccess)
Constructor that creates the tlvList LinkedHashMap and sets the write access for the same
|
Modifier and Type | Method and Description |
---|---|
LLDP |
addCustomTLV(LLDPTLV customTLV) |
Packet |
deserialize(byte[] data,
int bitOffset,
int size)
This method deserializes the data bits obtained from the wire into the
respective header and payload which are of type Packet
|
LLDPTLV |
getChassisId() |
LLDPTLV |
getCustomTLV(CustomTLVKey key) |
Iterable<LLDPTLV> |
getCustomTlvList() |
Iterable<LLDPTLV> |
getOptionalTLVList() |
LLDPTLV |
getPortId() |
LLDPTLV |
getSystemNameId() |
LLDPTLV |
getTLV(String type) |
LLDPTLV |
getTtl() |
byte[] |
serialize()
This method serializes the header and payload from the respective
packet class, into a single stream of bytes to be sent on the wire
|
LLDP |
setChassisId(LLDPTLV chassisId) |
LLDP |
setOptionalTLVList(List<LLDPTLV> optionalTLVList) |
LLDP |
setPortId(LLDPTLV portId) |
LLDP |
setSystemNameId(LLDPTLV systemNameId) |
void |
setTLV(String type,
LLDPTLV tlv) |
LLDP |
setTtl(LLDPTLV ttl) |
equals, getfieldnumBits, getfieldOffset, getHeaderSize, getParent, getPayload, getRawPayload, hashCode, isCorrupted, postDeserializeCustomOperation, postSerializeCustomOperation, setHeaderField, setParent, setPayload, setRawPayload, toString
public LLDP()
public LLDP(boolean writeAccess)
public LLDPTLV getTLV(String type)
type
- - description of the type of TLVpublic LLDPTLV getCustomTLV(CustomTLVKey key)
public void setTLV(String type, LLDPTLV tlv)
type
- - description of the type of TLVtlv
- - tlv to setpublic LLDPTLV getChassisId()
public LLDP setChassisId(LLDPTLV chassisId)
chassisId
- - the chassisId to setpublic LLDPTLV getSystemNameId()
public LLDP setSystemNameId(LLDPTLV systemNameId)
systemNameId
- - the systemNameId to setpublic LLDPTLV getPortId()
public LLDP setPortId(LLDPTLV portId)
portId
- - the portId to setpublic LLDPTLV getTtl()
public LLDP setOptionalTLVList(List<LLDPTLV> optionalTLVList)
optionalTLVList
- the optionalTLVList to setpublic LLDP addCustomTLV(LLDPTLV customTLV)
customTLV
- the list of custom TLVs to setpublic Packet deserialize(byte[] data, int bitOffset, int size) throws PacketException
Packet
deserialize
in class Packet
data
- - data from wire to deserializebitOffset
- bit position where packet header starts in data
arraysize
- size of packet in bitsPacketException
public byte[] serialize() throws PacketException
Packet
serialize
in class Packet
PacketException
Copyright © 2019 OpenDaylight. All rights reserved.