public class MBodyPortStats extends OpenflowStructure implements MultipartBody
MBodyPortStatsRequest
Modifier and Type | Class and Description |
---|---|
static class |
MBodyPortStats.Array
Represents an array of port stats elements.
|
static class |
MBodyPortStats.MutableArray
A mutable array of port stats elements.
|
parseErrorCause, version
Constructor and Description |
---|
MBodyPortStats(ProtocolVersion pv)
Constructs a multipart body PORT_STATS type.
|
Modifier and Type | Method and Description |
---|---|
long |
getCollisions()
Returns the number of collisions; Since 1.0.
|
long |
getDurationNsec()
Returns the time this port has been alive in nanoseconds beyond
getDurationSec() ; Since 1.3. |
long |
getDurationSec()
Returns the time this port has been alive in seconds; Since 1.3.
|
BigPortNumber |
getPort()
Returns the port to which the statistics belong; Since 1.0.
|
long |
getRxBytes()
Returns the number of bytes received by this port; Since 1.0.
|
long |
getRxCRCErr()
Returns the number of packets received with CRC error; Since 1.0.
|
long |
getRxDropped()
Returns the number of packets dropped by this port at the receiving
end; Since 1.0.
|
long |
getRxErrors()
Returns the number of packets received with error; Since 1.0.
|
long |
getRxFrameErr()
Returns the number of packets received with frame alignment error;
Since 1.0.
|
long |
getRxOverErr()
Returns the number of packets received with overrun error;
Since 1.0.
|
long |
getRxPackets()
Returns the number of packets received by this port; Since 1.0.
|
int |
getTotalLength()
Returns the total length of the body, in bytes.
|
long |
getTxBytes()
Returns the number of bytes transmitted by this port; Since 1.0.
|
long |
getTxDropped()
Returns the number of packets dropped by this port at transmitting
end; Since 1.0.
|
long |
getTxErrors()
Returns the number of packets transmitted with errors; Since 1.0.
|
long |
getTxPackets()
Returns the number of packets transmitted by this port; Since 1.0.
|
String |
toDebugString()
Returns a string representation useful for debugging.
|
String |
toDebugString(int indent)
Returns a multi-line representation of this Port Stats object.
|
String |
toString() |
void |
validate()
Validates this structure for completeness and throws an exception
if the structure is considered "not complete".
|
getVersion, hex, hex, incomplete, parseErrorCause
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion
public MBodyPortStats(ProtocolVersion pv)
pv
- the protocol versionpublic String toString()
toString
in class OpenflowStructure
public void validate() throws IncompleteStructureException
OpenflowStructure
This default implementation does nothing, i.e. default behavior is that structures are considered complete.
Subclasses should override this method to check that mandatory fields or other internal state is present, throwing an exception if it is not.
validate
in interface MultipartBody
validate
in class OpenflowStructure
IncompleteStructureException
- if the structure is not completepublic int getTotalLength()
MultipartBody
getTotalLength
in interface MultipartBody
public String toDebugString()
OpenflowStructure
OpenflowStructure.toString()
, but
subclasses are free to override this behavior.toDebugString
in interface Structure
toDebugString
in class OpenflowStructure
public String toDebugString(int indent)
indent
- the additional indent (number of spaces)public BigPortNumber getPort()
A value of Port.ANY
indicates no restriction.
Note that in 1.0, port numbers are u16.
public long getRxPackets()
public long getTxPackets()
public long getRxBytes()
public long getTxBytes()
public long getRxDropped()
public long getTxDropped()
public long getRxErrors()
public long getTxErrors()
public long getRxFrameErr()
public long getRxOverErr()
public long getRxCRCErr()
public long getCollisions()
public long getDurationSec()
public long getDurationNsec()
getDurationSec()
; Since 1.3.
This value is u32.Copyright © 2015. All Rights Reserved.