public BytesBuilder(Bytes base) { this._received = base.getReceived(); this._transmitted = base.getTransmitted(); if (base instanceof BytesImpl) { BytesImpl _impl = (BytesImpl) base; this.augmentation = new HashMap<>(_impl.augmentation); } }
if (other.getTransmitted() != null) { return false; } else if(!_transmitted.equals(other.getTransmitted())) { return false;
(statistic.getFlowCapableNodeConnectorStatistics() .getDuration().getSecond().getValue() - ns.timestamp); ns.txSpeed = (bytes.getTransmitted().longValue() - ns.txHistory) / (statistic.getFlowCapableNodeConnectorStatistics() .getDuration().getSecond().getValue() - ns.timestamp); ns.rxHistory = bytes.getReceived().longValue(); ns.txHistory = bytes.getTransmitted().longValue(); ns.timestamp = statistic.getFlowCapableNodeConnectorStatistics()
(statistic.getFlowCapableNodeConnectorStatistics() .getDuration().getSecond().getValue() - ns.timestamp); ns.txSpeed = (bytes.getTransmitted().longValue() - ns.txHistory) / (statistic.getFlowCapableNodeConnectorStatistics() .getDuration().getSecond().getValue() - ns.timestamp); ns.rxHistory = bytes.getReceived().longValue(); ns.txHistory = bytes.getTransmitted().longValue(); ns.timestamp = statistic.getFlowCapableNodeConnectorStatistics()
private static NodeConnectorStatistics toNodeConnectorStatistics(final org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.NodeConnectorStatistics nodeConnectorStatistics, final NodeId nodeId, final NodeConnectorId nodeConnectorId) throws ConstructionException { final NodeConnectorStatistics it = new NodeConnectorStatistics(); final Packets packets = nodeConnectorStatistics.getPackets(); it.setReceivePacketCount(packets.getReceived().longValue()); it.setTransmitPacketCount(packets.getTransmitted().longValue()); final Bytes bytes = nodeConnectorStatistics.getBytes(); it.setReceiveByteCount(bytes.getReceived().longValue()); it.setTransmitByteCount(bytes.getTransmitted().longValue()); it.setReceiveDropCount(nodeConnectorStatistics.getReceiveDrops().longValue()); it.setTransmitDropCount(nodeConnectorStatistics.getTransmitDrops().longValue()); it.setReceiveErrorCount(nodeConnectorStatistics.getReceiveErrors().longValue()); it.setTransmitErrorCount(nodeConnectorStatistics.getTransmitErrors().longValue()); it.setReceiveFrameErrorCount(nodeConnectorStatistics.getReceiveFrameError().longValue()); it.setReceiveOverRunErrorCount(nodeConnectorStatistics.getReceiveOverRunError().longValue()); it.setReceiveCRCErrorCount(nodeConnectorStatistics.getReceiveCrcError().longValue()); it.setCollisionCount(nodeConnectorStatistics.getCollisionCount().longValue()); final InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector> nodeConnectorRef = InstanceIdentifier.builder(Nodes.class) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class, new NodeKey(nodeId)) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector.class, new NodeConnectorKey(nodeConnectorId)) .build(); it.setNodeConnector(NodeMapping.toADNodeConnector(new NodeConnectorRef(nodeConnectorRef))); return it; }
if (fs.getBytes() != null) { builder[8].setMetricValue(new Counter64(fs.getBytes() .getTransmitted())); builder[9].setMetricValue(new Counter64(fs.getBytes() .getReceived()));