blob: 0f3e2a2aa37894b19c78ba219177fa478a169b02 [file] [log] [blame]
############################################################# -*- c -*-
## Generic include for columns. Do not use directly.
##
## $Id$
########################################################################
@if $m2c_mark_boundary == 1@
/** START code generated by $RCSfile$ $Revision$ */
@end@
########################################################################
/*---------------------------------------------------------------------
* $node.module::$node.parent.$node
* $node is subid $node.subid of $node.parent.
* Its status is $node.status, and its access level is $node.access.
* OID: $node.objectID
* Description:
$node.description
*
@if $m2c_node_detail == 1@
* node -- name $node
* node.parent -- label of the parent $node.parent
* node.objectID -- dotted full OID $node.objectID
* node.commaoid -- comma separated OID $node.commaoid
* node.subid -- last oid component $node.subid
* node.oidlength-- length of the oid $node.oidlength
* node.syntax -- node's syntax $node.syntax
* node.perltype -- node's perl type $node.perltype
* node.type -- node's ASN_XXX type $node.type
* node.decl -- C data type $m2c_decl ($node.decl)
* node.settable -- 1 if it's writable $node.settable
* node.noaccess -- 1 if not-accessible $node.noaccess
* node.access -- node's access type $node.access
* node.status -- node's status $node.status
* node.isscalar -- returns 1 if scalar $node.isscalar
* node.iscolumn -- returns 1 if column $node.iscolumn
* node.enums -- $node.enums
*
@end@
* Attributes:
* accessible $node.accessible isscalar $node.isscalar enums $node.enums hasdefval $node.hasdefval
* readable $node.readable iscolumn $node.iscolumn ranges $node.ranges hashint $node.hashint
* settable $node.settable
@if $node.hasdefval == 1@
* defval: $node.defval
@end@
@if $node.hashint == 1@
* hint: $node.hint
@end@
*
@if $node.enums == 1@
@ eval $m2c_evals = ""@
@ eval $m2c_first = 1@
@ foreach $e $v enum@
@ if $m2c_first == 1@
@ eval $m2c_first = 0@
@ else@
@ eval $m2c_evals = "$m2c_evals,"@
@ end@
@ eval $m2c_evals = "$m2c_evals $e($v)"@
@ end@
* Enum range: $node.enumrange. Values: $m2c_evals
@elsif $node.ranges == 1@
@ eval $m2c_range_max = 0@
@ eval $m2c_evals = ""@
@ eval $m2c_first = 1@
@ foreach $a $b range $node@
@ if $m2c_first == 1@
@ eval $m2c_first = 0@
@ else@
@ eval $m2c_evals = "$m2c_evals,"@
@ end@
@ if $a == $b@
@ eval $m2c_evals = "$m2c_evals $a"@
@ else@
@ eval $m2c_evals = "$m2c_evals $a - $b"@
@ end@
@ eval $m2c_range_max = max($m2c_range_max,$b)@
@ end@
* Ranges: $m2c_evals;
@end@ #ranges
*
* Its syntax is $node.syntax (based on perltype $node.perltype)
* The net-snmp type is $node.type. The C type decl is $node.decl ($m2c_decl)
@if $node.needlength == 1@
@ if $node.ranges == 1@
* This data type requires a length. (Max $m2c_range_max)
@ else@
* This data type requires a length.
@ end@
@end@
@if $node.noaccess@
*
*
*
* NOTE: NODE $node IS NOT ACCESSIBLE
*
*
@end@
*/
########################################################################
@if $m2c_mark_boundary == 1@
/** END code generated by $RCSfile$ $Revision$ */
@end@