Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Snmp TimeTicks和TimeInterval SMI类型之间的差异_Snmp_Mib - Fatal编程技术网

Snmp TimeTicks和TimeInterval SMI类型之间的差异

Snmp TimeTicks和TimeInterval SMI类型之间的差异,snmp,mib,Snmp,Mib,RFC 2578“管理信息结构版本2(SMIv2)”包含一种类型TimeTicks,它被定义为隐式整数(0..4294967295),并被描述为“表示时间的非负整数,模为2^32(4294967296十进制),两个时代之间的百分之一秒” RFC 2579“SMIv2的文本约定”包含一个类型TimeInterval,它被定义为text-CONVENTION,具有语法整数(0..2147483647),并被描述为“以0.01秒为单位的一段时间。” 我看不出这两件事之间的区别,或者换句话说,当存在Ti

RFC 2578“管理信息结构版本2(SMIv2)”包含一种类型
TimeTicks
,它被定义为
隐式整数(0..4294967295)
,并被描述为“表示时间的非负整数,模为2^32(4294967296十进制),两个时代之间的百分之一秒”

RFC 2579“SMIv2的文本约定”包含一个类型
TimeInterval
,它被定义为
text-CONVENTION
,具有
语法整数(0..2147483647)
,并被描述为“以0.01秒为单位的一段时间。”


我看不出这两件事之间的区别,或者换句话说,当存在
TimeTicks
时,为什么需要
TimeInterval
(可能出于历史原因除外)。如果存在实际差异,它们是什么?我应该使用什么类型?

我认为时间刻度是指通过引用两个已知的时代来表示时间点,而时间间隔表示没有引用的时间段

对于TimeTicks,请注意定义的最后一句:

TimeTicks类型表示一个非负整数,它表示 以2^32(4294967296十进制)为模的时间,单位为百分之一秒 在两个时代之间。定义使用此ASN.1的对象时 类型,则对象的描述标识两个引用 时代

下一段描述时间戳如何定义这两个时代:

例如,[3]定义了时间戳文本约定,即 基于时间刻度类型。使用时间戳,第一个引用 epoch定义为sysUpTime[5]为零的时间,并且 第二个参考历元定义为sysUpTime的当前值

时间间隔不是用来计算时间,而是用来定义时间长度。从使用时间间隔的位置查看此对象:

snmpTargetAddrTimeout OBJECT-TYPE
       SYNTAX      TimeInterval
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION           "This object should reflect the expected maximum round
            trip time for communicating with the transport address
            defined by this row.  When a message is sent to this
            address, and a response (if one is expected) is not
            received within this time period, an implementation
            may assume that the response will not be delivered.
            Note that the time interval that an application waits
            for a response may actually be derived from the value
            of this object.  The method for deriving the actual time
            interval is implementation dependent.  One such method
            is to derive the expected round trip time based on a
            particular retransmission algorithm and on the number
            of timeouts which have occurred.  The type of message may
            also be considered when deriving expected round trip
            times for retransmissions.  For example, if a message is
            being sent with a securityLevel that indicates both
            authentication and privacy, the derived value may be
            increased to compensate for extra processing time spent
            during authentication and encryption processing.
"
       DEFVAL { 1500 }
       ::= { snmpTargetAddrEntry 4 }

我提出了一个非常好的问题!我以前从没听说过时间间隔。我注意到最大允许值是不同的。