168651Skrisobjects.txt syntax 268651Skris------------------ 368651Skris 468651SkrisTo cover all the naming hacks that were previously in objects.h needed some 568651Skriskind of hacks in objects.txt. 668651Skris 768651SkrisThe basic syntax for adding an object is as follows: 868651Skris 968651Skris 1 2 3 4 : shortName : Long Name 1068651Skris 1168651Skris If the long name doesn't contain spaces, or no short name 1268651Skris exists, the long name is used as basis for the base name 1368651Skris in C. Otherwise, the short name is used. 1468651Skris 1568651Skris The base name (let's call it 'base') will then be used to 1668651Skris create the C macros SN_base, LN_base, NID_base and OBJ_base. 1768651Skris 1868651Skris Note that if the base name contains spaces, dashes or periods, 1968651Skris those will be converte to underscore. 2068651Skris 2168651SkrisThen there are some extra commands: 2268651Skris 2368651Skris !Alias foo 1 2 3 4 2468651Skris 2568651Skris This juts makes a name foo for an OID. The C macro 2668651Skris OBJ_foo will be created as a result. 2768651Skris 2868651Skris !Cname foo 2968651Skris 3068651Skris This makes sure that the name foo will be used as base name 3168651Skris in C. 3268651Skris 3368651Skris !module foo 3468651Skris 1 2 3 4 : shortName : Long Name 3568651Skris !global 3668651Skris 3768651Skris The !module command was meant to define a kind of modularity. 3868651Skris What it does is to make sure the module name is prepended 3968651Skris to the base name. !global turns this off. This construction 4068651Skris is not recursive. 4168651Skris 4268651SkrisLines starting with # are treated as comments, as well as any line starting 4368651Skriswith ! and not matching the commands above. 4468651Skris 45