Hello

we took the following ansi tcap asn1 code from T1.114(spec ).

while generating the .c and .h we are facing problems.

it's giving : OperationCode , parameter , Error undifined...

please guide me.this is urgent.

when we add the IMPORT statement it is giving the parse error.

if u have ansi tcap asn1 code please send it across.it is quite urgent.

Also i want to know what is the component structure of ANSI TCAP .

The Code is ............

TCAPPackage {iso(1) memberbody(2) usa(840) t1-114(10013) modules(0) tcapPackage(0) version4(4)}

DEFINITIONS ::=

BEGIN

--IMPORTS OPERATION , ERROR FROM { iso(1) memberbody(2) usa(840) t1-114(10013) modules(0) tcapPackage(0) version4(4)};

 

OPERATION ::=CLASS {

&ArgumentType OPTIONAL ,

&argumentTypeOptional BOOLEAN OPTIONAL ,

&returnResult BOOLEAN DEFAULT TRUE ,

&ResultType OPTIONAL ,

&resultTypeOptional BOOLEAN OPTIONAL ,

&Errors ERROR OPTIONAL ,

&Linked OPERATION OPTIONAL ,

&synchronous BOOLEAN DEFAULT FALSE ,

&alwaysReturns BOOLEAN DEFAULT TRUE ,

&InvokePriority Priority OPTIONAL ,

&ResultPriority Priority OPTIONAL ,

&invokeLast BOOLEAN DEFAULT FALSE ,

&operationCode OPERATIONCode UNIQUE OPTIONAL

}

WITH SYNTAX {

[ARGUMENT &ARGUMENTTYPE [ OPTIONAL &argumentTypeOptional ] ]

[RESULT &ResultType [ OPTIONAL &resultTypeOptional ] ]

[RETURN RESULT &returnResult ]

[ERRORS &Errors ]

[LINKED &Linked ]

[SYNCHRONOUS &synchronous ]

[ALWAYS RETURNS &alwaysReturns ]

[INVOKE PRIORITY &InvokePriority ]

[RESULT PRIORITY &ResultPriority ]

[LAST &invokeLast ]

[CODE &operationCode ]

[PARAMETER &ParameterType [ OPTIONAL &ParameterTypeOPTIONAL ] ]

}

ERROR ::= CLASS {

&ParameterType OPTIONAL ,

&ParameterTypeOPTIONAL BOOLEAN OPTIONAL ,

&ErrorPriority Priority OPTIONAL ,

&errorCode ErrorCode UNIQUE OPTIONAL

}

WITH SYNTAX {

[PARAMETER &ParameterType [ OPTIONAL &ParameterTypeOPTIONAL ] ]

[PRIORITY &ErrorPriority ]

[CODE &errorCode ]

}

PackageType ::= CHOICE

{

unidirectional [ PRIVATE 1 ] IMPLICIT UniTransactionPDU ,

queryWithPerm [ PRIVATE 2 ] IMPLICIT TransactionPDU ,

queryWithoutPerm [ PRIVATE 3 ] IMPLICIT TransactionPDU ,

response [ PRIVATE 4 ] IMPLICIT TransactionPDU ,

conversationWithPerm [ PRIVATE 5 ] IMPLICIT TransactionPDU ,

conversationWithoutPerm [ PRIVATE 6 ] IMPLICIT TransactionPDU ,

abort [ PRIVATE 22 ] IMPLICIT Abort

}

UniTransactionPDU ::= SEQUENCE

{

identifier TransactionID ,

--dialoguePortion DialoguePortion OPTIONAL ,

componentPortion ComponentSequence OPTIONAL

}

TransactionPDU ::= SEQUENCE

{

identifier TransactionID ,

--dialoguePortion DialoguePortion OPTIONAL ,

componentPortion ComponentSequence OPTIONAL

}

--TransactionPDU should include either a Dialogue Portion , a Component Sequence or both

TransactionID ::= [PRIVATE 7 ] IMPLICIT OCTET STRING

-- 0 (zero) Octet for Unidirectional,4 Octet for Query , Response And Abort

-- 8 Octet for Conversation in the order Originating then Responding TID

Abort ::= SEQUENCE

{

identifier TransactionID ,

--dialoguePortion DialoguePortion OPTIONAL ,

causeInformation CHOICE {

abortCause P-Abort-cause ,

--userInformation UserAbortInformation OPTIONAL

... }

}

--when the Abort package is generated by the Transaction sublayer,

--the P-Abort-cause must be present

P-Abort-cause ::= [ PRIVATE 23 ] IMPLICIT INTEGER {

unrecognizedPackageType ( 1 ) ,

incorrestTransactionPortion ( 2 ) ,

badlyStructuredTransactionPortion ( 3 ) ,

unassignedRespondingTransactionID ( 4 ) ,

permissionToReleaseProblem ( 5 ) ,

resourceUnavilable ( 6 ) ,

unrecognizedDialoguePortionID ( 7 ) ,

badlyStructuredDialoguePortion ( 8 ) ,

missingDialoguePortion ( 9 ) ,

inconsistentDialoguePortion ( 10 ) }

--DialoguePortion ::= [ PRIVATE 25 ] IMPLICIT SEQUENCE {

--version ProtocolVersion OPTIONAL ,

--applicationContext [0] CHOICE {

-- integerApplicationId IntegerApplicationContext ,

-- objectApplicationId ObjectIDApplicationContext

-- } OPTIONAL ,

--userInformation UserInformation OPTIONAL ,

--securityContext CHOICE {

-- integerSecurityId [ 0 ] IMPLICIT INTEGER ,

-- objectSecurityId [ 1 ] IMPLICIT OBJECT IDENTIFIER

-- } OPTIONAL ,

--confidentiality [ 2 ] IMPLICIT Confidentiality OPTIONAL ,

-- ... }

--ProtocolVersion ::= [ PRIVATE 26 ] IMPLICIT OCTET STRING ( SIZE(1) )

--IntegerApplicationContext ::= [ PRIVATE 27 ] IMPLICIT INTEGER

--ObjectIDApplicationContext ::= [ PRIVATE 28 ] IMPLICIT OBJECT IDENTIFIER

--UserInformation ::= [ PRIVATE 29 ] IMPLICIT SEQUENCE OF EXTERNAL

--Confidentiality ::= SEQUENCE {

-- confidentialityId CHOICE {

-- integerConfidentialityId [ 0 ] IMPLICIT INTEGER ,

-- objectConfidentialityId [ 1 ] IMPLICIT OBJECT IDENTIFIER

-- } OPTIONAL ,

-- ... }

--UserAbortInformation ::= [ PRIVATE 24 ] EXTERNAL

ComponentSequence ::= [ PRIVATE 8 ] IMPLICIT SEQUENCE OF ComponentPDU

ComponentPDU { InvokeId:InvokeIdSet,OPERATION:Invocable,OPERATION:Returnable } ::=

CHOICE {

invokeLast [ PRIVATE 9 ] IMPLICIT Invoke {{InvokeIdSet},{Invocable}},

returnResultLast [ PRIVATE 10 ] IMPLICIT ReturnResult{{Returnable}} ,

returnError [ PRIVATE 11 ] IMPLICIT ReturnError {{Errors{{Returnable}}}} ,

reject [ PRIVATE 12 ] IMPLICIT Reject ,

invokeNotLast [ PRIVATE 13 ] IMPLICIT Invoke {{InvokeIdSet},{Invocable}} ,

returnResultNotLast [ PRIVATE 14 ] IMPLICIT ReturnResult{{Returnable}}

}

Invoke{InvokeID:InvokeIdSet,OPERATION:Operations } ::= SEQUENCE {

componentIDs [ PRIVATE 15 ] IMPLICIT OCTET STRING (SIZE(0..2)) OPTIONAL ,

operationCode OPERATION.&operationCode ,

--parameter OPERATION.&ParameterType OPTIONAL

--parameter OPERATION.&ParameterType OPTIONAL

parameter CHOICE {

--paramSequence [PRIVATE 16 ] IMPLICIT SEQUENCE { } ,

paramSet [PRIVATE 18 ] IMPLICIT SET {

parameter OPERATION.&ParameterType OPTIONAL

}

}

}

(CONSTRAINED BY { --must conform to the above definition -- }

! RejectProblem:general-incorrectComponentPortion )

(CONSTRAINED BY { --must have consistent encoding -- }

! RejectProblem:general-badlyStructuredCompPortion )

(CONSTRAINED BY { --must conform to T1.114.3 encoding rules -- }

! RejectProblem:general-incorrectComponentCoding )

ReturnResult { OPERATION:Operations } ::= SEQUENCE {

componentID [ PRIVATE 15 ] IMPLICIT OCTET STRING ( SIZE(1) ) ,

parameter OPERATION.&ResultType

({Operations}{@opcode})

OPTIONAL

}

(CONSTRAINED BY { --must conform to the above definition -- }

! RejectProblem:general-incorrectComponentPortion )

(CONSTRAINED BY { --must have consistent encoding -- }

! RejectProblem:general-badlyStructuredCompPortion )

(CONSTRAINED BY { --must conform to T1.114.3 encoding rules -- }

! RejectProblem:general-incorrectComponentCoding )

ReturnError{ERROR:Errors} ::= SEQUENCE {

componentID [PRIVATE 15 ] IMPLICIT OCTET STRING ( SIZE (1) ) ,

errorCode ERROR.&errorCode ,

parameter ERROR.&ParameterType

OPTIONAL

}

(CONSTRAINED BY { --must conform to the above definition -- }

! RejectProblem:general-incorrectComponentPortion )

(CONSTRAINED BY { --must have consistent encoding -- }

! RejectProblem:general-badlyStructuredCompPortion )

(CONSTRAINED BY { --must conform to T1.114.3 encoding rules -- }

! RejectProblem:general-incorrectComponentCoding )

Reject ::= SEQUENCE {

componentID [PRIVATE 15 ] IMPLICIT OCTET STRING ( SIZE ( 0.. 1 ) ) ,

rejectProblem [PRIVATE 21 ] IMPLICIT Problem ,

parameter CHOICE {

paramSequence [PRIVATE 16 ] IMPLICIT SEQUENCE { } ,

paramSet [PRIVATE 18 ] IMPLICIT SET { }

}

}

(CONSTRAINED BY { --must conform to the above definition -- }

! RejectProblem:general-incorrectComponentPortion )

(CONSTRAINED BY { --must have consistent encoding -- }

! RejectProblem:general-badlyStructuredCompPortion )

(CONSTRAINED BY { --must conform to T1.114.3 encoding rules -- }

! RejectProblem:general-incorrectComponentCoding )

Problem ::= INTEGER {

general-unrecognisedComponentType (257) ,

general-incorrectComponentPortion ( 258 ) ,

general-badlyStructuredCompPortion ( 259 )

}

END -- end of the TCAP Package Module

 

 

 

 

Reply via email to