Commit a34c0c3d authored by kristofferse's avatar kristofferse
Browse files

folder structure initialized

parents
Loading
Loading
Loading
Loading
+181 −0
Original line number Diff line number Diff line
/*
 *  @author   STF 312
 *  @version  $vx.x.x$
 *..@desc     This module defines message types for digfital Public Mobile
              Radio (dPMR) upper Dynamic Link Layer (DLL) message. Message
              information elements are defined in the dPMR_types module.
 *  @see      dPMR_types
 */

module LibdPMR_Messages {

  import from LibdPMR_Values all;
  import from LibdPMR_Types all;
  import from LibCommon_DataStrings all;

group Frames {

// 5.1 Super frame

type record SuperFrame {
  Frame1 frame1,
  Frame2 frame2,
  Frame3 frame3,
  Frame4 frame4
}


type record Frame1 {
  FrameSync24     frameSync,
  FrameNumber         frameNumber,
  CalledIdUP          calledIdUP,
  CommunicationsMode  communicationsMode,
  CommsFormat         commsFormat,
  Reserved2bit        reserved2bit,
  SlowData            slowData,
  Payload             payload
}


type record Frame2 {
  ColourCode          colourCode,
  FrameNumber         frameNumber,
  CalledIdLP          calledIdLP,
  CommunicationsMode  communicationsMode,
  CommsFormat         commsFormat,
  Reserved2bit        reserved2bit,
  SlowData            slowData,
  Payload             payload
}

type record Frame3 {
  FrameSync24     frameSync,
  FrameNumber         frameNumber,
  OwnIdUP             ownIdUP,
  CommunicationsMode  communicationsMode,
  CommsFormat         commsFormat,
  Reserved2bit        reserved2bit,
  SlowData            slowData,
  Payload             payload
}


type record Frame4 {
  ColourCode          colourCode,
  FrameNumber         frameNumber,
  OwnIdLP             ownIdLP,
  CommunicationsMode  communicationsMode,
  CommsFormat         commsFormat,
  Reserved2bit        reserved2bit,
  SlowData            slowData,
  Payload             payload
}


// 5.2 Header frame

type record HeaderFrame {
  HeaderType          headerType,
  CalledId            calledId,
  OwnId               ownId,
  CommunicationsMode  communicationsMode,
    CommsFormat         commsFormat,
  Reserved2bit        reserved2bit,
  CallInformation     callInformation
}


// 5.3 End frame

type record EndFrame {
  EndType        endType,
  AckRequest     ackRequest,
  TxWait         txWait,
  StatusMessage  statusMessage,
  Reserved4bit   reserved4bit
}

// 5.4 Packed data header

type record PacketDataHeader {
  HeaderType          headerType,
  CalledId            calledId,
  OwnId               ownId,
  CommunicationsMode  communicationsMode,
  CommsFormat         commsFormat,
  Reserved2bit        reserved2bit,
  CallInformation     callInformation
}


// 5.5 ACK frame

type record AckFrame {
  HeaderType          headerType,
  CalledId            calledId,
  OwnId               ownId,
  CommunicationsMode  communicationsMode,
  CommsFormat         commsFormat,
  Reserved2bit        reserved2bit,
  CallInformation     callInformation
}

} // End group Frames



// 4.2.3  Transmission sequences

group TransmissionSequences {

type record PayloadContTransmission {
  HeaderFrame headerFrame,
  SuperFrameList  sfLlist,
  EndFrame  endFrame
}


// Structure for super continuous payload transmissions.
type set length( 1.. c_maxNbrOfSfs ) of SuperFrame SuperFrameList;



type record CallOrSrvReq {
  HeaderFrame  headerFrame,
  EndFrame     endFrame
}

type HeaderFrame Acknowledgement;

type record StatusReqAck {
  HeaderFrame  headerFrame,
  EndFrame     endFrame
}


type record Disconnect {
  HeaderFrame  headerFrame1,
  EndFrame     endFrame1,
  HeaderFrame  headerFrame2,
  EndFrame     endFrame2
}


type record PacketDataTransmission {
  PacketDataHeader     packetDataHeader,
  PacketDataFrameList  packetDataFrameList,
  EndFrame             endFrame
}


// 8.3.1 Packet data

// Structure for packet data list max 8 packet frames in a packet transmission
type set length (1 .. c_maxNmbPDF) of PacketFrame PacketDataFrameList;


} // end group TransmissionSequences


} // end module dPMR_messages
 No newline at end of file
+423 −0
Original line number Diff line number Diff line
/*
 *  @author     STF 312
 *  @version    $Id$
 *  @desc       Data type definitions for information elements for digital Public
                Mobile Radio (dPMR) messages
 */

module LibdPMR_Types {


  import from LibCommon_DataStrings all;
  import from LibCommon_BasicTypesAndValues all;




// ------------ Information elements ---------------

group InformationElements {

// 5.6 Frame numbering

type enumerated FrameNumber {  // 2 bits
  e_frame1  (0),
  e_frame2  (1),
  e_frame3  (3),
  e_frame4  (4)
} with {encode "2 bits"}


// 5.7  Communication mode

type enumerated CommunicationsMode {  // 3 bits
  e_voice          (0),
  e_voiceSlowData  (1),
  e_dataT1         (2),
  e_dataT2         (3),
  e_dataT3         (4),
  e_voiceDataT2    (5),
  e_rsv6           (6),
  e_rsv7           (7)
} with {encode "2 bits"}


// 5.8   Communication format

type enumerated CommsFormat {   // 4 bits
  e_callAll   (0),
  e_p2p       (1),
  e_rsv2      (2),
  e_rsv3      (3),
  e_other     (4)
} with {encode "4 bits"}


// 5.9 SLD format

type union SlowData {
  SlowDataInVoice       slowDataInVoice,
  SlowDataInDataT1OrT2  slowDataInDataT1OrT2
}

type record SlowDataInVoice {
  Continue   cont1,
  UserData   userData1,
  Continue   cont2,
  UserData   userData2
}


type enumerated Continue { // 1 bit
  e_continue  (0),
  e_terminate (1)
}

type Bit8 UserData;

type record SlowDataInDataT1OrT2 {
  Reserved5bit  reserved5bit,
  DataPosition  dataPosition,
  Format        format,
  ContFlag      contFlag,
  DataLength    dataLength
}


type Bit6 DataLength;

type enumerated DataPosition { // 2 bits
  e_NoDataInFrame  (0),
  e_rsv1           (1),
  e_rsv2           (2),
  e_DataInFrame    (3)
} with {encode "2 bits"}


type enumerated Format {  // 4 bits
  e_statusMessage      (0),
  e_precodedMessage    (1),
  e_freeTextMessage    (2),
  e_shortFileTransfer  (3),
  e_userDefData1       (4),
  e_userDefData2       (5),
  e_userDefData3       (6),
  e_userDefData4       (7),
  e_other              (8)   // Represent all other non-defined values.
}  with {encode "2 bits"}



type enumerated ContFlag {   // 1 bit
  e_continueAfterFrame   (0),
  e_finishAfterFrame     (1)

}  with {encode "1 bit"}



// 5.10  Call information 

type union CallInformation {   // 11 bits
  CiInformationNormalOrPws  ciInformationNormalOrPws,
  CiInformationSysTrans     ciInformationSysTrans,
  CiInformationAck          ciInformationAck
}  

// 5.10.1 

type record CiInformationNormalOrPws { 
  CiTypeNormalOrPws  ciTypeNormalOrPws,
  CiInfoNormalOrPws  ciInfoNormalOrPws  
}


type enumerated CiTypeNormalOrPws {  // 3 bits
  e_reserved0       (0),
  e_dataT1T2        (1),
  e_reserved2       (2),
  e_dataT3          (3),
  e_reserved4       (4),
  e_reserved5       (5),
  e_reserved6       (6),
  e_extendWakeupHdr (7)
}  with {encode "3 bit"}


type union CiInfoNormalOrPws {
  CiInformationNormal  ciInformationNormal,
  CiInformationPws     ciInformationPws
}


type union CiInformationNormal {
  CiInfoNormalDataT1T2  ciInfoNormalDataT1T2,
  CiInfoNormalDataT3    ciInfoNormalDataT3
}

type record CiInfoNormalDataT1T2 {
  Format        format,
  Reserved4bit  reserved4bit
}


type record CiInfoNormalDataT3 {
  PdS   pdS,
  PdM   pdM
}


type enumerated PdS {  // 4 bits
  e_frmTm80ms   (0),
  e_frmTm160ms  (1),
  e_frmTm240ms  (2),
  e_frmTm320ms  (3),
  e_rsv4        (4)  // represent all other 4 bit values
} with {encode "4 bit"}


type enumerated PdM { // 4 bits
  e_pdM0    (0),
  e_pdM1    (1),
  e_pdM2    (2),
  e_pdM3    (3),
  e_pdM4    (4),
  e_pdM5    (5),
  e_pdM6    (6),
  e_pdM7    (7),
    e_rsv8    (8)   // represent all other 4 bit values
} with {encode "4 bit"}



type enumerated CiInformationPws { // 8 bits
  e_normalHdrFrame  (0),
  e_extHdrFrame1    (1),
  e_extHdrFrame2    (2),
  e_extHdrFrame3    (3),
  e_extHdrFrame4    (4),
  e_extHdrFrame5    (5),
  e_extHdrFrame6    (6),
  e_extHdrFrame7    (7),
  e_extHdrFrame8    (8),
  e_extHdrFrame9    (9),
  e_extHdrFrame10   (10),
  e_extHdrFrame11   (11),
  e_extHdrFrame12   (12),
  e_extHdrFrame13   (13),
  e_extHdrFrame14   (14),
  e_extHdrFrame15   (15),
  e_reserved        (16)  // Represent all other 8 bit values
}  with {encode "4 bit"}



// 5.10.4  Call information for system transactions

type record CiInformationSysTrans { 
  CiTypeSysTrans  ciTypeSysTrans,
  CiInfoSysTrans  ciInfoSysTrans
}


type enumerated CiTypeSysTrans {  // 3 bits
  e_rsv0                (0),
  e_dynGrpReqAnswDev    (1),
  e_rsv2                (2),
  e_rsv3                (3),
  e_esnReqRpl           (4),
  e_mfidReqRpl          (5),
  e_contactStationAddr  (6),
    e_rsv7                (7)
} with {encode "3 bit"}


type Bit8  CiInfoSysTrans;   // All 8 bits shall be set to zero.


// Call information for acknowledgements

type record CiInformationAck { 
  CiTypeAck  ciTypeAck,
  CiInfoAck  ciInfoAck
}

type enumerated CiTypeAck {  // 3 bits
  e_rsv0           (0),
  e_ack            (1),
  e_nackReqResend  (2),
  e_nackReqDenied  (3),
  e_rsv4           (4),
  e_rsv5           (5),
  e_rsv6           (6),
  e_rsv7           (7)
} with {encode "3 bit"}

type Bit8  CiInfoAck;   // Value 0 reserved, value 1..255 ACK/NACK status (reject reason defined by user).


// 5.11  Header type

type enumerated HeaderType {  // 4 bits
  e_commStartHeader  (0),
  e_connReqHeader    (1),
  e_unconnReqHeader  (2),
  e_ack              (3),
  e_sysReqHeader     (4),
  e_ackHdrReply      (5),
  e_sysDelivHdr      (6),
  e_statusRspHdr     (7),
  e_statusReqHdr     (8),
  e_rsv9             (9)  // represent all other undefined 4 bit values
} with {encode "4 bit"}


// 5.12  End type

type enumerated EndType {  // 2 bits
  e_endFrame               (0),
  e_endFrameWithStatusMsg  (1),
  e_rsv2                   (2),
  e_rsv3                   (3)
} with {encode "2 bit"}


// 5.13  ARQ

type enumerated AckRequest {  // 2 bits
  e_noAckReq    (0),
  e_AckReq      (1),
  e_rsv2        (2),
  e_rsv3        (3)
} with {encode "2 bit"}


// 5.14  Tx Wait

type enumerated TxWait { // 4 bits
  e_noSpecTime      (0),
  e_halfFrame40ms   (1),
  e_oneFrame80ms    (2),
  e_twoFrames160ms  (3),
  e_fourFrames320ms (4),
  e_rsv5            (5)  // All other non-defined 4 bit values 
} with {encode "4 bit"}


// 5.15  Status message

type Bit5 StatusMessage;   // Status message 0.. 31




// 6.1 Frame sync

type Bit24 FrameSync24;
type Bit48 FrameSync48;

// 6.1.5  Coulour code

type Bit24 ColourCode;





// 8.3.3 Packet frame coding

type record PacketFrame {
  ColourCode     colourCode,
  NbrOfFrames    nbrOfFrames,  
  ValidDataLen   validDataLength,
  Reserved14Bit  reserved14bit,
  CrcD           crcForData,
  Data           data
}


type UInt3 NbrOfFrames;   //  Number of packet data frames in packet packet transmission (3 bits)

type UInt8 ValidDataLen;  // Actual length of valid data in the packet frame

type Bit16 CrcD           // CRC for data field.

type union Data {
  UserDataPds0  userDataPds0,   // 36 octets maximum
  UserDataPds1  userDataPds1,   // 84 octets maximum
  UserDataPds2  userDataPds2,   // 132 octets maximum
  UserDataPds3  userDataPds3    // 180 octets maximum
}


type Oct36   UserDataPds0;
type Oct84   UserDataPds1;
type Oct132  UserDataPds2;
type Oct180  UserDataPds3;


type octetstring  Oct36 length(36) with {encode "36 bytes"};
type octetstring  Oct84 length(84) with {encode "84 bytes"};
type octetstring  Oct132 length(132) with {encode "132 bytes"};
type octetstring  Oct180 length(180) with {encode "180 bytes"};


// Called and Own Id types

type Bit12 CalledIdUP;
type Bit12 CalledIdLP;

type Bit24 CalledId;

type Bit12 OwnIdUP;
type Bit12 OwnIdLP;

type Bit24 OwnId;


// Payload

type Oct9  Payload;   // 72 bits



// Reserved fields

type Bit2  Reserved2bit;
type Bit4  Reserved4bit;
type Bit5  Reserved5bit;
type Bit14 Reserved14Bit  

} // End group InformationElements



//  ----   ATS Related Types

group AtsRelatedTypes {
// --ATS related types -- 

type enumerated FncRetCode {
  eSuccess  (0),
  eError    (1),    
  eTimeout  (2) 
}


type record MsCfgParams {  // TO BE COMPLETED BASED ON PRE-CONFIGURATION PARAMETERS.
}


type enumerated IutIndMsg {  // TO BE COMPLETED WITH UPPER TESTER INDICATIONS!!!
   statusMessage(0),
   ToBeDefined (1)   
}


} // End group AtsRelatedTypes




} // End module dPMR_types
 No newline at end of file
+73 −0
Original line number Diff line number Diff line
/*
 *  @author   STF 312
 *  @version  $vx.x.x$
 *  @desc     This module defines constant values used in the dPMR test cases.
 */

module LibdPMR_Values {
  import from LibdPMR_Types all;
  import from LibCommon_BasicTypesAndValues all;


  
// 6.1 Frame sync values 

const FrameSync48 c_fs1 := '010101111111111101011111011101011101010101110111'B; // FS in non-data header frames.
const FrameSync24 c_fs2 := '010111111111011101111101'B;             // FS in frame 1 and 3 of superframe.
const FrameSync24 c_fs3 := '011111011101111111110101'B;             // FS in End frame
const FrameSync48 c_fs4 := '111111010101010111110101110111110111111111011101'B; // FS in 


// 6.1.5 Colour code values

// Group A channel values
const ColourCode c_grpAcf1  := '010101110111010101110111'B;
const ColourCode c_grpAcf2  := '010101111101110101110101'B;
const ColourCode c_grpAcf3  := '010101111111011101110101'B;
const ColourCode c_grpAcf4  := '010101010101011101111101'B;
const ColourCode c_grpAcf5  := '010101010111110101111101'B;
const ColourCode c_grpAcf6  := '010101011101010101111111'B;
const ColourCode c_grpAcf7  := '010101011111111101111111'B;
const ColourCode c_grpAcf8  := '010111110101010101011111'B;
const ColourCode c_grpAcf9  := '010111110111111101011111'B;
const ColourCode c_grpAcf10 := '010111111101011101011101'B;
const ColourCode c_grpAcf11 := '010111111111110101011101'B;
const ColourCode c_grpAcf12 := '010111010101110101010101'B;
const ColourCode c_grpAcf13 := '010111010111011101010101'B;
const ColourCode c_grpAcf14 := '010111011101111101010111'B;
const ColourCode c_grpAcf15 := '010111011111010101010111'B;
const ColourCode c_grpAcf16 := '011101110101110111010111'B;

// Group B channel values
const ColourCode c_grpBcf1  := '111101110101011101010111'B;
const ColourCode c_grpBcf2  := '111101110111110101010111'B;
const ColourCode c_grpBcf3  := '111101111101010101010101'B;
const ColourCode c_grpBcf4  := '111101111111111101010101'B;
const ColourCode c_grpBcf5  := '111101010101111101011101'B;
const ColourCode c_grpBcf6  := '111101010111010101011101'B;
const ColourCode c_grpBcf7  := '111101011101110101011111'B;
const ColourCode c_grpBcf8  := '111101011111011101011111'B;
const ColourCode c_grpBcf9  := '111111110101110101111111'B;
const ColourCode c_grpBcf10 := '111111110111011101111111'B;
const ColourCode c_grpBcf11 := '111111111101111101111101'B;
const ColourCode c_grpBcf12 := '111111111111010101111101'B;
const ColourCode c_grpBcf13 := '111111010101010101110101'B;
const ColourCode c_grpBcf14 := '111111010111111101110101'B;
const ColourCode c_grpBcf15 := '111111011101011101110111'B;
const ColourCode c_grpBcf16 := '111111011111110101110111'B;



// Maximum number of Super frames in a continuous payload transmission. Limited by the rule of max 180 sec
// continuous transmission.

const UInt10 c_maxNbrOfSfs := 665;


// Maximum number of packet frames in a Packet data transmission

const UInt4 c_maxNmbPDF := 8; 


} // end module dPMR_values 
 No newline at end of file
+45 −0
Original line number Diff line number Diff line
/*
 *	@author 	STF 340
 *  @version    $vx.x.x$
 *	@desc		Test Configuration
 */
 
module dPMR_TestConfiguration {

	//LibCommon
	import from LibCommon_Sync all;
	import from LibCommon_VerdictControl all;
	//Ats
	import from LibdPMR_Values all;
	import from LibdPMR_Types all;
	import from LibdPMR_Messages all;
//	import from dPMR_Templates all;
	import from dPMR_TestSystem all;
//	import from dPMR_Pixits all;
//	import from dPMR_ExternalFns all;
	

group mapFns {
	
	/* 
	 * @desc 	This function maps all ports
	 * @param void
	 *	
	 */
	function f_mapSimu()
	runs on Simu {
//		map (self: macMsg, system: taMacMsg);
//		map (self: macBcMsg, system: taMacBcMsg);
//		map (self: macPdu, system: taMacPdu);
//		map (self: phy, system: taPhy);
	} //end function f_mapSimu

	function f_unmapSimu()
	runs on Simu {
		//unmap(self:all port); //edition3 feature
	}

} // end group mapFns

}//end module dPMR_TestConfiguration
 No newline at end of file
+84 −0
Original line number Diff line number Diff line
/*
 *	@author 	STF 340
 *  @version    $vx.x.x$
 *	@desc		Ports, timers, primitives, test components, component variables
 *				are defined here.
 */
 
module dPMR_TestSystem {

	//LibCommon
	import from LibCommon_AbstractData all;
	import from LibCommon_Sync all;
	import from LibCommon_DataStrings all;
	import from LibCommon_BasicTypesAndValues all;
	//Ats
	import from LibdPMR_Values all;
	import from LibdPMR_Types all;
	import from LibdPMR_Messages all;
//	import from dPMR_Pics all;
//	import from dPMR_Pixits all;

	type component Simu {
		
		//Start New 16e
//		port SyncPort syncPort;
		// PtcSyncPort used for synchronization between 2 PTCs
//		port SyncPort ptcSyncPort;
		//port CfPort cfPort;
//		port SyncPort syncSendPort;
//		timer tc_sync := PX_TSYNC_TIME_LIMIT;
		// Echange value between PTC
//		port ExchangePort exchangePort;
		//End New 16e
		//Ports
//		port Dp1Port     dp1dPmrMsg;
//		port Dp2PortTx   dp2Tx ;
	//		port MacPduPort 		macPdu ;
//		port PhyPort			phy;
//		port TaPort				ta;
//		// Component variables
//		var SimuParams vc_simu ;
		//Timers
//		timer t_guard := PXT_TGUARD;
//		timer t_wait := PXT_TWAIT;
//		timer t_ac := PXT_TAC;
//		timer t_noac := PXT_TNOAC;
//		timer t_3 := PIC_T3* ( 100.0 + PXT_TIMER_PRECISION ) / 100.0;
		//Broadcast
	}  // end of type component Simu


	type component TestAdapter { 
		//Ports
//		port TaDp1Port tadPmrMsg;
//		port TaDp2PortRx tadPmrCommands;
//		port TaUtPort  taUtPort ;
	} // end of type component TestAdapter 


group portDefs {
	


	//@desc: The port for MAC Management messsages
//	type port MacPduPort message {inout MacPduPrimitives};
//	type port MacBcMessagePort message {in MacBcMsgPrimitives};
//	type port MacMessagePort message {inout MacMsgPrimitives};
//	type port PhyPort message {in PhyInd};

	//@desc: The port for message exchange between PTCs
//	type port ExchangePort message { inout ExchangeMsg };

	//@desc: The port for message exchange between TTCN and test adapter (TA)
//	type port TaPort message { inout TaPrimitives };


}	// end group portDefs

group primitives {


}//end primitives

}  // end of module dPMR_TestSystem