When later I’ve to use this array I find that the Vb setted to sNMP_SYNTAX_INT32 are instead sNMP_SYNTAX_GAUGE32 with value 66.
I know that all the numbers are 32 bits and the only difference in code is between unsigned and signed long but I would like to understand if I’m doing something wrong or simply I’ve to manage all my switch case grouping all number together.
unfortunately you did not show the code where you set the value 66, so I have to guess.
The class Vb has (beside others) the following two set_value() functions:
/**
* Set the value with an int.
*
* The syntax of the Vb will be set to SMI INT32.
*/
void set_value(const int i) { free_vb(); iv_vb_value = new SnmpInt32(i); };
/**
* Set the value with an unsigned int.
*
* The syntax of the Vb will be set to SMI UINT32.
*/
void set_value(const unsigned int i)
{ free_vb(); iv_vb_value = new SnmpUInt32(i); };
If you set the 66 using an unsigned variable, the second function is called which sets the syntax to UINT32 which is the same as GAUGE32.