97 lines
3.4 KiB
Plaintext
97 lines
3.4 KiB
Plaintext
/*
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Copyright Test Competence Center (TCC) ETH 2008 //
|
|
// //
|
|
// The copyright to the computer program(s) herein is the property of TCC. //
|
|
// The program(s) may be used and/or copied only with the written permission //
|
|
// of TCC or in accordance with the terms and conditions stipulated in the //
|
|
// agreement/contract under which the program(s) has been supplied. //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// File: SNDCP_Types.ttcn
|
|
// Rev: R1A01
|
|
// Prodnr: CNL 113 576
|
|
// Updated: 2008-01-21
|
|
// Contact: http://ttcn.ericsson.se
|
|
// Reference: 3GPP TS 44.065 7.0.0
|
|
*/
|
|
module SNDCP_Types
|
|
{
|
|
|
|
// This module contains the Subnetwork Dependent Convergence Protocol
|
|
// 44.065 v7.0.0 with attributes for RAW encoding/decoding.
|
|
|
|
// According to 3GPP 04.64 - the maximum(!) length of the PDU_SN_UNITDATA and PDU_SN_DATA
|
|
// is minimum 140 and maximum 520 octets.
|
|
// The actual length of the PDU_SN_UNITDATA and PDU_SN_DATA is given in LLC ASPs or set to a parameter value.
|
|
// The possible maximum length of dataSegmentSnUnitdataPdu or dataSegmentSnDataPdu is therefore variable and
|
|
// will depend on this setting.
|
|
// The RAW decoder should have no problem decoding these fields when they are simply defined as octetstrings
|
|
// and stand at the end of the SNDPC PDUs.
|
|
//
|
|
|
|
//
|
|
|
|
import from General_Types all;
|
|
|
|
external function enc_PDU_SN(in PDU_SN pdu ) return octetstring
|
|
with { extension "prototype(convert)"
|
|
extension "encode(RAW)"
|
|
}
|
|
|
|
external function dec_PDU_SN(in octetstring stream) return PDU_SN
|
|
with { extension "prototype(convert)"
|
|
extension "decode(RAW)"
|
|
}
|
|
|
|
type union PDU_SN
|
|
{
|
|
PDU_SN_UNITDATA pDU_SN_UNITDATA,
|
|
PDU_SN_DATA pDU_SN_DATA
|
|
} with { variant "TAG (
|
|
pDU_SN_UNITDATA, snPduType ='1'B;
|
|
pDU_SN_DATA, snPduType ='0'B
|
|
)"
|
|
};
|
|
|
|
|
|
type record PDU_SN_UNITDATA
|
|
{
|
|
BIT4 nsapi,
|
|
BIT1 moreBit,
|
|
BIT1 snPduType,
|
|
BIT1 firstSegmentIndicator,
|
|
BIT1 spareBit, // set to '0'B
|
|
BIT4 pcomp optional,
|
|
BIT4 dcomp optional,
|
|
BIT4 npduNumber,
|
|
BIT4 segmentNumber,
|
|
OCT1 npduNumberContinued,
|
|
octetstring dataSegmentSnUnitdataPdu
|
|
} with { variant (pcomp) "PRESENCE(firstSegmentIndicator = '1'B)";
|
|
variant (dcomp) "PRESENCE(firstSegmentIndicator = '1'B)"
|
|
};
|
|
|
|
|
|
type record PDU_SN_DATA
|
|
{
|
|
BIT4 nsapi,
|
|
BIT1 moreBit,
|
|
BIT1 snPduType,
|
|
BIT1 firstSegmentIndicator,
|
|
BIT1 spareBit, // set to '0'B
|
|
BIT4 pcomp optional,
|
|
BIT4 dcomp optional,
|
|
OCT1 npduNumberAck optional,
|
|
octetstring dataSegmentSnDataPdu
|
|
|
|
} with { variant (pcomp) "PRESENCE(firstSegmentIndicator = '1'B)";
|
|
variant (dcomp) "PRESENCE(firstSegmentIndicator = '1'B)";
|
|
variant (npduNumberAck) "PRESENCE(firstSegmentIndicator = '1'B)"
|
|
};
|
|
|
|
|
|
}with{ encode "RAW"} // end of module
|