Commit 08bac05c authored by fetke's avatar fetke
Browse files

added more annotations for the codec generator

parent 6f1df344
Loading
Loading
Loading
Loading
+45 −43
Original line number Diff line number Diff line
@@ -93,43 +93,43 @@ module ePassport_Types {
			} with {variant "isPdu;"};
			
			type Command CommandDeactivateFile with {variant "isPdu;present=bits(5,8,0x04);"};
			type Command CommandEraseRecords;
			type Command CommandEraseBinary;
			type Command CommandPerformScqlOperation; 
			type Command CommandPerformTransactionOperation;
			type Command CommandPerformUserOPeration;
			type Command CommandVerify;
			type Command CommandManageSecurityEnvironment;
			type Command CommandChangeReferenceData; 
			type Command CommandDisableVerificationRequirement;
			type Command CommandEnableVerificationRequirement;
			type Command CommandPerformSecurityOperation;
			type Command CommandResetRetryCounter;
			type Command CommandActivateFile;
			type Command CommandGenerateAsymmetricKeyPair;
			type Command CommandManageChannel;
			type Command CommandExternalOrMutualAuthenticate; 
			type Command CommandGetChallenge;
			type Command CommandGeneralAuthenticate; 
			type Command CommandInternalAuthenticate;
			type Command CommandSearchBinary;
			type Command CommandSearchRecord;
			type Command CommandSelect;
			type Command CommandReadBinary;
			type Command CommandReadRecords;
			type Command CommandGetResponse;
			type Command CommandEnvelope;
			type Command CommandGetData;
			type Command CommandWriteBinary;
			type Command CommandWriteRecord;
			type Command CommandUpdateBinary;
			type Command CommandPutDataWith;
			type Command CommandUpdateRecord;
			type Command CommandCreateFile;
			type Command CommandAppendRecord;
			type Command CommandDeleteFile;
			type Command CommandTerminateDF;
			type Command CommandTerminateCardUsage;
			type Command CommandEraseRecords with {variant "isPdu;present=bits(5,8,0x0C);"};
			type Command CommandEraseBinary with {variant "isPdu;present=bits(5,8,0x0E)||bits(5,8,0x0F);"};
			type Command CommandPerformScqlOperation with {variant "isPdu;present=bits(5,8,0x10);"}; 
			type Command CommandPerformTransactionOperation with {variant "isPdu;present=bits(5,8,0x12);"};
			type Command CommandPerformUserOperation with {variant "isPdu;present=bits(5,8,0x14);"};
			type Command CommandVerify with {variant "isPdu;present=bits(5,8,0x20)||bits(5,8,0x21);"};
			type Command CommandManageSecurityEnvironment with {variant "isPdu;present=bits(5,8,0x22);"};
			type Command CommandChangeReferenceData with {variant "isPdu;present=bits(5,8,0x24);"}; 
			type Command CommandDisableVerificationRequirement with {variant "isPdu;present=bits(5,8,0x26);"};
			type Command CommandEnableVerificationRequirement with {variant "isPdu;present=bits(5,8,0x28);"};
			type Command CommandPerformSecurityOperation with {variant "isPdu;present=bits(5,8,0x2A);"};
			type Command CommandResetRetryCounter with {variant "isPdu;present=bits(5,8,0x2C);"};
			type Command CommandActivateFile with {variant "isPdu;present=bits(5,8,0x44);"};
			type Command CommandGenerateAsymmetricKeyPair with {variant "isPdu;present=bits(5,8,0x46);"};
			type Command CommandManageChannel with {variant "isPdu;present=bits(5,8,0x70);"};
			type Command CommandExternalOrMutualAuthenticate with {variant "isPdu;present=bits(5,8,0x82);"}; 
			type Command CommandGetChallenge with {variant "isPdu;present=bits(5,8,0x84);"};
			type Command CommandGeneralAuthenticate with {variant "isPdu;present=bits(5,8,0x87);"}; 
			type Command CommandInternalAuthenticate with {variant "isPdu;present=bits(5,8,0x88);"};
			type Command CommandSearchBinary with {variant "isPdu;present=bits(5,8,0xA0)||bits(5,8,0xA1);"};
			type Command CommandSearchRecord with {variant "isPdu;present=bits(5,8,0xA2);"};
			type Command CommandSelect with {variant "isPdu;present=bits(5,8,0xA4);"};
			type Command CommandReadBinary with {variant "isPdu;present=bits(5,8,0xB0)||bits(5,8,0xB1);"};
			type Command CommandReadRecords with {variant "isPdu;present=bits(5,8,0xB2)||bits(5,8,0xB3);"};
			type Command CommandGetResponse with {variant "isPdu;present=bits(5,8,0xC0);"};
			type Command CommandEnvelope with {variant "isPdu;present=bits(5,8,0xC2)||bits(5,8,0xC3);"};
			type Command CommandGetData with {variant "isPdu;present=bits(5,8,0xCA);"};
			type Command CommandWriteBinary with {variant "isPdu;present=bits(5,8,0xD0)||bits(5,8,0xD1);"};
			type Command CommandWriteRecord with {variant "isPdu;present=bits(5,8,0xD2);"};
			type Command CommandUpdateBinary with {variant "isPdu;present=bits(5,8,0xD6)||bits(5,8,0xD7);"};
			type Command CommandPutDataWith with {variant "isPdu;present=bits(5,8,0xDA)||bits(5,8,0xDB);"};
			type Command CommandUpdateRecord with {variant "isPdu;present=bits(5,8,0xDC)||bits(5,8,0xDD);"};
			type Command CommandCreateFile with {variant "isPdu;present=bits(5,8,0xE0);"};
			type Command CommandAppendRecord with {variant "isPdu;present=bits(5,8,0xE2);"};
			type Command CommandDeleteFile with {variant "isPdu;present=bits(5,8,0xE4);"};
			type Command CommandTerminateDF with {variant "isPdu;present=bits(5,8,0xE6)||bits(5,8,0xE8);"};
			type Command CommandTerminateCardUsage with {variant "isPdu;present=bits(5,8,0xFE);"};
			
			type union Payload {
				PlainTextPayload 	plainText,
@@ -139,6 +139,9 @@ module ePassport_Types {
			type record PlainTextPayload {
                 CommandData    commandData optional,  // TODO: codec has to insert the length (lengthC!) automatically!
                 LengthE 	    lengthE optional  // this is the maximum length of the response
            } with {
                variant
                "use=com.testingtech.ttcn.tci.helper.EPassportCodecHelper;encode=EPassportCodecHelper.encodePlainTextPayload();decode=EPassportCodecHelper.decodePlainTextPayload();"
			};

    		type octetstring CommandData;
@@ -155,7 +158,8 @@ module ePassport_Types {
                 FirstInterindustryClass	first,
                 FurtherInterindustryClass 	further
            } with {
              variant "decode=;encode=;";	//TODO codec => add method name
	             variant
                 "use=com.testingtech.ttcn.tci.helper.EPassportCodecHelper;encode=EPassportCodecHelper.encodeClass();decode=EPassportCodecHelper.decodeClass();"
            };
            
            type record FirstInterindustryClass {
@@ -175,7 +179,7 @@ module ePassport_Types {
			with {
				variant
				"use=com.testingtech.ttcn.tci.helper.EPassportCodecHelper;encode=EPassportCodecHelper.encodeFurtherLogicalChannelNumber();decode=EPassportCodecHelper.decodeFurtherLogicalChannelNumber();"
			} //TODO codec =>  add method name (offset +4)
			}
            
            type enumerated ChainingControl {
                 e_lastOrOnlyCommand(0),
@@ -201,7 +205,7 @@ module ePassport_Types {
				e_eraseBinaryWithOffsetDataObjects(15), // 0x0F 
				e_performScqlOperation(16), // 0x10 
				e_performTransactionOperation(18), // 0x12 
				e_performUserOPeration(20), // 0x 14
				e_performUserOperation(20), // 0x 14
				e_verifyWithVerificationData(32), // 0x20
				e_verifyWithVerificationDataObject(33), // 0x21 
				e_manageSecurityEnvironment(34), // 0x22 
@@ -277,5 +281,3 @@ module ePassport_Types {
    	} // end group commandTypesGroup
	}
}