# PSNMPClient Class Reference

Class which gets SNMP data. More...

`#include <psnmp.h>`

Inheritance diagram for PSNMPClient:

List of all members.

## Public Member Functions

| PSNMPClient (const PString &host, PINDEX retryMax=5, PINDEX timeoutMax=5, PINDEX rxBufferSize=1500, PINDEX txSize=484)
| PSNMPClient (PINDEX retryMax=5, PINDEX timeoutMax=5, PINDEX rxBufferSize=1500, PINDEX txSize=484)
void | SetVersion (PASNInt version)
PASNInt | GetVersion () const
void | SetCommunity (const PString &str)
PString | GetCommunity () const
void | SetRequestID (PASNInt requestID)
PASNInt | GetRequestID () const
PBoolean | WriteGetRequest (PSNMPVarBindingList &varsIn, PSNMPVarBindingList &varsOut)
PBoolean | WriteGetNextRequest (PSNMPVarBindingList &varsIn, PSNMPVarBindingList &varsOut)
PBoolean | WriteSetRequest (PSNMPVarBindingList &varsIn, PSNMPVarBindingList &varsOut)
ErrorType | GetLastErrorCode () const
PINDEX | GetLastErrorIndex () const
PString | GetLastErrorText () const

## Protected Member Functions

PBoolean | WriteRequest (PASNInt requestCode, PSNMPVarBindingList &varsIn, PSNMPVarBindingList &varsOut)
PBoolean | ReadRequest (PBYTEArray &readBuffer)

## Protected Attributes

PString | hostName
PString | community
PASNInt | requestId
PASNInt | version
PINDEX | retryMax
PINDEX | lastErrorIndex
ErrorType | lastErrorCode
| The platform independant error code.
PBYTEArray | readBuffer
PINDEX | maxRxSize
PINDEX | maxTxSize

## Detailed Description

Class which gets SNMP data.

## Constructor & Destructor Documentation

PSNMPClient::PSNMPClient | ( | const PString & | host,
|  | PINDEX | retryMax = `5`,
|  | PINDEX | timeoutMax = `5`,
|  | PINDEX | rxBufferSize = `1500`,
|  | PINDEX | txSize = `484` |
| ) |  |  |

PSNMPClient::PSNMPClient | ( | PINDEX | retryMax = `5`,
|  | PINDEX | timeoutMax = `5`,
|  | PINDEX | rxBufferSize = `1500`,
|  | PINDEX | txSize = `484` |
| ) |  |  |

## Member Function Documentation

PString PSNMPClient::GetCommunity | ( |  | ) | const

ErrorType PSNMPClient::GetLastErrorCode | ( |  | ) | const

PINDEX PSNMPClient::GetLastErrorIndex | ( |  | ) | const

PString PSNMPClient::GetLastErrorText | ( |  | ) | const

PASNInt PSNMPClient::GetRequestID | ( |  | ) | const

PASNInt PSNMPClient::GetVersion | ( |  | ) | const

PBoolean PSNMPClient::ReadRequest | ( | PBYTEArray & | readBuffer | ) | `[protected]`

void PSNMPClient::SetCommunity | ( | const PString & | str | ) |

void PSNMPClient::SetRequestID | ( | PASNInt | requestID | ) |

void PSNMPClient::SetVersion | ( | PASNInt | version | ) |

PBoolean PSNMPClient::WriteGetNextRequest | ( | PSNMPVarBindingList & | varsIn,
|  | PSNMPVarBindingList & | varsOut |
| ) |  |  |

PBoolean PSNMPClient::WriteGetRequest | ( | PSNMPVarBindingList & | varsIn,
|  | PSNMPVarBindingList & | varsOut |
| ) |  |  |

PBoolean PSNMPClient::WriteRequest | ( | PASNInt | requestCode,
|  | PSNMPVarBindingList & | varsIn,
|  | PSNMPVarBindingList & | varsOut |
| ) |  |  | `[protected]`

PBoolean PSNMPClient::WriteSetRequest | ( | PSNMPVarBindingList & | varsIn,
|  | PSNMPVarBindingList & | varsOut |
| ) |  |  |

## Member Data Documentation

PString PSNMPClient::community `[protected]`

PString PSNMPClient::hostName `[protected]`

ErrorType PSNMPClient::lastErrorCode `[protected]`

The platform independant error code.

Reimplemented from PChannel.

PINDEX PSNMPClient::lastErrorIndex `[protected]`

PINDEX PSNMPClient::maxRxSize `[protected]`

PINDEX PSNMPClient::maxTxSize `[protected]`

PBYTEArray PSNMPClient::readBuffer `[protected]`

PASNInt PSNMPClient::requestId `[protected]`

PINDEX PSNMPClient::retryMax `[protected]`

PASNInt PSNMPClient::version `[protected]`

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

- psnmp.h