Base class for BER, Length and Type.
More...
#include <src/BER.h>
|
void | encode7bits (uint32_t value, uint8_t *buffer, const uint8_t size) |
| Encodes integer value to memory buffer.
|
|
|
static void | encode7bits (uint32_t value, Stream &stream, const uint8_t size) |
| Encodes integer value to stream.
|
|
Base class for BER, Length and Type.
This abstract class is the base class for all BER objects.
Definition at line 219 of file BER.h.
◆ encode7bits() [1/2]
static void SNMP::Base::encode7bits |
( |
uint32_t | value, |
|
|
Stream & | stream, |
|
|
const uint8_t | size ) |
|
inlinestatic |
◆ encode7bits() [2/2]
void SNMP::Base::encode7bits |
( |
uint32_t | value, |
|
|
uint8_t * | buffer, |
|
|
const uint8_t | size ) |
|
inline |
Encodes integer value to memory buffer.
If the integer is greater than 127 (0x7F in hexadecimal) it is multibyte encoded with the following rules.
- The integer bytes are encoded from MSB to LSB into bits 6 to 0 of each encoded bytes.
- Bit 7 of each encoded bytes is set to 1, except for the last one where it is set to 0.
- Parameters
-
value | Integer value to encode. |
buffer | Pointer to the buffer. |
size | Number of encoded bytes. |
Definition at line 254 of file BER.h.
◆ BER
◆ _size
unsigned int SNMP::Base::_size = 0 |
|
protected |
Size in bytes of the encoded object.
Definition at line 265 of file BER.h.
Referenced by SNMP::Length::decode(), SNMP::Length::decode(), SNMP::ObjectIdentifierBER::decode(), SNMP::Type::decode(), SNMP::Length::encode(), SNMP::Length::encode(), SNMP::ObjectIdentifierBER::encode(), SNMP::Type::encode(), SNMP::Type::encode(), SNMP::BER::getSize(), SNMP::Type::setFlagTag(), SNMP::Length::setLength(), and SNMP::Type::setType().
The documentation for this class was generated from the following file: