#ifndef _asn1module_h_
#define _asn1module_h_
typedef enum
{
PRESENT_CT = 0,
ABSENT_CT = 1,
EMPTY_CT = 2,
OPTIONAL_CT = 3
} ConstraintEnum;
typedef enum
{
FULL_CT = 0,
PARTIAL_CT = 1,
SINGLE_CT = 2
} InnerSubtypeEnum;
typedef enum
{
SNMP_MANDATORY = 0,
SNMP_OPTIONAL = 1,
SNMP_OBSOLETE = 2,
SNMP_DEPRECATED = 3
} SnmpObjectTypeMacroTypeEnum1;
typedef enum
{
SNMP_READ_ONLY = 0,
SNMP_READ_WRITE = 1,
SNMP_WRITE_ONLY = 2,
SNMP_NOT_ACCESSIBLE = 3
} SnmpObjectTypeMacroTypeEnum;
typedef enum
{
CONSUMER_PORT = 0,
SUPPLIER_PORT = 1,
SYMMETRIC_PORT = 2
} AsnPortEnum;
typedef enum
{
EXPORTS_ALL = 0,
EXPORTS_NOTHING = 1,
EXPORTS_SOME = 2
} ModuleEnum2;
typedef enum
{
EXPLICIT_TAGS = 0,
IMPLICIT_TAGS = 1
} ModuleEnum1;
typedef enum
{
MOD_OK = 0,
MOD_NOT_LINKED = 1,
MOD_ERROR = 2
} ModuleEnum;
typedef AsnInt AsnRefineMacroType;
typedef enum
{
MIN_INT = 0,
MAX_INT = 1
} SpecialIntegerValue;
typedef enum
{
MINUS_INFINITY_REAL = 0,
PLUS_INFINITY_REAL = 1
} SpecialRealValue;
typedef enum
{
C_CHOICE = 0,
C_LIST = 1,
C_ANY = 2,
C_ANYDEFINEDBY = 3,
C_LIB = 4,
C_STRUCT = 5,
C_TYPEREF = 6,
C_NO_TYPE = 7,
C_TYPEDEF = 8
} CTypeId;
typedef struct OidOrInt
{
enum OidOrIntChoiceId
{
OIDORINT_OID,
OIDORINT_INTID
} choiceId;
union OidOrIntChoiceUnion
{
AsnOid *oid;
AsnInt intId;
} a;
} OidOrInt;
typedef AsnList OidList;
typedef char *MyString;
typedef struct ModuleId
{
MyString name;
OID *oid;
} ModuleId;
typedef struct AnyRef
{
MyString anyIdName;
struct OidOrInt *id;
} AnyRef;
typedef AsnList AnyRefList;
typedef AsnList AttributeList;
typedef MyString MacroDef;
typedef AsnList ImportModuleList;
typedef AsnList ImportElmtList;
typedef AsnList TypeDefList;
typedef AsnList TagList;
typedef AsnList NamedTypeList;
typedef AsnList ValueList;
typedef AsnList TypeOrValueList;
typedef AsnList AsnPortList;
typedef AsnList SubtypeList;
typedef AsnList ConstraintList;
typedef AsnList ValueDefList;
typedef struct ImportElmtChoice
{
enum ImportElmtChoiceChoiceId
{
IMPORTELMTCHOICE_TYPE,
IMPORTELMTCHOICE_VALUE
} choiceId;
union ImportElmtChoiceChoiceUnion
{
struct TypeDef *type;
struct ValueDef *value;
} a;
} ImportElmtChoice;
typedef struct Module
{
ModuleEnum status;
struct ModuleId *modId;
ModuleEnum1 tagDefault;
ModuleEnum2 exportStatus;
ImportModuleList *imports;
TypeDefList *typeDefs;
ValueDefList *valueDefs;
AsnBool hasAnys;
MyString asn1SrcFileName;
MyString cHdrFileName;
MyString cSrcFileName;
MyString cxxHdrFileName;
MyString cxxSrcFileName;
#ifdef _IBM_ENC_
MyString dbHdrFileName;
MyString dbSrcFileName;
#endif
#if META
MyString cxxname;
#endif
#if IDL
MyString idlFileName;
MyString idlname;
#endif
} Module;
typedef struct ImportModule
{
struct ModuleId *modId;
ImportElmtList *importElmts;
struct Module *moduleRef;
AsnInt lineNo;
} ImportModule;
typedef struct ImportElmt
{
struct ImportElmtChoice *resolvedRef;
MyString name;
AsnBool privateScope;
AsnInt lineNo;
} ImportElmt;
typedef struct TypeDef
{
AsnBool exported;
AsnBool recursive;
AsnBool isPdu;
AsnInt localRefCount;
AsnInt importRefCount;
AsnInt tmpRefCount;
AsnBool visited;
MyString definedName;
struct Type *type;
struct CTDI *cTypeDefInfo;
struct CxxTDI *cxxTypeDefInfo;
struct IDLTDI *idlTypeDefInfo;
AttributeList *attrList;
TypeDefList *refList;
AnyRefList *anyRefs;
} TypeDef;
typedef struct Tag
{
AsnInt tclass;
AsnInt form;
AsnInt code;
AsnBool explicit;
struct Value *valueRef;
} Tag;
typedef struct Type
{
AsnBool optional;
AsnBool implicit;
TagList *tags;
struct NamedValue *defaultVal;
struct Subtype *subtypes;
struct BasicType *basicType;
AsnInt lineNo;
struct CTRI *cTypeRefInfo;
struct CxxTRI *cxxTypeRefInfo;
struct IDLTRI *idlTypeRefInfo;
AttributeList *attrList;
} Type;
typedef ValueDefList NamedNumberList;
typedef struct BasicType
{
enum BasicTypeChoiceId
{
BASICTYPE_UNKNOWN,
BASICTYPE_BOOLEAN,
BASICTYPE_INTEGER,
BASICTYPE_BITSTRING,
BASICTYPE_OCTETSTRING,
BASICTYPE_NULL,
BASICTYPE_OID,
BASICTYPE_REAL,
BASICTYPE_ENUMERATED,
BASICTYPE_SEQUENCE,
BASICTYPE_SEQUENCEOF,
BASICTYPE_SET,
BASICTYPE_SETOF,
BASICTYPE_CHOICE,
BASICTYPE_SELECTION,
BASICTYPE_COMPONENTSOF,
BASICTYPE_ANY,
BASICTYPE_ANYDEFINEDBY,
BASICTYPE_LOCALTYPEREF,
BASICTYPE_IMPORTTYPEREF,
BASICTYPE_MACROTYPE,
BASICTYPE_MACRODEF
} choiceId;
union BasicTypeChoiceUnion
{
AsnNull unknown;
AsnNull boolean;
NamedNumberList *integer;
NamedNumberList *bitString;
AsnNull octetString;
AsnNull null;
AsnNull oid;
AsnNull real;
NamedNumberList *enumerated;
NamedTypeList *sequence;
struct Type *sequenceOf;
NamedTypeList *set;
struct Type *setOf;
NamedTypeList *choice;
struct SelectionType *selection;
struct Type *componentsOf;
AsnNull any;
struct AnyDefinedByType *anyDefinedBy;
struct TypeRef *localTypeRef;
struct TypeRef *importTypeRef;
struct MacroType *macroType;
MacroDef macroDef;
} a;
} BasicType;
typedef struct MacroType
{
enum MacroTypeChoiceId
{
MACROTYPE_ROSOPERATION,
MACROTYPE_ROSERROR,
MACROTYPE_ROSBIND,
MACROTYPE_ROSUNBIND,
MACROTYPE_ROSASE,
MACROTYPE_ROSAC,
MACROTYPE_MTSASEXTENSION,
MACROTYPE_MTSASEXTENSIONS,
MACROTYPE_MTSASEXTENSIONATTRIBUTE,
MACROTYPE_MTSASTOKEN,
MACROTYPE_MTSASTOKENDATA,
MACROTYPE_MTSASSECURITYCATEGORY,
MACROTYPE_ASNOBJECT,
MACROTYPE_ASNPORT,
MACROTYPE_ASNREFINE,
MACROTYPE_ASNABSTRACTBIND,
MACROTYPE_ASNABSTRACTUNBIND,
MACROTYPE_ASNABSTRACTOPERATION,
MACROTYPE_ASNABSTRACTERROR,
MACROTYPE_AFALGORITHM,
MACROTYPE_AFENCRYPTED,
MACROTYPE_AFPROTECTED,
MACROTYPE_AFSIGNATURE,
MACROTYPE_AFSIGNED,
MACROTYPE_SNMPOBJECTTYPE
} choiceId;
union MacroTypeChoiceUnion
{
struct RosOperationMacroType *rosOperation;
struct RosErrorMacroType *rosError;
struct RosBindMacroType *rosBind;
struct RosBindMacroType *rosUnbind;
struct RosAseMacroType *rosAse;
struct RosAcMacroType *rosAc;
struct MtsasExtensionMacroType *mtsasExtension;
struct MtsasExtensionsMacroType *mtsasExtensions;
struct MtsasExtensionAttributeMacroType *mtsasExtensionAttribute;
struct MtsasTokenMacroType *mtsasToken;
struct MtsasTokenDataMacroType *mtsasTokenData;
struct MtsasSecurityCategoryMacroType *mtsasSecurityCategory;
struct AsnObjectMacroType *asnObject;
struct AsnPortMacroType *asnPort;
AsnRefineMacroType asnRefine;
struct AsnAbstractBindMacroType *asnAbstractBind;
struct AsnAbstractBindMacroType *asnAbstractUnbind;
struct RosOperationMacroType *asnAbstractOperation;
struct RosErrorMacroType *asnAbstractError;
struct Type *afAlgorithm;
struct Type *afEncrypted;
struct Type *afProtected;
struct Type *afSignature;
struct Type *afSigned;
struct SnmpObjectTypeMacroType *snmpObjectType;
} a;
} MacroType;
typedef struct AnyDefinedByType
{
MyString fieldName;
struct NamedType *link;
} AnyDefinedByType;
typedef struct SelectionType
{
MyString fieldName;
struct Type *typeRef;
struct NamedType *link;
} SelectionType;
typedef struct NamedType
{
MyString fieldName;
struct Type *type;
} NamedType;
typedef struct TypeRef
{
MyString typeName;
MyString moduleName;
struct Module *module;
struct TypeDef *link;
} TypeRef;
typedef struct RosOperationMacroType
{
struct NamedType *arguments;
struct NamedType *result;
TypeOrValueList *errors;
TypeOrValueList *linkedOps;
} RosOperationMacroType;
typedef struct TypeOrValue
{
enum TypeOrValueChoiceId
{
TYPEORVALUE_TYPE,
TYPEORVALUE_VALUE
} choiceId;
union TypeOrValueChoiceUnion
{
struct Type *type;
struct Value *value;
} a;
} TypeOrValue;
typedef struct RosErrorMacroType
{
struct NamedType *parameter;
} RosErrorMacroType;
typedef struct RosBindMacroType
{
struct NamedType *argument;
struct NamedType *result;
struct NamedType *error;
} RosBindMacroType;
typedef struct RosAseMacroType
{
ValueList *operations;
ValueList *consumerInvokes;
ValueList *supplierInvokes;
} RosAseMacroType;
typedef struct RosAcMacroType
{
ValueList *nonRoElements;
struct Type *bindMacroType;
struct Type *unbindMacroType;
struct Value *remoteOperations;
ValueList *operationsOf;
ValueList *initiatorConsumerOf;
ValueList *responderConsumerOf;
OidList *abstractSyntaxes;
} RosAcMacroType;
typedef struct MtsasExtensionMacroType
{
struct NamedType *elmtType;
struct Value *defaultValue;
AsnBool *criticalForSubmission;
AsnBool *criticalForTransfer;
AsnBool *criticalForDelivery;
} MtsasExtensionMacroType;
typedef struct MtsasExtensionsMacroType
{
ValueList *extensions;
} MtsasExtensionsMacroType;
typedef struct MtsasExtensionAttributeMacroType
{
struct Type *type;
} MtsasExtensionAttributeMacroType;
typedef struct MtsasTokenMacroType
{
struct Type *type;
} MtsasTokenMacroType;
typedef struct MtsasTokenDataMacroType
{
struct Type *type;
} MtsasTokenDataMacroType;
typedef struct MtsasSecurityCategoryMacroType
{
struct Type *type;
} MtsasSecurityCategoryMacroType;
typedef struct AsnObjectMacroType
{
AsnPortList *ports;
} AsnObjectMacroType;
typedef struct AsnPort
{
struct Value *portValue;
AsnPortEnum portType;
} AsnPort;
typedef struct AsnPortMacroType
{
TypeOrValueList *abstractOps;
TypeOrValueList *consumerInvokes;
TypeOrValueList *supplierInvokes;
} AsnPortMacroType;
typedef struct AsnAbstractBindMacroType
{
AsnPortList *ports;
struct Type *type;
} AsnAbstractBindMacroType;
typedef struct SnmpObjectTypeMacroType
{
struct Type *syntax;
SnmpObjectTypeMacroTypeEnum access;
SnmpObjectTypeMacroTypeEnum1 status;
struct Value *description;
struct Value *reference;
TypeOrValueList *index;
struct Value *defVal;
} SnmpObjectTypeMacroType;
typedef struct Subtype
{
enum SubtypeChoiceId
{
SUBTYPE_SINGLE,
SUBTYPE_AND,
SUBTYPE_OR,
SUBTYPE_NOT
} choiceId;
union SubtypeChoiceUnion
{
struct SubtypeValue *single;
SubtypeList *and;
SubtypeList *or;
struct Subtype *not;
} a;
} Subtype;
typedef struct SubtypeValue
{
enum SubtypeValueChoiceId
{
SUBTYPEVALUE_SINGLEVALUE,
SUBTYPEVALUE_CONTAINED,
SUBTYPEVALUE_VALUERANGE,
SUBTYPEVALUE_PERMITTEDALPHABET,
SUBTYPEVALUE_SIZECONSTRAINT,
SUBTYPEVALUE_INNERSUBTYPE
} choiceId;
union SubtypeValueChoiceUnion
{
struct Value *singleValue;
struct Type *contained;
struct ValueRangeSubtype *valueRange;
struct Subtype *permittedAlphabet;
struct Subtype *sizeConstraint;
struct InnerSubtype *innerSubtype;
} a;
} SubtypeValue;
typedef struct ValueRangeSubtype
{
AsnBool lowerEndInclusive;
AsnBool upperEndInclusive;
struct Value *lowerEndValue;
struct Value *upperEndValue;
} ValueRangeSubtype;
typedef struct InnerSubtype
{
InnerSubtypeEnum constraintType;
ConstraintList *constraints;
} InnerSubtype;
typedef struct Constraint
{
MyString fieldRef;
ConstraintEnum presenceConstraint;
struct Subtype *valueConstraints;
} Constraint;
typedef struct ValueDef
{
AsnBool exported;
MyString definedName;
struct Value *value;
} ValueDef;
typedef struct Value
{
struct Type *type;
AsnInt valueType;
struct BasicValue *basicValue;
AsnInt lineNo;
} Value;
typedef struct BasicValue
{
enum BasicValueChoiceId
{
BASICVALUE_UNKNOWN,
BASICVALUE_EMPTY,
BASICVALUE_INTEGER,
BASICVALUE_SPECIALINTEGER,
BASICVALUE_LONGINTEGER,
BASICVALUE_BOOLEAN,
BASICVALUE_REAL,
BASICVALUE_SPECIALREAL,
BASICVALUE_ASCIITEXT,
BASICVALUE_ASCIIHEX,
BASICVALUE_ASCIIBITSTRING,
BASICVALUE_OID,
BASICVALUE_LINKEDOID,
BASICVALUE_BERVALUE,
BASICVALUE_PERVALUE,
BASICVALUE_NAMEDVALUE,
BASICVALUE_NULL,
BASICVALUE_LOCALVALUEREF,
BASICVALUE_IMPORTVALUEREF,
BASICVALUE_VALUENOTATION
} choiceId;
union BasicValueChoiceUnion
{
AsnNull unknown;
AsnNull empty;
AsnInt integer;
SpecialIntegerValue specialInteger;
AsnInt longInteger;
AsnBool boolean;
AsnReal real;
SpecialRealValue specialReal;
AsnOcts *asciiText;
AsnOcts *asciiHex;
AsnOcts *asciiBitString;
AsnOid *oid;
OID *linkedOid;
AsnOcts *berValue;
AsnOcts *perValue;
struct NamedValue *namedValue;
AsnNull null;
struct ValueRef *localValueRef;
struct ValueRef *importValueRef;
AsnOcts *valueNotation;
} a;
} BasicValue;
typedef struct ValueRef
{
MyString valueName;
MyString moduleName;
struct ValueDef *link;
struct Module *module;
} ValueRef;
typedef struct NamedValue
{
MyString fieldName;
struct Value *value;
} NamedValue;
typedef AsnList ModuleList;
typedef struct Modules
{
AsnInt creationTime;
ModuleList *modules;
} Modules;
typedef AsnList NamedValueList;
typedef struct CTDI
{
enum BasicTypeChoiceId asn1TypeId;
CTypeId cTypeId;
MyString cTypeName;
AsnBool isPdu;
AsnBool isEncDec;
AsnBool isPtrForTypeDef;
AsnBool isPtrForTypeRef;
AsnBool isPtrInChoice;
AsnBool isPtrForOpt;
MyString optTestRoutineName;
MyString defaultFieldName;
MyString printRoutineName;
MyString encodeRoutineName;
MyString decodeRoutineName;
MyString freeRoutineName;
AsnBool genPrintRoutine;
AsnBool genEncodeRoutine;
AsnBool genDecodeRoutine;
AsnBool genFreeRoutine;
AsnBool genTypeDef;
} CTDI;
typedef struct CNamedElmt
{
MyString name;
AsnInt value;
} CNamedElmt;
typedef struct CxxTDI
{
enum BasicTypeChoiceId asn1TypeId;
MyString className;
AsnBool isPdu;
AsnBool isEnc;
AsnBool isPtrForTypeDef;
AsnBool isPtrForOpt;
AsnBool isPtrInChoice;
AsnBool isPtrInSetAndSeq;
AsnBool isPtrInList;
MyString optTestRoutineName;
MyString defaultFieldName;
} CxxTDI;
typedef struct IDLTDI
{
enum BasicTypeChoiceId asn1TypeId;
MyString typeName;
AsnBool isPdu;
AsnBool isEnc;
AsnBool isPtrForTypeDef;
AsnBool isPtrForOpt;
AsnBool isPtrInChoice;
AsnBool isPtrInSetAndSeq;
AsnBool isPtrInList;
MyString optTestRoutineName;
MyString defaultFieldName;
} IDLTDI;
typedef AsnList CNamedElmts;
typedef struct CxxTRI
{
AsnBool isEnc;
MyString className;
MyString fieldName;
AsnBool isPtr;
CNamedElmts *namedElmts;
MyString choiceIdSymbol;
AsnInt choiceIdValue;
MyString optTestRoutineName;
} CxxTRI;
typedef struct IDLTRI
{
AsnBool isEnc;
MyString typeName;
MyString fieldName;
AsnBool isPtr;
CNamedElmts *namedElmts;
MyString choiceIdSymbol;
AsnInt choiceIdValue;
MyString optTestRoutineName;
} IDLTRI;
typedef struct CTRI
{
CTypeId cTypeId;
MyString cFieldName;
MyString cTypeName;
AsnBool isPtr;
CNamedElmts *cNamedElmts;
AsnInt choiceIdValue;
MyString choiceIdSymbol;
MyString choiceIdEnumName;
MyString choiceIdEnumFieldName;
MyString optTestRoutineName;
MyString printRoutineName;
MyString encodeRoutineName;
MyString decodeRoutineName;
MyString freeRoutineName;
AsnBool isEncDec;
} CTRI;
#endif