![]() |
netmsgs
1.2.2
RoadNarrows Robotics Network Messaging Package
|
Public Member Functions | |
| def | __init__ (self, xml, hfilepath, cfilepath, kwargs) |
| def | AugmentXmlDB (self) |
| def | Pass0 (self) |
| def | Pass0XmlDef (self, pathXids, xdef, depth) |
| def | Pass0XmlDefPad (self, pathXids, xdef, depth) |
| def | Pass0XmlDefStruct (self, pathXids, xdef, depth) |
| def | Pass0XmlDefVector (self, pathXids, xdef, depth) |
| def | Pass0XmlDefString (self, pathXids, xdef, depth) |
| def | Pass0XmlDefSimple (self, pathXids, xdef, depth) |
| def | Pass0XmlDefDerived (self, pathXids, xdef, depth) |
| def | GenSource (self) |
| def | GenHSource (self) |
| def | GenCSource (self) |
| def | HGenPrologue (self, fp) |
| def | HGenMsgIds (self, fp) |
| def | HGenFieldTypes (self, fp) |
| def | HGenMsgTypes (self, fp) |
| def | HGenTypedef (self, fp, xid, xdef, brief) |
| def | HGenStructDeclList (self, fp, fields, depth) |
| def | HGenTypedefMacros (self, fp, xid, xdef) |
| def | HGenExternData (self, fp) |
| def | HGenProtoTypes (self, fp) |
| def | HGenEpilogue (self, fp) |
| def | CGenPrologue (self, fp) |
| def | CGenFieldTypes (self, fp) |
| def | CGenMsgTypes (self, fp) |
| def | CGenDefsR (self, fp, pathXids, xdef) |
| def | CGenFIdEnum (self, fp, pathXids, xdef) |
| def | CGenAnonStruct (self, fp, pathXids, xdef) |
| def | CGenFieldDefs (self, fp, pathXids, xdef) |
| def | CGenVectorItemFieldDef (self, fp, pathXids, xdef) |
| def | CMakeFieldDefThis (self, ftype, fdef) |
| def | CMakeFieldDefThisPad (self, ftype, fdef) |
| def | CMakeFieldDefThisNumber (self, ftype, fdef) |
| def | CMakeFieldDefThisString (self, ftype, fdef) |
| def | CMakeFieldDefThisStruct (self, ftype, fdef) |
| def | CMakeFieldDefThisVector (self, ftype, fdef) |
| def | CMakeFieldDefThisDerived (self, ftype, fdef) |
| def | CGenMsgDef (self, fp, pathXids, xdef) |
| def | CGenLookupTbls (self, fp) |
| def | CGenPublicFuncDefs (self, fp) |
| def | CGenEpilogue (self, fp) |
| def | MakeCppMacroName (self, names) |
| def | MakeTypeSpec (self, ftype) |
| def | MakeCId (self, xid, isGlobal) |
| def | WriteStructDecl (self, fp, indent, type_spec, cid, const_expr, kwargs) |
| def | WriteVectortDecl (self, fp, indent, vtype_spec, cid, const_expr) |
| def | WriteTypedefStmt (self, fp, type_spec, cid, const_expr) |
| def | WriteFuncDef (self, fp, type_qual, type_spec, funcname, funcargs, kwargs) |
| def | WriteFDefEntry (self, fp, sFName, eFId, eFType, uOffset, this, this_init) |
| def | IsSimple (self, ftype) |
| def | IsDeprecated (self, xdef) |
| def | BaseXRef (self, fname) |
| def | BaseFType (self, ftype) |
| def | EvalNum (self, args) |
| def | PrettyPrintTopComment (self, fp, srcbasename, brief) |
| def | PrettyPrintMajorDivComment (self, fp, comment) |
| def | PrettyPrintMinorDivComment (self, fp, comment) |
| def | PrettyPrintBriefComment (self, fp, brief) |
Public Attributes | |
| mXml | |
| parsed xml instance | |
| mHFilePath | |
| output .h header file name | |
| mCFilePath | |
| output .c header file name | |
| mDebug | |
| debug level | |
| mIncPrefix | |
| include prefix | |
| mHungarian | |
| do [not] prepend RN Hungarian notation to message fields | |
| mHBaseName | |
| output .h header file basename | |
| mCBaseName | |
| output .c header file basename | |
RoadNarrows Net Messages C Source Generator Class.
The NetMsgsGenC class reads the post-parsed database of a NetMsgsXmlParser
class instance and generates a C .h and .c file pair. The C files expects
the libnetmsgs C library.
Definition at line 79 of file NetMsgsGenC.py.
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.__init__ | ( | self, | |
| xml, | |||
| hfilepath, | |||
| cfilepath, | |||
| kwargs | |||
| ) |
Initialize NetMsgsGenC instance.
Parameters:
xml - NetMsgsXMLParser class instance.
hfilepath - Generated output h file.
cfilepath - Generated output c file.
kwargs - Optional keyword arguments.
debug - Set debugging level: 0 == off, 1, 2, 3.
incprefix - Generated .h include prefix in .c file.
Definition at line 88 of file NetMsgsGenC.py.
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.AugmentXmlDB | ( | self | ) |
Augument the XML database of parsed XML values with C generated parameters.
Definition at line 127 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.BaseFType | ( | self, | |
| ftype | |||
| ) |
Returns the base field type for the given field type. Parameters: ftype - (Derived) field type. Return: Base field type.
Definition at line 2031 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.IsSimple(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.BaseXRef | ( | self, | |
| fname | |||
| ) |
Returns the base field XML cross-reference name for the given XML name. Parameters: fname - (Derived) field name. Return: Returns 'this' if fname is a base field, otherwise the XML cross-referenced field name is returned.
Definition at line 2010 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefDerived(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenAnonStruct | ( | self, | |
| fp, | |||
| pathXids, | |||
| xdef | |||
| ) |
Generate .c anonomous structure type. Anonomous structures mirror any inline, non-global 'struct' field types. External structures are required to calculate member offsets correctlhy. Parameters: fp - Opened output file pointer. pathXids - Path list of XML identifiers. xdef - XML ftypedef, msgdef, or fielddef XML specification.
Definition at line 1132 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR | ( | self, | |
| fp, | |||
| pathXids, | |||
| xdef | |||
| ) |
Recursively generate .c message related data C definition statements.
Data generated:
field ID enum declarations
field definition arrays
message/struct definitions
Parameters:
fp - Opened output file pointer.
pathXids - Path list of XML ftypedef, msgdef, or fielddef
identifiers.
xdef - XML ftypedef, msgdef, or fielddef XML specification.
Definition at line 1063 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenAnonStruct(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFIdEnum(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldDefs(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgDef(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenVectorItemFieldDef().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldTypes(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgTypes().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenEpilogue | ( | self, | |
| fp | |||
| ) |
Generate .c source file epilogue. Parameters: fp - Opened output file pointer.
Definition at line 1708 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFIdEnum | ( | self, | |
| fp, | |||
| pathXids, | |||
| xdef | |||
| ) |
Generate .c field id enum declaration for the given definition. Parameters: fp - Opened output file pointer. pathXids - Path list of XML identifiers. xdef - XML ftypedef, msgdef, or fielddef XML specification.
Definition at line 1089 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldDefs | ( | self, | |
| fp, | |||
| pathXids, | |||
| xdef | |||
| ) |
Generate .c field definition array for the given definition. Parameters: fp - Opened output file pointer. pathXids - Path list of XML identifiers. xdef - XML ftypedef, msgdef, or fielddef XML specification.
Definition at line 1173 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteFDefEntry().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldTypes | ( | self, | |
| fp | |||
| ) |
Generate .c field and message definitions from 'field_types' section. Parameters: fp - Opened output file pointer.
Definition at line 1030 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMinorDivComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenLookupTbls | ( | self, | |
| fp | |||
| ) |
Generate .c source file look-up tables. Parameters: fp - Opened output file pointer.
Definition at line 1521 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgDef | ( | self, | |
| fp, | |||
| pathXids, | |||
| xdef | |||
| ) |
Generate .c source file [sub]message definition from the given definition. Parameters: fp - Opened output file pointer. pathXids - Path list of XML identifiers. xdef - XML ftypedef, msgdef, or fielddef XML specification.
Definition at line 1480 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgTypes | ( | self, | |
| fp | |||
| ) |
Generate .c field and message definitions from 'msg_types' section. Parameters: fp - Opened output file pointer.
Definition at line 1047 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMinorDivComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenPrologue | ( | self, | |
| fp | |||
| ) |
Generate .c source file prologue. Prologue includes core header file includes plus any prologue specified in the XML file. Parameters: fp - Opened output file pointer.
Definition at line 997 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mHBaseName, and NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenPublicFuncDefs | ( | self, | |
| fp | |||
| ) |
Generate .c source file function definitions. Parameters: fp - Opened output file pointer.
Definition at line 1569 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMajorDivComment(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteFuncDef().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenVectorItemFieldDef | ( | self, | |
| fp, | |||
| pathXids, | |||
| xdef | |||
| ) |
Generate .c vector item field definition array for the given definition. Parameters: fp - Opened output file pointer. pathXids - Path list of XML identifiers. xdef - XML ftypedef, msgdef, or fielddef XML specification.
Definition at line 1223 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteFDefEntry().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenDefsR().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis | ( | self, | |
| ftype, | |||
| fdef | |||
| ) |
Make C field definition this specific initialization for field type.
Parameters:
ftype - XML field type.
fdef - XML field definition.
Return
Returns the pair (this, this_init) where:
this - C union name.
this_int - List of (.member, value) pairs.
Definition at line 1266 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisDerived(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisNumber(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisPad(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisString(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisStruct(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisVector().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldDefs(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenVectorItemFieldDef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisDerived | ( | self, | |
| ftype, | |||
| fdef | |||
| ) |
Make C field definition this specific initialization for vector field.
Parameters:
ftype - XML field type.
fdef - XML field definition.
Return
Returns the pair (this, this_init) where:
this - C union name.
this_int - List of (.member, value) pairs.
Definition at line 1454 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisNumber(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisString(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisStruct(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisVector().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisNumber | ( | self, | |
| ftype, | |||
| fdef | |||
| ) |
Make C field definition this specific initialization for number field.
Parameters:
ftype - XML field type.
fdef - XML field definition.
Return
Returns the pair (this, this_init) where:
this - C union name.
this_int - List of (.member, value) pairs.
Definition at line 1328 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisDerived().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisPad | ( | self, | |
| ftype, | |||
| fdef | |||
| ) |
Make C field definition this specific initialization for pad 'field'.
Parameters:
ftype - XML field type.
fdef - XML field definition.
Return
Returns the pair (this, this_init) where:
this - C union name.
this_int - List of (.member, value) pairs.
Definition at line 1310 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisString | ( | self, | |
| ftype, | |||
| fdef | |||
| ) |
Make C field definition this specific initialization for string field.
Parameters:
ftype - XML field type.
fdef - XML field definition.
Return
Returns the pair (this, this_init) where:
this - C union name.
this_int - List of (.member, value) pairs.
Definition at line 1382 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisDerived().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisStruct | ( | self, | |
| ftype, | |||
| fdef | |||
| ) |
Make C field definition this specific initialization for struct field.
Parameters:
ftype - XML field type.
fdef - XML field definition.
Return
Returns the pair (this, this_init) where:
this - C union name.
this_int - List of (.member, value) pairs.
Definition at line 1411 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisDerived().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisVector | ( | self, | |
| ftype, | |||
| fdef | |||
| ) |
Make C field definition this specific initialization for vector field.
Parameters:
ftype - XML field type.
fdef - XML field definition.
Return
Returns the pair (this, this_init) where:
this - C union name.
this_int - List of (.member, value) pairs.
Definition at line 1429 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThis(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CMakeFieldDefThisDerived().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.EvalNum | ( | self, | |
| args | |||
| ) |
Evaluate a summation of terms.
Paramters:
args List of summation terms, with each term one of:
an equation, string, number
Examples:
5 -> '5'
5, '(3 * 10)' -> '35'
5, 'MY_MAX', '1*255' -> '300+MY_MAX'
Return:
Returns string of the evaluated results.
Definition at line 2051 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC._EvalTree(), NetMsgs.NetMsgsGenC.NetMsgsGenC._FindLowOp(), NetMsgs.NetMsgsGenC.NetMsgsGenC._FindRParen(), NetMsgs.NetMsgsGenC.NetMsgsGenC._MakeTree(), NetMsgs.NetMsgsGenC.NetMsgsGenC._ParenExprParen(), and NetMsgs.NetMsgsGenC.NetMsgsGenC._Simplify().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefPad(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefSimple(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefString(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefStruct(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource | ( | self | ) |
Generate h header. Exceptions: Raises NetMsgError exception on error.
Definition at line 588 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenEpilogue(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenLookupTbls(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenPrologue(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenPublicFuncDefs(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mCBaseName, NetMsgs.NetMsgsGenC.NetMsgsGenC.mCFilePath, NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMajorDivComment(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintTopComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource | ( | self | ) |
Generate h header. Exceptions: Raises NetMsgError exception on error.
Definition at line 565 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenEpilogue(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenExternData(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenFieldTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgIds(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenPrologue(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenProtoTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mHBaseName, NetMsgs.NetMsgsGenC.NetMsgsGenC.mHFilePath, NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintTopComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.GenSource | ( | self | ) |
Generate C .h and .c source file pair. Exceptions: Raises NetMsgError exception on error.
Definition at line 553 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenEpilogue | ( | self, | |
| fp | |||
| ) |
Generate .h header file epilogue. Parameters: fp - Opened output file pointer.
Definition at line 971 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenExternData | ( | self, | |
| fp | |||
| ) |
Generate .h header public external data. Parameters: fp - Opened output file pointer.
Definition at line 861 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMajorDivComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenFieldTypes | ( | self, | |
| fp | |||
| ) |
Generate .h header file field types section. Parameters: fp - Opened output file pointer.
Definition at line 688 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMajorDivComment(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMinorDivComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgIds | ( | self, | |
| fp | |||
| ) |
Generate .h Message Id enumeration. Parameters: fp - Opened output file pointer.
Definition at line 647 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgTypes | ( | self, | |
| fp | |||
| ) |
Generate .h header file message types section. Parameters: fp - Opened output file pointer.
Definition at line 706 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMajorDivComment(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMinorDivComment().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenPrologue | ( | self, | |
| fp | |||
| ) |
Generate .h header file prologue. Prologue includes core header file includes plus any prologue specified in the XML file. Parameters: fp - Opened output file pointer.
Definition at line 617 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenProtoTypes | ( | self, | |
| fp | |||
| ) |
Generate .h header function prototypes. Parameters: fp - Opened output file pointer.
Definition at line 887 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMajorDivComment(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteFuncDef().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList | ( | self, | |
| fp, | |||
| fields, | |||
| depth | |||
| ) |
Generate comment structure declaration list (members). Parameters: fp - Opened output file pointer. fields - XML database field definition 'fields' entry. depth - Current structure depth.
Definition at line 775 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsSimple(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteStructDecl(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteVectortDecl().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenAnonStruct(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef | ( | self, | |
| fp, | |||
| xid, | |||
| xdef, | |||
| brief | |||
| ) |
Generate a commented type definition subsection. Parameters: fp - Opened output file pointer. xid - Unique id in XML database section. xdef - XML ftypedef, msgdef, or fielddef XML database entry. brief - Brief comment string.
Definition at line 726 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedefMacros(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment(), NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteTypedefStmt(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteVectortDecl().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenFieldTypes(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgTypes().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedefMacros | ( | self, | |
| fp, | |||
| xid, | |||
| xdef | |||
| ) |
Generation .h cpp #defines macros associated with field or message typedefs. Parameters: fp - Opened output file pointer. xid - Unique id in XML database section. xdef - XML ftypedef, msgdef, or fielddef XML database entry.
Definition at line 837 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedefMacros(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedefMacros().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated | ( | self, | |
| xdef | |||
| ) |
Returns True (False) is definition is (not) deprecated. Parameters: xdef - XML ftypedef, msgdef, or fielddef XML specification. Return: True or False.
Definition at line 1993 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenAnonStruct(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFIdEnum(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldDefs(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenLookupTbls(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgDef(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenVectorItemFieldDef(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenFTDict(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenMsgDef(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenMsgDefSet(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenMsgIds(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgIds(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenProtoTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedefMacros(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefPad(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefSimple(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefString(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefStruct(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.IsSimple | ( | self, | |
| ftype | |||
| ) |
Returns True (False) is field type is (not) simple. Parameters: ftype - (Derived) field type. Return: True or False.
Definition at line 1974 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.BaseFType().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector(), NetMsgs.NetMsgsXmlParser.NetMsgsXmlParser.XmlCbEndFieldDefConst(), and NetMsgs.NetMsgsXmlParser.NetMsgsXmlParser.XmlCbEndFieldDefMinMax().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCId | ( | self, | |
| xid, | |||
| isGlobal | |||
| ) |
Make C indentifier. Parameters: xid - XML [sub]definition id. isGlobal - Identifier does [not] have global scope. Returns: C identifier.
Definition at line 1758 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mHungarian, and NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefDerived(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefSimple(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefString(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefStruct(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCppMacroName | ( | self, | |
| names | |||
| ) |
Make CPP #define macro name. Parameters: names - List of argument subnames. Returns: String "NS_ARG1_..._ARGN"
Definition at line 1725 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefString(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeTypeSpec | ( | self, | |
| ftype | |||
| ) |
Make C type specifier. Parameters: ftype - Field type. Returns: Type specifier.
Definition at line 1741 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefDerived(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0 | ( | self | ) |
Make initial pass through the XML database and augument with specific C information. No generated C code is written to file output.
Definition at line 151 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef().
Referenced by NetMsgs.NetMsgsGenPy.NetMsgsGenPy.AugmentXmlDB(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.AugmentXmlDB().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef | ( | self, | |
| pathXids, | |||
| xdef, | |||
| depth | |||
| ) |
Process the given XmL definition and add C specific data.
No generated C code is written to file output.
Parameters:
pathXids - Path (list) of XML ftypedef, msgdef, or fielddef
identifiers.
xdef - XML ftypedef, msgdef, or fielddef XML specification.
depth - Recursive definition depth.
Return:
Maximum number of packed bytes required for this encoded definition.
Definition at line 165 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.BaseFType(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefDerived(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefPad(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefSimple(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefString(), NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefStruct(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefStruct().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefDerived | ( | self, | |
| pathXids, | |||
| xdef, | |||
| depth | |||
| ) |
Process derived type XML definition.
Parameters:
pathXids - Path (list) of XML ftypedef, msgdef, or fielddef
identifiers.
xdef - XML ftypedef, msgdef, or fielddef XML specification.
depth - Recursive definition depth.
Return:
Maximum number of packed bytes required for this encoded definition.
Definition at line 484 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.BaseXRef(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCId(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeTypeSpec(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefPad | ( | self, | |
| pathXids, | |||
| xdef, | |||
| depth | |||
| ) |
Process pad XML definition.
Parameters:
pathXids - Path (list) of XML ftypedef, msgdef, or fielddef
identifiers.
xdef - XML ftypedef, msgdef, or fielddef XML specification.
depth - Recursive definition depth.
Return:
Maximum number of packed bytes required for this encoded definition.
Definition at line 216 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.EvalNum(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefSimple | ( | self, | |
| pathXids, | |||
| xdef, | |||
| depth | |||
| ) |
Process simple XML definition.
Parameters:
pathXids - Path (list) of XML ftypedef, msgdef, or fielddef
identifiers.
xdef - XML ftypedef, msgdef, or fielddef XML specification.
depth - Recursive definition depth.
Return:
Maximum number of packed bytes required for this encoded definition.
Definition at line 439 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.EvalNum(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCId(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefString | ( | self, | |
| pathXids, | |||
| xdef, | |||
| depth | |||
| ) |
Process string XML definition.
Parameters:
pathXids - Path (list) of XML ftypedef, msgdef, or fielddef
identifiers.
xdef - XML ftypedef, msgdef, or fielddef XML specification.
depth - Recursive definition depth.
Return:
Maximum number of packed bytes required for this encoded definition.
Definition at line 375 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.EvalNum(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCId(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCppMacroName(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefStruct | ( | self, | |
| pathXids, | |||
| xdef, | |||
| depth | |||
| ) |
Process struct XML definition.
Parameters:
pathXids - Path (list) of XML ftypedef, msgdef, or fielddef
identifiers.
xdef - XML ftypedef, msgdef, or fielddef XML specification.
depth - Recursive definition depth.
Return:
Maximum number of packed bytes required for this encoded definition.
Definition at line 248 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.EvalNum(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCId(), NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml, and NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDefVector | ( | self, | |
| pathXids, | |||
| xdef, | |||
| depth | |||
| ) |
Process vector XML definition.
Parameters:
pathXids - Path (list) of XML ftypedef, msgdef, or fielddef
identifiers.
xdef - XML ftypedef, msgdef, or fielddef XML specification.
depth - Recursive definition depth.
Return:
Maximum number of packed bytes required for this encoded definition.
Definition at line 295 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.BaseFType(), NetMsgs.NetMsgsGenC.NetMsgsGenC.BaseXRef(), NetMsgs.NetMsgsGenC.NetMsgsGenC.EvalNum(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsDeprecated(), NetMsgs.NetMsgsGenC.NetMsgsGenC.IsSimple(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCId(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeCppMacroName(), NetMsgs.NetMsgsGenC.NetMsgsGenC.MakeTypeSpec(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.mXml.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.Pass0XmlDef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintBriefComment | ( | self, | |
| fp, | |||
| brief | |||
| ) |
Print doxygen brief comment block. Parameters: fp - Opened output file pointer. brief - Brief comment.
Definition at line 2346 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenAnonStruct(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFIdEnum(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldDefs(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenLookupTbls(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgDef(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenVectorItemFieldDef(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgIds(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.WriteFTDict(), and NetMsgs.NetMsgsGenPy.NetMsgsGenPy.WriteMsgDefSet().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMajorDivComment | ( | self, | |
| fp, | |||
| comment | |||
| ) |
Prints major file division comment block. Parameters: fp - Opened output file pointer. comment - Major division comment line.
Definition at line 2312 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenPublicFuncDefs(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenClass(), NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenFTDict(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenMsgDefSet(), NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenMsgIds(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenExternData(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenFieldTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgTypes(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenProtoTypes().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintMinorDivComment | ( | self, | |
| fp, | |||
| comment | |||
| ) |
Prints minor file division comment block. Parameters: fp - Opened output file pointer. comment - Minor division comment line.
Definition at line 2329 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenMsgTypes(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenFieldTypes(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenMsgTypes().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.PrettyPrintTopComment | ( | self, | |
| fp, | |||
| srcbasename, | |||
| brief | |||
| ) |
Prints source file top comment block. Parameters: fp - Opened output file pointer. srcbasename - Base name of source file. brief - Brief comment.
Definition at line 2277 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.GenCSource(), NetMsgs.NetMsgsGenC.NetMsgsGenC.GenHSource(), and NetMsgs.NetMsgsGenPy.NetMsgsGenPy.GenSource().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteFDefEntry | ( | self, | |
| fp, | |||
| sFName, | |||
| eFId, | |||
| eFType, | |||
| uOffset, | |||
| this, | |||
| this_init | |||
| ) |
Write an NMFieldDef_T entry. Parameters: fp - Opened output file pointer. sFName - m_sFName value. eFId - m_eFId value. eFType - m_eFType value. uOffset - m_uOffset value. this - m_this.<this> this_init - List of (member, value) this pairs.
Definition at line 1934 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenFieldDefs(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenVectorItemFieldDef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteFuncDef | ( | self, | |
| fp, | |||
| type_qual, | |||
| type_spec, | |||
| funcname, | |||
| funcargs, | |||
| kwargs | |||
| ) |
Write function declaration statement.
func_def ::-
extern type_qual type_spec funcname ( arg_list ) ;
| extern type_spec funcname ( arg_list ) ;
| type_qual type_spec funcname ( arg_list ) { stmts }
| type_spec funcname ( arg_list ) { stmts }
arg_list ::-
empty
! arg_decl
| arg_list , arg_decl
arg_decl ::-
type_qual type_spec cid
type_spec cid
Parameters:
fp - Opened output file pointer.
type_qual - C function type qualifier(s).
type_spec - C function type specifier(s).
funcname - C function identifier.
funcargs - List of function arguments 3-tuple:
(type_qual(s), type_spec(s), cid)
kwargs - Dictionary of optional arguments.
'comments': string
'stmts': string
Definition at line 1865 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.CGenPublicFuncDefs(), NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenProtoTypes(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteTypedefStmt().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteStructDecl | ( | self, | |
| fp, | |||
| indent, | |||
| type_spec, | |||
| cid, | |||
| const_expr, | |||
| kwargs | |||
| ) |
Write commented structure declarator.
struct_decl ::-
type_spec cid ;
| type_spec cid [ const_expr ] ;
Parameters:
fp - Opened output file pointer.
indent - Indentation.
type_spec - C type specifier.
cid - C identifier.
const_expr - C array constant expression. None of not an array.
kwargs - Optional keyword arguments.
'comment':string - Overide default comment.
Definition at line 1777 of file NetMsgsGenC.py.
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteVectortDecl().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteTypedefStmt | ( | self, | |
| fp, | |||
| type_spec, | |||
| cid, | |||
| const_expr | |||
| ) |
Write typedef declaration.
typedef_spec ::-
typedef type_spec cid ;
| typedef type_spec cid [ const_expr ] ;
Parameters:
fp - Opened output file pointer.
type_spec - C type specifier.
cid - C identifier.
const_expr - C array constant expression. None of not an array.
Definition at line 1843 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteFuncDef().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef().
| def NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteVectortDecl | ( | self, | |
| fp, | |||
| indent, | |||
| vtype_spec, | |||
| cid, | |||
| const_expr | |||
| ) |
Write commented structure vector declarator.
struct_vector_decl ::-
struct {
size_t m_count ;
union {
void * m_pAlign ;
vtype_spec m_buf [ const_expr ] ;
} u ;
} cid ;
Parameters:
fp - Opened output file pointer.
indent - Indentation.
vtype_spec - C vector items type specifier.
cid - C identifier.
const_expr - C array constant expression. None of not an array.
kwargs - Optional keyword arguments.
'comment':string - Overide default comment.
Definition at line 1805 of file NetMsgsGenC.py.
References NetMsgs.NetMsgsGenC.NetMsgsGenC.WriteStructDecl().
Referenced by NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenStructDeclList(), and NetMsgs.NetMsgsGenC.NetMsgsGenC.HGenTypedef().