Class rfc1155_Counter

Description

rfc1155 Counter

An ASN.1 Counter type

A counter starts at zero and keeps going to a maximum integer value of 2^32-1 where it wraps back to zero.

Located in /rfc1155.php (line 1101)

rfc1155_Asn1Object
   |
   --rfc1155_Integer
      |
      --rfc1155_Counter
Direct descendents
Class Description
 class rfc1902_Counter32 Counter32
 class rfc1902_Counter64 Counter64
Method Summary
 rfc1155_Counter rfc1155_Counter (integer $value)
 rfc1155_Counter decodeContents (string $stream)
Variables
Methods
Constructor rfc1155_Counter (line 1108)

Constructor

rfc1155_Counter rfc1155_Counter (integer $value)
  • integer $value
decodeContents (line 1129)

Decode Contents

Decode octet stream

Some SNMP stacks encode Counters incorrectly resulting in a negative value. There are two remedies: if you define('SNMP_ABS_COUNTER', 1), we take the absolute value of the result. else, we ignore the fact that the first bit is high and decode it as if it was positive.

rfc1155_Counter decodeContents (string $stream)
  • string $stream

Redefinition of:
rfc1155_Integer::decodeContents()
Decode Contents

Inherited Methods

Inherited From rfc1155_Integer

 rfc1155_Integer::rfc1155_Integer()
 rfc1155_Integer::check_range()
 rfc1155_Integer::decodeContents()
 rfc1155_Integer::encodeContents()
 rfc1155_Integer::toString()

Inherited From rfc1155_Asn1Object

 rfc1155_Asn1Object::rfc1155_Asn1Object()
 rfc1155_Asn1Object::decode()
 rfc1155_Asn1Object::decodeLength()
 rfc1155_Asn1Object::decodeTag()
 rfc1155_Asn1Object::encode()
 rfc1155_Asn1Object::encodeContents()
 rfc1155_Asn1Object::encodeEndOfContents()
 rfc1155_Asn1Object::encodeIdentifier()
 rfc1155_Asn1Object::encodeLength()

Documentation generated on Mon, 14 Nov 2005 17:55:07 -0700 by phpDocumentor 1.3.0RC3