55 #ifndef _SNMP_CTR64_H_ 56 #define _SNMP_CTR64_H_ 61 # define UINT32_MAX (4294967295U) 64 #ifdef SNMP_PP_NAMESPACE 68 #define CTR64OUTBUF 30 92 smival.value.hNumber.hipart = hi;
93 smival.value.hNumber.lopart = lo;
105 smival.value.hNumber.hipart = val >> 32;
106 smival.value.hNumber.lopart = val &
UINT32_MAX;
129 v += smival.value.hNumber.lopart;
140 unsigned long high()
const {
return smival.value.hNumber.hipart; }
147 unsigned long low()
const {
return smival.value.hNumber.lopart; }
155 { smival.value.hNumber.hipart = h; m_changed =
true; }
163 { smival.value.hNumber.lopart = l; m_changed =
true; }
176 const char *get_printable()
const;
212 int get_asn1_length()
const;
218 { smival.value.hNumber.hipart = 0; smival.value.hNumber.lopart = 0;
231 smival.value.hNumber.hipart = ctr64.
high();
232 smival.value.hNumber.lopart = ctr64.
low();
245 smival.value.hNumber.hipart = i >> 32;
256 #ifdef SNMP_PP_NAMESPACE 260 #endif // _SNMP_CTR64_H_
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).
SnmpSyntax * clone() const
Clone the object.
void set_low(const unsigned long l)
Set the low 32 bit part.
SmiUINT32 get_syntax() const
Get the Syntax of the object.
Counter64(pp_uint64 val=0)
Constructs a valid Counter64 with the given value (default 0).
bool valid() const
Return validity of the object.
unsigned long long pp_uint64
#define CTR64OUTBUF
maximum ascii string for a 64-bit counter
void clear()
Reset the object.
Counter64 Class encapsulates two unsigned integers into a a single entity.
unsigned long high() const
Get the high 32 bit part.
unsigned long low() const
Get the low 32 bit part.
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.