beautypg.com

6 counter, 7 counter2, 8 integer – Cirrus Logic CobraNet User Manual

Page 31: 6 counter 6.2.7 counter2 6.2.8 integer

background image

CobraNet Programmer’s Reference

Management Interface Variable Reference

DS651PM25

©

Copyright 2006 Cirrus Logic, Inc.

31

be used to extend the useful range of the timer. Both may be safely ignored for most
applications.

SNMP:

TimeTicks is reported as a 32-bit integer in units of 100ths of a second. For

example, a reported value of

1000 indicates a 10-second timer reading. As seen through

SNMP,

TimeTicks variables roll over after 2

32

100ths of a second (42,949,672.96 seconds

- over one year).

6.2.6 Counter

Counters are never writable and cannot be reset. They indicate the count value since the
interface was last restarted (

sysUpTime = 0). Counters roll over to zero after reaching

their maximum value of 2

24

(16,777,216) on 24-bit platforms and 2

32

(4,294,967,296) on

32-bit platforms.

24-bit HMI: Counter value is represented as a single 24-bit word.

32-bit HMI: Counter value is represented as a single 32-bit word.

6.2.7 Counter2

Counter2 is specific to 24-bit platforms and is a 48-bit unsigned event counter. Counter2
rolls over after 2

48

counts. Counters are never writable. On 32-bit platforms

Counter2 is

identical to the

Counter type.

24-bit HMI: The counter value is stored in two successive memory locations. The most-
significant word appears first. It is suggested that one read the MS word followed by LS
word followed by a second read of the MS word and verify that the MS word has not
changed during the LS read (if so, start over).

32-bit HMI: Counter value is represented in the same single 32-bit word used for the
Counter type.

SNMP: Only the least-significant 32-bits of the counter value are reported. The counter

appears to wrap at 2

32

and conforms to the expected behavior for the standard SNMP

Counter data type.

6.2.8 Integer

A single-precision, signed integer. Valid range is -2

23

(-8,388,608) to 2

23

-1 (8,388,607) on

24-bit platforms and -2

31

(-2,147,483,648) to 2

31

-1 (2,147,483,647) on 32-bit platforms.

HMI: Signed data is represented in a single word in 2's complement form.

SNMP: On 24-bit platforms,

Bad Value error may be reported if the value magnitude

exceeds the 24-bit signed integer range on a set operation.

Table 15. TimeTicks Layout, 32-bit Platforms

MS

MH

ML

LS

Word 1

Rollover MS

Rollover LS

Timer MS

Timer MH

Word 2

Timer ML

Timer LS

Fractional LS

Fractional MS