mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +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();
|
||||
destFile = Path.Combine(destFile, mibFileName + ".c");
|
||||
}
|
||||
|
||||
|
||||
string destFileExt = Path.GetExtension(destFile);
|
||||
if (!String.IsNullOrEmpty(destFileExt))
|
||||
{
|
||||
@ -94,10 +94,10 @@ namespace LwipMibCompiler
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// read and resolve MIB
|
||||
Console.WriteLine(" Reading MIB file...");
|
||||
|
||||
|
||||
MibDocument md = new MibDocument(mibFile);
|
||||
MibTypesResolver.ResolveTypes(md.Modules[0]);
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -353,7 +353,7 @@ namespace LwipMibCompiler
|
||||
}
|
||||
else if (ote.Access == MaxAccess.readCreate)
|
||||
{
|
||||
result.AccessMode = SnmpAccessMode.ReadOnly;
|
||||
result.AccessMode = SnmpAccessMode.ReadWrite;
|
||||
}
|
||||
else if (ignoreAccessibleFlag && (ote.Access == MaxAccess.notAccessible))
|
||||
{
|
||||
@ -426,7 +426,7 @@ namespace LwipMibCompiler
|
||||
}
|
||||
|
||||
MibTreeNode rowNode = mibTreeNode.ChildNodes[0];
|
||||
|
||||
|
||||
ObjectType rot = rowNode.Entity as ObjectType;
|
||||
if (rot != null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user