61 # define UINT32_MAX (4294967295U)
64 #ifdef SNMP_PP_NAMESPACE
68 #define CTR64OUTBUF 30
104 smival.value.hNumber.hipart = hi;
105 smival.value.hNumber.lopart = lo;
117 smival.value.hNumber.hipart = val >> 32;
118 smival.value.hNumber.lopart = val &
UINT32_MAX;
168 v += smival.value.hNumber.lopart;
179 unsigned long high()
const {
return smival.value.hNumber.hipart; }
186 unsigned long low()
const {
return smival.value.hNumber.lopart; }
194 { smival.value.hNumber.hipart = h; m_changed =
true; }
202 { smival.value.hNumber.lopart = l; m_changed =
true; }
215 const char *get_printable()
const;
251 int get_asn1_length()
const;
257 { smival.value.hNumber.hipart = 0; smival.value.hNumber.lopart = 0;
270 smival.value.hNumber.hipart = ctr64.
high();
271 smival.value.hNumber.lopart = ctr64.
low();
284 smival.value.hNumber.hipart = i >> 32;
373 #ifdef SNMP_PP_NAMESPACE
Counter64 & operator=(const Counter64 &ctr64)
Assign a Counter64 to a Counter64.
void set_high(const unsigned long h)
Set the high 32 bit part.
Counter64(unsigned long hi, unsigned long lo)
Constructs a valid Counter64 with the given values.
#define sNMP_SYNTAX_CNTR64
~Counter64()
Destructor (ensure that SnmpSyntax::~SnmpSyntax() is overridden).
SmiUINT32 get_syntax() const
Get the Syntax of the object.
void set_low(const unsigned long l)
Set the low 32 bit part.
bool valid() const
Return validity of the object.
Counter64(pp_uint64 val=0)
Constructs a valid Counter64 with the given value (default 0).
unsigned long long pp_uint64
unsigned long low() const
Get the low 32 bit part.
#define CTR64OUTBUF
maximum ascii string for a 64-bit counter
void clear()
Reset the object.
SnmpSyntax * clone() const
Clone the object.
Counter64 Class encapsulates two unsigned integers into a a single entity.
SNMP_PP_MUTABLE bool m_changed
An "abstract" (pure virtual) class that serves as the base class for all specific SNMP syntax types...
Counter64(const Counter64 &ctr64)
Copy constructor.
unsigned long high() const
Get the high 32 bit part.