1*e71b7053SJung-uk Kimobjects.txt syntax 2*e71b7053SJung-uk Kim------------------ 3*e71b7053SJung-uk Kim 4*e71b7053SJung-uk KimTo cover all the naming hacks that were previously in objects.h needed some 5*e71b7053SJung-uk Kimkind of hacks in objects.txt. 6*e71b7053SJung-uk Kim 7*e71b7053SJung-uk KimThe basic syntax for adding an object is as follows: 8*e71b7053SJung-uk Kim 9*e71b7053SJung-uk Kim 1 2 3 4 : shortName : Long Name 10*e71b7053SJung-uk Kim 11*e71b7053SJung-uk Kim If Long Name contains only word characters and hyphen-minus 12*e71b7053SJung-uk Kim (0x2D) or full stop (0x2E) then Long Name is used as basis 13*e71b7053SJung-uk Kim for the base name in C. Otherwise, the shortName is used. 14*e71b7053SJung-uk Kim 15*e71b7053SJung-uk Kim The base name (let's call it 'base') will then be used to 16*e71b7053SJung-uk Kim create the C macros SN_base, LN_base, NID_base and OBJ_base. 17*e71b7053SJung-uk Kim 18*e71b7053SJung-uk Kim Note that if the base name contains spaces, dashes or periods, 19*e71b7053SJung-uk Kim those will be converted to underscore. 20*e71b7053SJung-uk Kim 21*e71b7053SJung-uk KimThen there are some extra commands: 22*e71b7053SJung-uk Kim 23*e71b7053SJung-uk Kim !Alias foo 1 2 3 4 24*e71b7053SJung-uk Kim 25*e71b7053SJung-uk Kim This just makes a name foo for an OID. The C macro 26*e71b7053SJung-uk Kim OBJ_foo will be created as a result. 27*e71b7053SJung-uk Kim 28*e71b7053SJung-uk Kim !Cname foo 29*e71b7053SJung-uk Kim 30*e71b7053SJung-uk Kim This makes sure that the name foo will be used as base name 31*e71b7053SJung-uk Kim in C. 32*e71b7053SJung-uk Kim 33*e71b7053SJung-uk Kim !module foo 34*e71b7053SJung-uk Kim 1 2 3 4 : shortName : Long Name 35*e71b7053SJung-uk Kim !global 36*e71b7053SJung-uk Kim 37*e71b7053SJung-uk Kim The !module command was meant to define a kind of modularity. 38*e71b7053SJung-uk Kim What it does is to make sure the module name is prepended 39*e71b7053SJung-uk Kim to the base name. !global turns this off. This construction 40*e71b7053SJung-uk Kim is not recursive. 41*e71b7053SJung-uk Kim 42*e71b7053SJung-uk KimLines starting with # are treated as comments, as well as any line starting 43*e71b7053SJung-uk Kimwith ! and not matching the commands above. 44*e71b7053SJung-uk Kim 45