Commit c378635d authored by fetke's avatar fetke
Browse files

added and corrected annotations needed for the codec generator

parent 3e4bb7ab
Loading
Loading
Loading
Loading
+25 −14
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ module ePassport_Types {
				Payload			payload
			} with {variant "isPdu;"};
			
			type Command CommandDeactivateFile;
			type Command CommandDeactivateFile with {variant "isPdu;present=bits(5,8,0x04);"};
			type Command CommandEraseRecords;
			type Command CommandEraseBinary;
			type Command CommandPerformScqlOperation; 
@@ -134,7 +134,7 @@ module ePassport_Types {
			
			type record PlainTextPayload {
                 CommandData    commandData optional,
                 LengthE 	    lengthE optional
                 LengthE 	    lengthE optional  // TODO: why is this behind the data??  --afe
            };

    		type octetstring CommandData;
@@ -143,7 +143,9 @@ module ePassport_Types {
                 EncryptedData  data	// contains command data + lengthE
            }
    
    		type octetstring EncryptedData;			
    		type octetstring EncryptedData with {
    		     variant "length=dec.infinity()/8"   // TODO: codec generator must be extended to allow simply "infinity" here
    		}
			
			type union Class {
                 FirstInterindustryClass	first,
@@ -165,7 +167,11 @@ module ePassport_Types {
            };
            
            type integer FirstLogicalChannelNumber (0..3) with {variant "length=2;unsigned;"};
            type integer FurtherLogicalChannelNumber (4..19) with {variant "decode=;encode=;"}; //TODO codec =>  add method name (offset +4)
            type integer FurtherLogicalChannelNumber (4..19)
			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),
@@ -237,9 +243,9 @@ module ePassport_Types {
				e_terminateCardUsage(254) //0xFE
            } with {variant "length=8"}
            
            type Bit8 P1Status with {variant "length=8"};
            type Bit8 P2Status with {variant "length=8"};
            type UInt3 LengthE with {variant "length=3;unsigned;"};
            type Bit8 P1Status;
            type Bit8 P2Status;
            type UInt3 LengthE;
            
		} // end group commandTypesGroup
      
@@ -249,16 +255,21 @@ module ePassport_Types {
    		type record Response {
				ResponseData responseData optional,
				W1W2Status w1w2
    		}; 
			} with {
				variant "isPDU"  // TODO:  is this correct?
			}
    
    		type union ResponseData {
    			PlainTextResponseData plainText,
    			EncryptedResponseData encrypted
    		};
    		} with {
				variant
				"use=com.testingtech.ttcn.tci.helper.EPassportCodecHelper;encode=EPassportCodecHelper.encodeResponseData();decode=EPassportCodecHelper.decodeResponseData();"
			}
    		
    		type octetstring PlainTextResponseData;
    		type octetstring EncryptedResponseData;
			type Oct2 W1W2Status with {variant "length=16"};
    		type octetstring PlainTextResponseData with { variant "noCodec" };
    		type octetstring EncryptedResponseData with { variant "noCodec" };
			type Oct2 W1W2Status;
    	} // end group commandTypesGroup
	}
}