SNMP 2.0.0
Loading...
Searching...
No Matches
SNMP::Error Struct Reference

Helper struct to handle SNMP error. More...

#include <src/BER.h>

Public Types

enum  : uint8_t {
  NoError , TooBig , NoSuchName , BadValue ,
  ReadOnly , GenErr , NoAccess , WrongType ,
  WrongLength , WrongEncoding , WrongValue , NoCreation ,
  InconsistentValue , ResourceUnavailable , CommitFailed , UndoFailed ,
  AuthorizationError , NotWritable , InconsistentName
}
 Enumerates all possible error codes. More...
 

Public Member Functions

 Error ()
 Initializes to default values.
 

Public Attributes

uint8_t _status
 
uint8_t _index
 

Detailed Description

Helper struct to handle SNMP error.

An error has 2 elements.

  • Status sets the error code.
  • Index identifies the variable binding that caused the error.
Note
Index starts at 1.

Definition at line 72 of file BER.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : uint8_t

Enumerates all possible error codes.

Enumerator
NoError 

0

TooBig 

1

NoSuchName 

2

BadValue 

3

ReadOnly 

4

GenErr 

5

NoAccess 

6

WrongType 

7

WrongLength 

8

WrongEncoding 

9

WrongValue 

10

NoCreation 

11

InconsistentValue 

12

ResourceUnavailable 

13

CommitFailed 

14

UndoFailed 

15

AuthorizationError 

16

NotWritable 

17

InconsistentName 

18

Definition at line 76 of file BER.h.

Constructor & Destructor Documentation

◆ Error()

SNMP::Error::Error ( )
inline

Initializes to default values.

  • Status is set to NoError.
  • Index is set to 0.

Definition at line 106 of file BER.h.

References _index, _status, and NoError.

Member Data Documentation

◆ _index

uint8_t SNMP::Error::_index

◆ _status

uint8_t SNMP::Error::_status

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