SNMP 2.0.0
Loading...
Searching...
No Matches
SNMP::Gauge32BER Class Reference

BER object to handle 32-bit gauge. More...

#include <src/BER.h>

Inheritance diagram for SNMP::Gauge32BER:
[legend]
Collaboration diagram for SNMP::Gauge32BER:
[legend]

Public Member Functions

 Gauge32BER (const uint32_t value)
 Creates a Gauge32BER object.
 
- Public Member Functions inherited from SNMP::UIntegerBER< uint32_t >
virtual void encode (Stream &stream)
 Encodes UIntegerBER to stream.
 
virtual uint8_t * encode (uint8_t *buffer)
 Encodes UIntegerBER to memory buffer.
 
virtual void decode (Stream &stream, const uint8_t flag=Flag::None)
 Decodes UIntegerBER from stream.
 
virtual uint8_t * decode (uint8_t *buffer)
 Decodes UIntegerBER from memory buffer.
 
const uint32_t getValue () const
 Gets the UIntegerBER value.
 
void setValue (const uint32_t value)
 Sets the UIntegerBER value.
 
- Public Member Functions inherited from SNMP::BER
 BER (const unsigned int type)
 Creates a BER object.
 
virtual ~BER ()
 BER destructor.
 
template<typename T >
void encodeNumeric (T value, Stream &stream)
 Encodes BER numeric value to stream.
 
template<typename T >
void decodeNumeric (T *value, Stream &stream, const uint8_t flag=Flag::None)
 Decodes BER numeric value from stream.
 
template<typename T >
uint8_t * encodeNumeric (T value, uint8_t *buffer)
 Encodes BER numeric value to memory buffer.
 
template<typename T >
uint8_t * decodeNumeric (T *value, uint8_t *buffer, const uint8_t flag=Flag::None)
 Decodes BER numeric value from memory buffer.
 
template<typename T >
void setNegative (T value)
 Computes BER length of a negative integer.
 
template<typename T >
void setPositive (T value)
 Computes BER length of a positive integer.
 
const unsigned int getType () const
 Gets the BER type.
 
const unsigned int getLength () const
 Gets the BER length.
 
virtual const unsigned int getSize (const bool refresh=false)
 Gets the size of the BER.
 
- Public Member Functions inherited from SNMP::Base
void encode7bits (uint32_t value, uint8_t *buffer, const uint8_t size)
 Encodes integer value to memory buffer.
 

Additional Inherited Members

- Static Public Member Functions inherited from SNMP::Base
static void encode7bits (uint32_t value, Stream &stream, const uint8_t size)
 Encodes integer value to stream.
 
- Protected Member Functions inherited from SNMP::UIntegerBER< uint32_t >
 UIntegerBER (const uint32_t value, const uint8_t type)
 Creates an UIntegerBER.
 
- Protected Member Functions inherited from SNMP::BER
BERcreate (const Type &type)
 Creates a BER of given type.
 
- Protected Attributes inherited from SNMP::BER
Length _length
 
Type _type
 
- Protected Attributes inherited from SNMP::Base
unsigned int _size = 0
 

Detailed Description

BER object to handle 32-bit gauge.

  • Type is TYPE_GAUGE32.
  • Length is variable, from 1 to 5 byte(s), short form encoding.
  • Size is variable, from 3 to 7 bytes.

Example

Gauge32 Encoding
0 41 01 00
4294967295 41 05 00 FF FF FF FF

Definition at line 2254 of file BER.h.

Constructor & Destructor Documentation

◆ Gauge32BER()

SNMP::Gauge32BER::Gauge32BER ( const uint32_t value)
inline

Creates a Gauge32BER object.

Parameters
valueGauge32BER integer value.

Definition at line 2261 of file BER.h.


The documentation for this class was generated from the following file: