gpt4 book ai didi

org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBasedCounter64类的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 23:43:31 26 4
gpt4 key购买 nike

本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBasedCounter64类的一些代码示例,展示了ZeroBasedCounter64类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeroBasedCounter64类的具体详情如下:
包路径:org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBasedCounter64
类名称:ZeroBasedCounter64

ZeroBasedCounter64介绍

[英]The zero-based-counter64 type represents a counter64 that has the defined 'initial' value zero. A schema node of this type will be set to zero (0) on creation and will thereafter increase monotonically until it reaches a maximum value of 2^64-1 (18446744073709551615 decimal), when it wraps around and starts increasing again from zero. Provided that an application discovers a new schema node of this type within the minimum time to wrap, it can use the 'initial' value as a delta. It is important for a management station to be aware of this minimum time and the actual time between polls, and to discard data if the actual time is too long or there is no defined minimum time. In the value set and its semantics, this type is equivalent to the ZeroBasedCounter64 textual convention of the SMIv2.
[中]基于零的计数器64类型表示定义的“初始”值为零的计数器64。这种类型的模式节点在创建时会被设置为零(0),然后会单调增加,直到它达到最大值2^64-1(18446744073709551615十进制),然后再从零开始增加。如果应用程序在最短的包装时间内发现这种类型的新模式节点,它可以使用“初始”值作为增量。对于管理站来说,重要的是要知道这个最短时间和轮询之间的实际时间,如果实际时间太长或没有定义的最短时间,则丢弃数据。在值集及其语义中,此类型相当于SMIv2的ZeroBasedCounter64文本约定。

代码示例

代码示例来源:origin: org.opendaylight.yangtools.model/ietf-yang-types-20130715

public static ZeroBasedCounter64 getDefaultInstance(String defaultValue) {
  return new ZeroBasedCounter64(new BigInteger(defaultValue));
}

代码示例来源:origin: org.opendaylight.sfc/sfc-sb-rest

private ArrayNode getStatisticByTimestampObjectNode(List<StatisticByTimestamp> serviceStatistics) {
  if (serviceStatistics == null) {
    return null;
  }
  ArrayNode statisticsByTimeArray = mapper.createArrayNode();
  for (StatisticByTimestamp statByTimestamp : serviceStatistics){
    ObjectNode statisticByTimeNode = mapper.createObjectNode();
    ObjectNode serviceStatisticNode = mapper.createObjectNode();
    serviceStatisticNode.put(_BYTES_IN, statByTimestamp.getServiceStatistic().getBytesIn()
        .getValue().longValue());
    serviceStatisticNode.put(_BYTES_OUT, statByTimestamp.getServiceStatistic().getBytesOut()
        .getValue().longValue());
    serviceStatisticNode.put(_PACKETS_IN, statByTimestamp.getServiceStatistic().getPacketsIn()
        .getValue().longValue());
    serviceStatisticNode.put(_PACKETS_OUT, statByTimestamp.getServiceStatistic().getPacketsOut()
        .getValue().longValue());
    statisticByTimeNode.put(_TIMESTAMP, statByTimestamp.getTimestamp().longValue());
    statisticByTimeNode.put(_SERVICE_STATISTICS, serviceStatisticNode);
    statisticsByTimeArray.add(statisticByTimeNode);
  }
  return statisticsByTimeArray;
}

代码示例来源:origin: org.opendaylight.sfc/sfc-sb-rest

portBandwidthUtilizationNode.put(_PORT_ID, portBandwidthUtilization.getPortId());
portBandwidthUtilizationNode.put(_RX_PACKET,
    portBandwidthUtilization.getRxPacket().getValue().intValue());
portBandwidthUtilizationNode.put(_TX_PACKET,
    portBandwidthUtilization.getTxPacket().getValue().intValue());
portBandwidthUtilizationNode.put(_RX_BYTES,
    portBandwidthUtilization.getRxBytes().getValue().intValue());
portBandwidthUtilizationNode.put(_TX_BYTES,
    portBandwidthUtilization.getTxBytes().getValue().intValue());
portBandwidthUtilizationNode.put(_RX_BYTES_RATE, portBandwidthUtilization.getRxBytesRate());
portBandwidthUtilizationNode.put(_TX_BYTES_RATE, portBandwidthUtilization.getTxBytesRate());

代码示例来源:origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-yang-types

public static ZeroBasedCounter64 getDefaultInstance(String defaultValue) {
  return new ZeroBasedCounter64(new BigInteger(defaultValue));
}

代码示例来源:origin: org.opendaylight.mdsal.model/ietf-yang-types-20130715

public static ZeroBasedCounter64 getDefaultInstance(String defaultValue) {
  return new ZeroBasedCounter64(new BigInteger(defaultValue));
}

代码示例来源:origin: org.opendaylight.coretutorials/openconfig-bgp

public static ZeroBasedCounter64 getDefaultInstance(String defaultValue) {
  return new ZeroBasedCounter64(new BigInteger(defaultValue));
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com