37 public static class LwipOpts
39 public static bool GenerateEmptyFolders =
false;
44 public static bool GenerateScalarArrays =
true;
50 public static bool GenerateSingleAccessMethodsForTreeNodeScalars = GenerateScalarArrays;
53 public static class LwipDefs
55 public const string Null =
"NULL";
56 public const string Vt_U8 =
"u8_t";
57 public const string Vt_U16 =
"u16_t";
58 public const string Vt_U32 =
"u32_t";
59 public const string Vt_S8 =
"s8_t";
60 public const string Vt_S16 =
"s16_t";
61 public const string Vt_S32 =
"s32_t";
62 public const string Vt_Snmp_err =
"snmp_err_t";
64 public const string Incl_SnmpOpts =
"lwip/apps/snmp_opts.h";
65 public const string Opt_SnmpEnabled =
"LWIP_SNMP";
67 public const string Vt_StMib =
"struct snmp_mib";
68 public const string Vt_StObjectId =
"struct snmp_obj_id";
69 public const string Vt_StNode =
"struct snmp_node";
70 public const string Vt_StNodeInstance =
"struct snmp_node_instance";
71 public const string Vt_StTreeNode =
"struct snmp_tree_node";
72 public const string Vt_StScalarNode =
"struct snmp_scalar_node";
73 public const string Vt_StScalarArrayNode =
"struct snmp_scalar_array_node";
74 public const string Vt_StScalarArrayNodeDef =
"struct snmp_scalar_array_node_def";
75 public const string Vt_StTableNode =
"struct snmp_table_node";
76 public const string Vt_StTableColumnDef =
"struct snmp_table_col_def";
77 public const string Vt_StNextOidState =
"struct snmp_next_oid_state";
79 public const string Def_NodeAccessReadOnly =
"SNMP_NODE_INSTANCE_READ_ONLY";
80 public const string Def_NodeAccessReadWrite =
"SNMP_NODE_INSTANCE_READ_WRITE";
81 public const string Def_NodeAccessWriteOnly =
"SNMP_NODE_INSTANCE_WRITE_ONLY";
82 public const string Def_NodeAccessNotAccessible =
"SNMP_NODE_INSTANCE_NOT_ACCESSIBLE";
84 public const string Def_ErrorCode_Ok =
"SNMP_ERR_NOERROR";
85 public const string Def_ErrorCode_WrongValue =
"SNMP_ERR_WRONGVALUE";
86 public const string Def_ErrorCode_NoSuchInstance =
"SNMP_ERR_NOSUCHINSTANCE";
88 public const string FnctSuffix_GetValue =
"_get_value";
89 public const string FnctSuffix_SetTest =
"_set_test";
90 public const string FnctSuffix_SetValue =
"_set_value";
91 public const string FnctSuffix_GetInstance =
"_get_instance";
92 public const string FnctSuffix_GetNextInstance =
"_get_next_instance";
94 public const string FnctName_SetTest_Ok =
"snmp_set_test_ok";
96 public static string GetLwipDefForSnmpAccessMode(
SnmpAccessMode am)
102 case SnmpAccessMode.NotAccessible:
return Def_NodeAccessNotAccessible;
104 default:
throw new NotSupportedException(
"Unknown SnmpAccessMode!");
108 public static string GetAsn1DefForSnmpDataType(
SnmpDataType dt)
114 return "SNMP_ASN1_TYPE_NULL";
117 return "SNMP_ASN1_TYPE_OCTET_STRING";
119 return "SNMP_ASN1_TYPE_OBJECT_ID";
121 return "SNMP_ASN1_TYPE_INTEGER";
125 return "SNMP_ASN1_TYPE_IPADDR";
127 return "SNMP_ASN1_TYPE_COUNTER";
129 return "SNMP_ASN1_TYPE_GAUGE";
131 return "SNMP_ASN1_TYPE_TIMETICKS";
133 return "SNMP_ASN1_TYPE_OPAQUE";
135 return "SNMP_ASN1_TYPE_COUNTER64";
137 throw new NotSupportedException(
"Unknown SnmpDataType!");
141 public static string GetLengthForSnmpDataType(
SnmpDataType dt)
165 throw new NotSupportedException(
"Unknown SnmpDataType!");