34 using System.Collections.Generic;
42 private readonly List<SnmpScalarNode> scalarNodes;
47 this.scalarNodes = scalarNodes;
52 get {
return this.
Name +
"_scalars"; }
57 get {
return this.scalarNodes; }
66 instanceType.
Name +
"->oid");
70 StringBuilder nodeDefs =
new StringBuilder();
73 nodeDefs.AppendFormat(
" {{{0}, {1}, {2}}}, /* {3} */ \n",
75 LwipDefs.GetAsn1DefForSnmpDataType(scalarNode.
DataType),
76 LwipDefs.GetLwipDefForSnmpAccessMode(scalarNode.
AccessMode),
79 if (nodeDefs.Length > 0)
84 "{\n" + nodeDefs +
"\n}" ,
87 mibFile.Declarations.Add(nodeDefsDecl);
91 string nodeInitialization = String.Format(
"SNMP_SCALAR_CREATE_ARRAY_NODE({0}, {1}, {2}, {3}, {4})",
94 (
this.GetMethodRequired) ?
this.GetMethodName : LwipDefs.Null,
95 (
this.TestMethodRequired) ?
this.TestMethodName : LwipDefs.Null,
96 (
this.SetMethodRequired) ?
this.SetMethodName : LwipDefs.Null
override void GenerateCode(MibCFile mibFile)
SnmpScalarArrayNode(List< SnmpScalarNode > scalarNodes, SnmpTreeNode parentNode)
override IEnumerable< SnmpScalarNode > AggregatedScalarNodes
SnmpAccessMode AccessMode
void GenerateAggregatedCode(MibCFile mibFile, VariableType instanceType, string switchSelector, bool generateDeclarations=true, bool generateImplementations=true)
override string FullNodeName