mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-26 09:35:23 +00:00
LwipMibCompiler: compile read-create object as read-write in generated C code
This commit is contained in:
parent
53c3e8165a
commit
5c8a07cd87
@ -74,7 +74,7 @@ namespace LwipMibCompiler
|
|||||||
string mibFileName = Path.GetFileNameWithoutExtension(mibFile).ToLowerInvariant();
|
string mibFileName = Path.GetFileNameWithoutExtension(mibFile).ToLowerInvariant();
|
||||||
destFile = Path.Combine(destFile, mibFileName + ".c");
|
destFile = Path.Combine(destFile, mibFileName + ".c");
|
||||||
}
|
}
|
||||||
|
|
||||||
string destFileExt = Path.GetExtension(destFile);
|
string destFileExt = Path.GetExtension(destFile);
|
||||||
if (!String.IsNullOrEmpty(destFileExt))
|
if (!String.IsNullOrEmpty(destFileExt))
|
||||||
{
|
{
|
||||||
@ -94,10 +94,10 @@ namespace LwipMibCompiler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// read and resolve MIB
|
// read and resolve MIB
|
||||||
Console.WriteLine(" Reading MIB file...");
|
Console.WriteLine(" Reading MIB file...");
|
||||||
|
|
||||||
MibDocument md = new MibDocument(mibFile);
|
MibDocument md = new MibDocument(mibFile);
|
||||||
MibTypesResolver.ResolveTypes(md.Modules[0]);
|
MibTypesResolver.ResolveTypes(md.Modules[0]);
|
||||||
MibTree mt = new MibTree(md.Modules[0] as MibModule);
|
MibTree mt = new MibTree(md.Modules[0] as MibModule);
|
||||||
@ -335,7 +335,7 @@ namespace LwipMibCompiler
|
|||||||
{
|
{
|
||||||
Console.WriteLine(String.Format("Unsupported BaseType: Module='{0}', Name='{1}'!", mibType.Module, mibType.Name));
|
Console.WriteLine(String.Format("Unsupported BaseType: Module='{0}', Name='{1}'!", mibType.Module, mibType.Name));
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -353,7 +353,7 @@ namespace LwipMibCompiler
|
|||||||
}
|
}
|
||||||
else if (ote.Access == MaxAccess.readCreate)
|
else if (ote.Access == MaxAccess.readCreate)
|
||||||
{
|
{
|
||||||
result.AccessMode = SnmpAccessMode.ReadOnly;
|
result.AccessMode = SnmpAccessMode.ReadWrite;
|
||||||
}
|
}
|
||||||
else if (ignoreAccessibleFlag && (ote.Access == MaxAccess.notAccessible))
|
else if (ignoreAccessibleFlag && (ote.Access == MaxAccess.notAccessible))
|
||||||
{
|
{
|
||||||
@ -426,7 +426,7 @@ namespace LwipMibCompiler
|
|||||||
}
|
}
|
||||||
|
|
||||||
MibTreeNode rowNode = mibTreeNode.ChildNodes[0];
|
MibTreeNode rowNode = mibTreeNode.ChildNodes[0];
|
||||||
|
|
||||||
ObjectType rot = rowNode.Entity as ObjectType;
|
ObjectType rot = rowNode.Entity as ObjectType;
|
||||||
if (rot != null)
|
if (rot != null)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user