diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index 46d55b991935080b553b33983ac5c8f3bf56a9df..81251a3023549650a6a68576742f0f42f2ffafc2 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -1434,6 +1434,57 @@ module OneM2M_Functions {
 				return vc_aeIndex;
 			}            
 			
+			function f_cse_preamble_registerAeWithExternalId(template (omit) AcpType p_accessControlPolicyIDs := omit, in template (omit) PoaList p_poaList := omit, in boolean p_userAuthentication := false, in ExternalID p_externalID) runs on AeSimu return integer {//c_CRUDNDi
+			
+				var RequestPrimitive v_request;
+				var MsgIn v_response;
+
+				//Activate defaults when running on a PTC
+				f_cse_activateDefaults_ae();	
+				
+				if(p_userAuthentication == true) {
+					 // Create subscription and subscriber
+					 f_cse_preamble_createServiceSubscribedProfile(PX_ALLOWED_C_AE_IDS, p_allowedUsers := true);
+					 v_request := valueof(m_createAe(vc_aeSimuDesc.appId, p_accessControlPolicyIDs, PX_ALLOWED_C_AE_IDS[0], c_defaultAe1ResourceName, p_poaList));
+					 v_request := f_getCreateRequestPrimitive(int2, v_request, -1, PX_M2M_USER_ID);
+
+				} else {
+					 v_request := valueof(m_createAe(vc_aeSimuDesc.appId, p_accessControlPolicyIDs, vc_aeSimuDesc.aeIdStem, c_defaultAe1ResourceName, p_poaList));
+					 v_request := f_getCreateRequestPrimitive(int2, v_request, -1);
+				}
+
+				v_request.primitiveContent.aE.m2M_Ext_ID := p_externalID;
+				f_send(e_mcaPort, m_request(v_request));
+				
+				tc_ac.start;
+				alt {
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
+						tc_ac.stop;
+						setverdict(pass,__SCOPE__&":INFO: Application registered successfuly");
+						if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE)) {
+							
+							f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive);
+							
+							vc_aeIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2);
+							vc_componentRegistered := true;
+							
+							if(ispresent(v_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){
+								f_sendAcPrimitive("AE-ID_changed", vc_aeIndex);
+							}
+						}
+					}
+					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+						tc_ac.stop;
+						setverdict(inconc, __SCOPE__&":INFO: Error while registering application");
+					}
+					[] tc_ac.timeout {
+						setverdict(inconc, __SCOPE__&":INFO: No answer while registering resource");
+					}
+				}	
+				
+				f_checkAeSimuStatus();
+				return vc_aeIndex;
+			}
 			/**
 			 * @desc Creation of auxiliar resources ACP and AE for correct execution of the test case
 			 * @param p_allowedOperations Allowed operations for the auxiliar AE resource
diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn
index 6e89186fe7ab104ece78c0e42906217ecd16acc5..a19c8090481c6fc9862a4f1b012523b2dbf42675 100644
--- a/LibOneM2M/OneM2M_Templates.ttcn
+++ b/LibOneM2M/OneM2M_Templates.ttcn
@@ -1136,6 +1136,14 @@ module OneM2M_Templates {
 				primitiveContent:= {transaction := m_contentUpdateTransaction}
 			};
 			
+			/**
+			 * @desc Base UPDATE request primitive for ServiceSubscribedNode Resource
+			 */
+			template (value) RequestPrimitive m_updateServiceSubscribedNode_ruleLinks(in ListOfURIs p_ruleLinks := {""}) modifies m_update := {
+				requestIdentifier := testcasename() & "-m_updateServiceSubscribedNode",
+				primitiveContent := {serviceSubscribedNode := m_contentServiceSubscribedNode(p_ruleLinks)}
+			};
+			
     	}//end group Update
     	
     	group Create {
diff --git a/LibOneM2M/OneM2M_Types_3GPP_T8.ttcn b/LibOneM2M/OneM2M_Types_3GPP_T8.ttcn
index a84dfcf7854561e7c9d856a666a0b04813f8e3e7..31d844ea0dc16837beb2c3bb09a8c7c75fc9102e 100644
--- a/LibOneM2M/OneM2M_Types_3GPP_T8.ttcn
+++ b/LibOneM2M/OneM2M_Types_3GPP_T8.ttcn
@@ -77,6 +77,8 @@ import from OneM2M_TypesAndValues {type Resource_2; type ResourceTypeList_1; typ
 		type Body RequestBody (	{individualNiddConfiguration:=?},
 								{individualNiddDownlinkDataDelivery:=?},
 								{individualDeviceTriggeringTransaction:=?},
+								{niddUplinkDataNotification:=?},
+								{niddDownlinkDataDeliveryStatusNotification:=?},
 								{deviceTriggeringDeliveryReportNotification:=?});
 		
 		type Body ResponseBody;
@@ -91,6 +93,8 @@ import from OneM2M_TypesAndValues {type Resource_2; type ResourceTypeList_1; typ
 			NiddConfiguration individualNiddConfiguration,
 			NiddDownlinkDataTransfers niddDownlinkDataDeliveries,
 			NiddDownlinkDataTransfer individualNiddDownlinkDataDelivery,
+			NiddUplinkDataNotification niddUplinkDataNotification,
+			NiddDownlinkDataDeliveryStatusNotification niddDownlinkDataDeliveryStatusNotification,
 			NiddDownlinkDataDeliveryFailure niddDownlinkDataDeliveryFailure,
 			//DeviceTrigger
 			DeviceTriggerings deviceTriggeringTransactions,
@@ -165,6 +169,28 @@ import from OneM2M_TypesAndValues {type Resource_2; type ResourceTypeList_1; typ
 			ProblemDetails problemDetail,
 			DateTime requestedRetransmissionTime optional
 		}
+		
+		
+		type record NiddUplinkDataNotification {
+			Link niddConfiguration,
+			ExternalId externalId optional,
+			Msisdn msisdn optional,
+			Bytes data,
+			boolean reliableDataService optional,
+			RdsPorts rdsPorts optional
+		}
+		with {
+			variant "name as uncapitalized";
+		};
+		
+		type record NiddDownlinkDataDeliveryStatusNotification {
+			Link niddDownlinkDataTransfer,
+			DeliveryStatus deliveryStatus,
+			DateTime requestedRetransmissionTime optional
+		}
+		with {
+			variant "name as uncapitalized";
+		};
 	}//end group NIDD_API
 	
 	group DeviceTriggering_API {
diff --git a/OneM2M_Testcases_CSE_Release_4.ttcn b/OneM2M_Testcases_CSE_Release_4.ttcn
index d40d2aff409197cab093bc864e06bd0b7f9f06ae..676f36dfbc08c8f2a051fb828e8cc7ad28872934 100644
--- a/OneM2M_Testcases_CSE_Release_4.ttcn
+++ b/OneM2M_Testcases_CSE_Release_4.ttcn
@@ -13,6 +13,8 @@
  */
 module OneM2M_Testcases_CSE_Release_4 {
 
+	import from OneM2M_Types_3GPP_T8 all;
+
 	import from OneM2M_TestSystem all;
 	import from OneM2M_Templates all;
 	import from OneM2M_Types all;
@@ -6553,7 +6555,7 @@ module OneM2M_Testcases_CSE_Release_4 {
 				var template PrimitiveContent v_contentResponseUri;
 				var template PrimitiveContent v_contentResponseRequestResource;
 				var RequestStatus v_requestStatus;
-				var URI v_requestResourceURI;
+				var OneM2M_Types.URI v_requestResourceURI;
 				var template PrimitiveContent v_primitiveContent;
 				var template RequestPrimitive v_createContainerRequest := m_createContainerBase;
 				var template RequestPrimitive v_createPrimitveProfile;
@@ -12838,8 +12840,7 @@ module OneM2M_Testcases_CSE_Release_4 {
 				
 				
 			}// Basic_Operation
-			
-			
+		
 			group Update  {
 				
 				/**
@@ -18691,6 +18692,778 @@ module OneM2M_Testcases_CSE_Release_4 {
 			} // end delete
 		} // end group Transaction_Management
 		
+		group IWK_3GPP{
+			
+			group Scef_Based_NIDD {
+				
+				/* @desk Check that IUT sends NIDD configuration request when it receives create request of <serviceSubscribedNode> resource
+				 *
+				 */
+				testcase TC_CSE_3GPP_NIDD_001() runs on Tester system ScefSystem {
+						
+					var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+					v_scef.start(f_CSE_3GPP_NIDD_001());
+					v_scef.done;
+						
+				} // end testcase TC_CSE_3GPP_NIDD_001
+				
+				function f_CSE_3GPP_NIDD_001() runs on ScefSimu system ScefSystem{
+					var template RequestPrimitive v_createServiceSubscribedNode := m_createServiceSubscribedNode;
+					var integer v_aeIndex := -1, v_subscriptionProfileIndex := -1;
+					
+					var RequestPrimitive v_request;
+					var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+					var template T8Request v_requestPrimitive;
+					var NiddConfiguration v_niddConfiguration;
+					var RequestBody niddConfig := {individualNiddConfiguration := v_niddConfiguration};
+
+					var template RequestPrimitive v_createServiceSubscriptionProfile := m_createM2mServiceSubscriptionProfileMaxValue1; // maxNumAEs 1	
+					
+					v_createServiceSubscribedNode.primitiveContent.serviceSubscribedNode.niddRequired := true;
+					v_createServiceSubscribedNode.primitiveContent.serviceSubscribedNode.nodeID := "M2M-Ext-ID";
+					
+					// Test component configuration
+					f_cf05Up();
+										
+					// Test Body
+					
+					// ServiceSubscriptionProfile directly under CSEBase from superAE					
+					vc_ae1.start(f_cse_createResource(int11, v_createServiceSubscriptionProfile, -1));
+					v_subscriptionProfileIndex := f_getLatestResourceIndex(vc_ae1);
+					
+					// ServiceSubscribedNode under ServiceSubscriptionProfile
+					vc_ae1.start(f_cse_createResource(int20, v_createServiceSubscribedNode, v_subscriptionProfileIndex));
+					
+					v_requestPrimitive := mw_t8_request_post(v_requestResourceURI, -,  niddConfig);
+					tc_ac.start;
+					alt{
+						[] mcnPortIn.receive(mw_t8Request(v_requestPrimitive)) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": NIDD configuration received.");
+						}
+						[] mcnPortIn.receive(mw_t8Request(?)){
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Other operation received");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer");
+						}
+					}
+					
+					// Postamble: NOTE This needs to be done.
+					//f_cse_postamble_deleteResourcesCSE();
+					
+					//Tear Down
+					f_cf05Down();
+				} // end of function f_CSE_3GPP_NIDD_001
+				
+				/* @desk Check that IUT sends NIDD configuration request when it receives update request of <serviceSubscribedNode> resource
+				with niddRequired attribute set to TRUE			 *
+				 */
+				testcase TC_CSE_3GPP_NIDD_002() runs on Tester system ScefSystem {
+						
+					var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+					v_scef.start(f_CSE_3GPP_NIDD_002());
+					v_scef.done;
+						
+				} // end testcase TC_CSE_3GPP_NIDD_002
+				
+				function f_CSE_3GPP_NIDD_002() runs on ScefSimu system ScefSystem{
+				
+					var template RequestPrimitive v_createServiceSubscribedNode := m_createServiceSubscribedNode;
+					var template RequestPrimitive v_updateServiceSubscribedNode := m_updateServiceSubscribedNode;
+					var template RequestPrimitive v_createServiceSubscriptionProfile := m_createM2mServiceSubscriptionProfileMaxValue1; // maxNumAEs 1
+				
+					var integer v_aeIndex := -1, v_subscriptionProfileIndex := -1, v_serviceSubscribedNodeIndex := -1;
+					var RequestPrimitive v_request;
+					var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+					var template T8Request v_requestPrimitive;
+					var NiddConfiguration v_niddConfiguration;
+					var RequestBody niddConfig := {individualNiddConfiguration := v_niddConfiguration};
+					//var template NiddConfiguration v_niddConfiguration;
+					
+					v_createServiceSubscribedNode.primitiveContent.serviceSubscribedNode.niddRequired := false;
+					v_createServiceSubscribedNode.primitiveContent.serviceSubscribedNode.nodeID := "M2M-Ext-ID";
+					
+					v_updateServiceSubscribedNode.primitiveContent.serviceSubscribedNode.niddRequired := true;
+					
+					// Test component configuration
+					f_cf05Up();
+					
+					
+					// ServiceSubscriptionProfile directly under CSEBase from superAE					
+					vc_ae1.start(f_cse_createResource(int11, v_createServiceSubscriptionProfile, -1));
+					v_subscriptionProfileIndex := f_getLatestResourceIndex(vc_ae1);
+					
+					// ServiceSubscribedNode under ServiceSubscriptionProfile
+					vc_ae1.start(f_cse_createResource(int20, v_createServiceSubscribedNode, v_subscriptionProfileIndex));
+					v_serviceSubscribedNodeIndex := f_getLatestResourceIndex(vc_ae1);
+					
+					// Test Body
+	
+					vc_ae1.start(f_cse_updateResource(int20, v_serviceSubscribedNodeIndex, v_updateServiceSubscribedNode));
+					
+					v_requestPrimitive := mw_t8_request_post(v_requestResourceURI, -, niddConfig);
+					tc_ac.start;
+					alt{
+						[] mcnPortIn.receive(mw_t8Request(v_requestPrimitive)) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": NIDD configuration received.");
+						}
+						[] mcnPortIn.receive(mw_t8Request(?)){
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Other operation received");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer");
+						}
+					}
+					
+					// Postamble: NOTE This needs to be done.
+					//f_cse_postamble_deleteResourcesCSE();
+					
+					//Tear Down
+					f_cf05Down();
+				} // end of function f_CSE_3GPP_NIDD_002
+				
+				/* @desk Check that IUT sends NIDD configuration delete request when it receives update request of <serviceSubscribedNode> resource
+				with niddRequired attribute set to FALSE		 *
+				 */
+				testcase TC_CSE_3GPP_NIDD_003() runs on Tester system ScefSystem {
+						
+					var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+					v_scef.start(f_CSE_3GPP_NIDD_003());
+					v_scef.done;
+						
+				} // end testcase TC_CSE_3GPP_NIDD_003
+				
+				function f_CSE_3GPP_NIDD_003() runs on ScefSimu system ScefSystem{
+
+					var template RequestPrimitive v_createServiceSubscribedNode := m_createServiceSubscribedNode;
+					var template RequestPrimitive v_updateServiceSubscribedNode := m_updateServiceSubscribedNode;
+					var template RequestPrimitive v_createServiceSubscriptionProfile := m_createM2mServiceSubscriptionProfileMaxValue1; // maxNumAEs 1
+					
+					var integer v_aeIndex := -1,  v_subscriptionProfileIndex := -1, v_serviceSubscribedNodeIndex := -1;
+					var RequestPrimitive v_request;
+					var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+					var template T8Request v_requestPrimitive;
+					var NiddConfiguration v_niddConfiguration;
+					var RequestBody niddConfig := {individualNiddConfiguration := v_niddConfiguration};
+					var RequestHeaders v_requestHeader;
+					//var template NiddConfiguration v_niddConfiguration;
+
+					
+					v_createServiceSubscribedNode.primitiveContent.serviceSubscribedNode.niddRequired := true;
+					v_createServiceSubscribedNode.primitiveContent.serviceSubscribedNode.nodeID := "M2M-Ext-ID";
+					
+					v_updateServiceSubscribedNode.primitiveContent.serviceSubscribedNode.niddRequired := false;
+					
+					// Test component configuration
+					f_cf05Up();
+					
+					// ServiceSubscriptionProfile directly under CSEBase from superAE					
+					vc_ae1.start(f_cse_createResource(int11, v_createServiceSubscriptionProfile, -1));
+					v_subscriptionProfileIndex := f_getLatestResourceIndex(vc_ae1);
+					
+					// ServiceSubscribedNode under ServiceSubscriptionProfile
+					vc_ae1.start(f_cse_createResource(int20, v_createServiceSubscribedNode, v_subscriptionProfileIndex));
+					v_serviceSubscribedNodeIndex := f_getLatestResourceIndex(vc_ae1);
+					
+					
+					// Test Body
+					
+					vc_ae1.start(f_cse_updateResource(int20, v_serviceSubscribedNodeIndex, v_updateServiceSubscribedNode));
+					
+					v_requestPrimitive := m_t8_request_delete(v_requestResourceURI,v_requestHeader , niddConfig); // NIDD configuration delete request
+					tc_ac.start;
+					alt{
+						[] mcnPortIn.receive(mw_t8Request(v_requestPrimitive)) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": NIDD configuration received.");
+						}
+						[] mcnPortIn.receive(mw_t8Request(?)){
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Other operation received");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer");
+						}
+					}
+					
+					// Postamble: NOTE This needs to be done.
+					//f_cse_postamble_deleteResourcesCSE();
+					
+					//Tear Down
+					f_cf05Down();
+				} // end of function f_CSE_3GPP_NIDD_003
+				
+
+				
+				/* @desk Check that IUT sends NIDD configuration delete request when it receives delete request of <serviceSubscribedNode> resource		 *
+				 */
+				testcase TC_CSE_3GPP_NIDD_004() runs on Tester system ScefSystem {
+						
+					var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+					v_scef.start(f_CSE_3GPP_NIDD_004());
+					v_scef.done;
+						
+				} // end testcase TC_CSE_3GPP_NIDD_004
+				
+				function f_CSE_3GPP_NIDD_004() runs on ScefSimu system ScefSystem{
+					var template RequestPrimitive v_createServiceSubscribedNode := m_createServiceSubscribedNode;
+					var template RequestPrimitive v_createServiceSubscriptionProfile := m_createM2mServiceSubscriptionProfileMaxValue1; // maxNumAEs 1
+
+					var integer v_aeIndex := -1, v_serviceSubscribedNodeIndex := -1, v_subscriptionProfileIndex := -1;
+					var RequestPrimitive v_request;
+					var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+					var template T8Request v_requestPrimitive;
+					var NiddConfiguration v_niddConfiguration;
+					var RequestBody niddConfig := {individualNiddConfiguration := v_niddConfiguration};
+					var RequestHeaders v_requestHeader; // := {header_name := "header1"};
+					//var template NiddConfiguration v_niddConfiguration;
+					
+					v_createServiceSubscribedNode.primitiveContent.serviceSubscribedNode.niddRequired := true;
+					v_createServiceSubscribedNode.primitiveContent.serviceSubscribedNode.nodeID := "M2M-Ext-ID";
+					
+					
+					
+					// Test component configuration
+					f_cf05Up();
+					
+					// ServiceSubscriptionProfile directly under CSEBase from superAE					
+					vc_ae1.start(f_cse_createResource(int11, v_createServiceSubscriptionProfile, -1));
+					v_subscriptionProfileIndex := f_getLatestResourceIndex(vc_ae1);
+					
+					// ServiceSubscribedNode under ServiceSubscriptionProfile
+					vc_ae1.start(f_cse_createResource(int20, v_createServiceSubscribedNode, v_subscriptionProfileIndex));
+					v_serviceSubscribedNodeIndex := f_getLatestResourceIndex(vc_ae1);
+										
+					// Test Body
+					
+					vc_ae1.start(f_cse_deleteResource(v_serviceSubscribedNodeIndex));
+					
+					v_requestPrimitive := m_t8_request_delete(v_requestResourceURI, v_requestHeader, niddConfig); // NIDD configuration delete request 
+					tc_ac.start;
+					alt{
+						[] mcnPortIn.receive(mw_t8Request(v_requestPrimitive)) {
+							tc_ac.stop;
+							setverdict(pass, __SCOPE__ & ": NIDD configuration delete received.");
+						}
+						[] mcnPortIn.receive(mw_t8Request(?)){
+							tc_ac.stop;
+							setverdict(fail, __SCOPE__ & ": Other operation received");
+						}
+						[] tc_ac.timeout {
+							setverdict(fail, __SCOPE__ & ": No answer");
+						}
+					}
+					
+					// Postamble: NOTE This needs to be done.
+					//f_cse_postamble_deleteResourcesCSE();
+					
+					//Tear Down
+					f_cf05Down();
+				} // end of function f_CSE_3GPP_NIDD_004
+				
+				
+		/* @desk Check that IUT issues Scef-based Mobile Termnated(MT) NIDD downlink data transfer request if the size of the oneM2M request primitive to be sent is less than maximumPacketSize
+		 *
+		 */
+		testcase TC_CSE_3GPP_NIDD_005() runs on Tester system ScefSystem {
+						
+			var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+			v_scef.start(f_CSE_3GPP_NIDD_005());
+			v_scef.done;
+		} // end testcase TC_CSE_3GPP_NIDD_005
+				
+		function f_CSE_3GPP_NIDD_005() runs on ScefSimu system ScefSystem{
+			var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
+			var integer v_aeIndex := -1;
+			var integer v_ae2Index := -1;
+			var integer v_resourceIndexContainer := -1;
+			var integer v_resourceIndexSubscription := -1;
+			var template RequestPrimitive v_requestContainer := m_createContainerBase;
+			var template RequestPrimitive v_requestSubscription;
+			var OneM2M_Types.RequestPrimitive v_request;
+			var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+			var template T8Request v_requestPrimitiveNIDDConfig;
+			const OneM2M_Types_3GPP_T8.ExternalId c_externalID := "M2M-Ext-ID";
+			const integer c_maxPacketSize := 1200;
+			var NiddConfiguration v_niddConfiguration :=
+			{
+				externalId := c_externalID,
+				maximumPacketSize := c_maxPacketSize
+						
+			}; // Should contain ExternalId and MaxPacketsize
+			var RequestBody niddConfig :=
+			{
+				individualNiddConfiguration := v_niddConfiguration
+			};
+			var RequestHeaders v_requestHeader; // := {header_name := "header1"};
+			var template T8Request v_requestPrimitiveNiddDownlinkDataTransfer;
+			var NiddDownlinkDataTransfer v_niddDownlinkDataTransfer;  //Should contain Notification in data field
+			var RequestBody v_niddDLDataTransferBody :=
+			{
+				individualNiddDownlinkDataDelivery := v_niddDownlinkDataTransfer
+			};
+					 
+			var template PrimitiveContent v_contentNotification := {contentInstance := mw_contentContentInstance_rc1};// all attributes expected
+			//var template NiddConfiguration v_niddConfiguration;
+					
+			// Test component configuration
+			f_cf05Up();
+					
+			//Preamble
+			
+			//Sending NIDD config request with ExternalId "M2M-Ext-ID" and MaxPacketSize
+			v_requestPrimitiveNIDDConfig := m_t8_request_post(v_requestResourceURI, v_requestHeader, niddConfig); // NIDD configuration delete request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNIDDConfig));
+			
+			//Registering AE with ExternalId "M2M-Ext-ID"	
+			vc_ae1.start(f_cse_preamble_registerAeWithExternalId(-,-,-, "M2M-Ext-ID"));
+			v_aeIndex := f_getLatestResourceIndex(vc_ae1);
+			
+			vc_ae1.start(f_cse_preamble_registerAe());
+			v_ae2Index := f_getLatestResourceIndex(vc_ae1);
+					
+					
+			if (vc_ae1.running) {
+				vc_ae1.stop;
+			}
+			
+			vc_ae1.start(f_cse_createResource(int3, v_requestContainer, v_ae2Index));
+			v_resourceIndexContainer := f_getLatestResourceIndex(vc_ae1);
+					
+			v_requestSubscription := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndexContainer), -, {f_getResourceAddress(v_aeIndex)}, m_eventNotificationCriteria({int3}), -, omit, omit, omit, -, omit);
+			
+			vc_ae1.start(f_cse_createResource(int23, v_requestSubscription, v_ae2Index));//Subscription
+			v_resourceIndexSubscription := f_getLatestResourceIndex(vc_ae1);
+								
+			// Test Body
+			
+			vc_ae1.start(f_cse_createResource(int4, v_createRequest, v_ae2Index));
+					
+			vc_ae1.start(f_cse_notifyProcedure_representationHandler(v_contentNotification)); // check if the notification is well received and if its content matchs
+					
+			/*if(sizeof(v_contentNotification) < c_maxPacketSize)
+			{
+			v_niddDownlinkDataTransfer :=
+			{
+			data := (charstring)v_contentNotification
+			};
+			}*/
+			v_requestPrimitiveNiddDownlinkDataTransfer := mw_t8_request_post(v_requestResourceURI, -,  v_niddDLDataTransferBody);
+					 
+			tc_ac.start;
+			alt{
+				[] mcnPortIn.receive(mw_t8Request(v_requestPrimitiveNiddDownlinkDataTransfer)) {
+					tc_ac.stop;
+					setverdict(pass, __SCOPE__ & ": NIDD downlink data transfer received.");
+				}
+				[] mcnPortIn.receive(mw_t8Request(?)){
+					tc_ac.stop;
+					setverdict(fail, __SCOPE__ & ": Other operation received");
+				}
+				[] tc_ac.timeout {
+					setverdict(fail, __SCOPE__ & ": No answer");
+				}
+			}
+					
+			// Postamble: NOTE This needs to be done.
+			//f_cse_postamble_deleteResourcesCSE();
+					
+			//Tear Down
+			f_cf05Down();
+		} // end of function f_CSE_3GPP_NIDD_005
+				
+		/* @desk Check that IUT does not issue Scef-based Mobile Termnated(MT) NIDD downlink data transfer request if the size of the oneM2M request primitive to be sent is more than maximumPacketSize
+		 *
+		 */
+		testcase TC_CSE_3GPP_NIDD_006() runs on Tester system ScefSystem {
+						
+			var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+			v_scef.start(f_CSE_3GPP_NIDD_006());
+			v_scef.done;
+						
+		} // end testcase TC_CSE_3GPP_NIDD_006
+				
+		function f_CSE_3GPP_NIDD_006() runs on ScefSimu system ScefSystem{
+			var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
+			var integer v_aeIndex := -1;
+			var integer v_ae2Index := -1;
+			var integer v_resourceIndexContainer := -1;
+			var integer v_resourceIndexSubscription := -1;
+			var template RequestPrimitive v_requestContainer := m_createContainerBase;
+			var template RequestPrimitive v_requestSubscription;
+			var OneM2M_Types.RequestPrimitive v_request;
+			var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+			var template T8Request v_requestPrimitiveNIDDConfig;
+			const OneM2M_Types_3GPP_T8.ExternalId c_externalID := "M2M-Ext-ID";
+			const integer c_maxPacketSize := 20; //Notification content will more than 20 Bytes
+			var NiddConfiguration v_niddConfiguration :=
+			{
+				externalId := c_externalID,
+				maximumPacketSize := c_maxPacketSize
+						
+			}; // Should contain ExternalId and MaxPacketsize
+			var RequestBody niddConfig :=
+			{
+				individualNiddConfiguration := v_niddConfiguration
+			};
+			var RequestHeaders v_requestHeader; // := {header_name := "header1"};
+			var template T8Request v_requestPrimitiveNiddDownlinkDataTransfer;
+			var NiddDownlinkDataTransfer v_niddDownlinkDataTransfer;  //Should contain Notification in data field
+			var RequestBody v_niddDLDataTransferBody :=
+			{
+				individualNiddDownlinkDataDelivery := v_niddDownlinkDataTransfer
+			};
+					 
+			var template PrimitiveContent v_contentNotification := {contentInstance := mw_contentContentInstance_rc1};// all attributes expected
+			//var template NiddConfiguration v_niddConfiguration;
+					
+			// Test component configuration
+			f_cf05Up();
+					
+			//Preamble
+			//Sending NIDD config request with ExternalId "M2M-Ext-ID" and MaxPacketSize
+			v_requestPrimitiveNIDDConfig := m_t8_request_post(v_requestResourceURI, v_requestHeader, niddConfig); // NIDD configuration delete request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNIDDConfig));
+			
+			//Registering AE with ExternalId "M2M-Ext-ID"
+
+			vc_ae1.start(f_cse_preamble_registerAeWithExternalId(-,-,-, "M2M-Ext-ID"));
+			v_aeIndex := f_getLatestResourceIndex(vc_ae1);
+			
+			vc_ae1.start(f_cse_preamble_registerAe());
+			v_ae2Index := f_getLatestResourceIndex(vc_ae1);		
+					
+			if(vc_ae1.running) {
+				vc_ae1.stop;
+			};
+			
+			vc_ae1.start(f_cse_createResource(int3, v_requestContainer, v_ae2Index));
+			v_resourceIndexContainer := f_getLatestResourceIndex(vc_ae1);
+					
+			v_requestSubscription := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndexContainer), -, {f_getResourceAddress(v_aeIndex)}, m_eventNotificationCriteria({int3}), -, omit, omit, omit, -, omit);
+			
+			vc_ae1.start(f_cse_createResource(int23, v_requestSubscription, v_ae2Index));//Subscription
+			v_resourceIndexSubscription := f_getLatestResourceIndex(vc_ae1);
+					
+			// Test Body
+										
+			vc_ae1.start(f_cse_createResource(int4, v_createRequest, v_ae2Index));
+					
+			vc_ae1.start(f_cse_notifyProcedure_representationHandler(v_contentNotification)); // check if the notification is well received and if its content matchs
+					
+			/*if(sizeof(v_contentNotification) < c_maxPacketSize)
+			{
+			v_niddDownlinkDataTransfer :=
+			{
+			data := (charstring)v_contentNotification
+			};
+			}*/
+			v_requestPrimitiveNiddDownlinkDataTransfer := mw_t8_request_post(v_requestResourceURI, -,  v_niddDLDataTransferBody);
+					 
+			tc_ac.start;
+			alt{
+				[] mcnPortIn.receive(mw_t8Request(v_requestPrimitiveNiddDownlinkDataTransfer)) {
+					tc_ac.stop;
+					setverdict(fail, __SCOPE__ & ": NIDD downlink data transfer received.");
+				}
+				[] mcnPortIn.receive(mw_t8Request(?)){
+					tc_ac.stop;
+					setverdict(pass, __SCOPE__ & ": NIDD downlink data transfer not received.");
+				}
+				[] tc_ac.timeout {
+					setverdict(pass, __SCOPE__ & ": NIDD downlink data transfer not received. Timeout has occurred.");
+				}
+			}
+					
+			// Postamble: NOTE This needs to be done.
+			//f_cse_postamble_deleteResourcesCSE();
+					
+			//Tear Down
+			f_cf05Down();
+		} // end of function f_CSE_3GPP_NIDD_006
+				
+		/* @desk Check that IUT issues Scef-based Mobile Termnated(MT) NIDD downlink data transfer request if the size of the oneM2M response primitive to be sent is more than maximumPacketSize
+		 *
+		 */
+		testcase TC_CSE_3GPP_NIDD_007() runs on Tester system ScefSystem {
+						
+			var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+			v_scef.start(f_CSE_3GPP_NIDD_007());
+			v_scef.done;
+						
+		} // end testcase TC_CSE_3GPP_NIDD_007
+				
+		function f_CSE_3GPP_NIDD_007() runs on ScefSimu system ScefSystem{
+			var template RequestPrimitive v_createRequest := m_createAe(PX_TS_AE1.appId, omit, omit);
+			var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+			var template T8Request v_requestPrimitiveNIDDConfig;
+			const OneM2M_Types_3GPP_T8.ExternalId c_externalID := "M2M-Ext-ID";
+			const integer c_maxPacketSize := 1200; //Notification content will more than 20 Bytes
+			var NiddConfiguration v_niddConfiguration :=
+			{
+				externalId := c_externalID,
+				maximumPacketSize := c_maxPacketSize
+						
+			}; // Should contain ExternalId and MaxPacketsize
+			var RequestBody niddConfig :=
+			{
+				individualNiddConfiguration := v_niddConfiguration
+			};
+					 
+			var template T8Request v_requestPrimitiveNIDDUplink;
+					
+			v_createRequest.primitiveContent.aE.m2M_Ext_ID := "M2M-Ext-ID";
+			var universal charstring v_chr1 := any2unistr(v_createRequest);
+			var NiddUplinkDataNotification v_niddUplinkDataNotification :=
+			{
+				data := v_chr1
+			};
+			var RequestBody niddUplink :=
+			{
+				niddUplinkDataNotification := v_niddUplinkDataNotification
+			};
+			var RequestHeaders v_requestHeader; // := {header_name := "header1"};
+			var template T8Request v_requestPrimitiveNiddDownlinkDataTransfer;
+			var NiddDownlinkDataTransfer v_niddDownlinkDataTransfer;  //Should contain Notification in data field
+			var RequestBody v_niddDLDataTransferBody :=
+			{
+				individualNiddDownlinkDataDelivery := v_niddDownlinkDataTransfer
+			};
+					 					
+			// Test component configuration
+			f_cf05Up();
+					
+			//Preamble
+			
+			//Sending NIDD config request with ExternalId "M2M-Ext-ID" and MaxPacketSize
+			v_requestPrimitiveNIDDConfig := m_t8_request_post(v_requestResourceURI, v_requestHeader, niddConfig); // NIDD configuration create request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNIDDConfig));
+					
+			// Test Body
+			v_requestPrimitiveNIDDUplink := m_t8_request_post(v_requestResourceURI, v_requestHeader, niddUplink); // NIDD Uplink data transfer request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNIDDUplink));
+					
+			/*if(sizeof(v_contentNotification) < c_maxPacketSize)
+			{
+			v_niddDownlinkDataTransfer :=
+			{
+			data := (charstring)v_contentNotification
+			};
+			}*/
+			v_requestPrimitiveNiddDownlinkDataTransfer := mw_t8_request_post(v_requestResourceURI, -,  v_niddDLDataTransferBody);
+					 
+			tc_ac.start;
+			alt{
+				[] mcnPortIn.receive(mw_t8Request(v_requestPrimitiveNiddDownlinkDataTransfer)) {
+					tc_ac.stop;
+					setverdict(pass, __SCOPE__ & ": NIDD downlink data transfer received.");
+				}
+				[] mcnPortIn.receive(mw_t8Request(?)){
+					tc_ac.stop;
+					setverdict(fail, __SCOPE__ & ": Other operation received");
+				}
+				[] tc_ac.timeout {
+					setverdict(fail, __SCOPE__ & ": No Answer");
+				}
+			}
+					
+			// Postamble: NOTE This needs to be done.
+			//f_cse_postamble_deleteResourcesCSE();		
+			
+			//Tear Down
+			f_cf05Down();
+		} // end of function f_CSE_3GPP_NIDD_007
+				
+		testcase TC_CSE_3GPP_NIDD_008() runs on Tester system ScefSystem {
+						
+			var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+			v_scef.start(f_CSE_3GPP_NIDD_008());
+			v_scef.done;
+						
+		} // end testcase TC_CSE_3GPP_NIDD_008
+				
+				
+		function f_CSE_3GPP_NIDD_008() runs on ScefSimu system ScefSystem{
+			var template RequestPrimitive v_createRequest := m_createAe(PX_TS_AE1.appId, omit, omit);
+			var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+			var template T8Request v_requestPrimitiveNIDDConfig;
+			const OneM2M_Types_3GPP_T8.ExternalId c_externalID := "M2M-Ext-ID";
+			const integer c_maxPacketSize := 1200; //Notification content will more than 20 Bytes
+			var NiddConfiguration v_niddConfiguration :=
+			{
+				externalId := c_externalID,
+				maximumPacketSize := c_maxPacketSize
+						
+			}; // Should contain ExternalId and MaxPacketsize
+			var RequestBody niddConfig :=
+			{
+				individualNiddConfiguration := v_niddConfiguration
+			};
+					 
+			var template T8Request v_requestPrimitiveNIDDUplink;
+					
+			v_createRequest.primitiveContent.aE.m2M_Ext_ID := "M2M-Ext-ID";
+			var universal charstring v_chr1 := any2unistr(v_createRequest);
+			var NiddUplinkDataNotification v_niddUplinkDataNotification :=
+			{
+				data := v_chr1
+			};
+			var RequestBody niddUplink :=
+			{
+				niddUplinkDataNotification := v_niddUplinkDataNotification
+			};
+			var RequestHeaders v_requestHeader; // := {header_name := "header1"};
+			var template T8Request v_requestPrimitiveNiddDownlinkDataTransfer;
+			var NiddDownlinkDataTransfer v_niddDownlinkDataTransfer;  //Should contain Notification in data field
+			var RequestBody v_niddDLDataTransferBody :=
+			{
+				individualNiddDownlinkDataDelivery := v_niddDownlinkDataTransfer
+			};
+					 
+			var template T8Request v_requestPrimitiveNiddDownlinkDataDeliveryStatusNotification;
+			var NiddDownlinkDataDeliveryStatusNotification v_niddDownlinkDataDeliveryStatusNotification;  //Should contain Notification in data field
+			var RequestBody v_niddDLDataStatusNotificationBody :=
+			{
+				niddDownlinkDataDeliveryStatusNotification := v_niddDownlinkDataDeliveryStatusNotification
+			};
+					
+			// Test component configuration
+			f_cf05Up();
+					
+			//Preamble
+			
+			//Sending NIDD config request with ExternalId "M2M-Ext-ID" and MaxPacketSize
+			v_requestPrimitiveNIDDConfig := m_t8_request_post(v_requestResourceURI, v_requestHeader, niddConfig); // NIDD configuration create request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNIDDConfig));
+					
+			//Scef sent MO request
+			v_requestPrimitiveNIDDUplink := m_t8_request_post(v_requestResourceURI, v_requestHeader, niddUplink); // NIDD Uplink data transfer request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNIDDUplink));
+					
+			//IUT sent MT request
+			v_requestPrimitiveNiddDownlinkDataTransfer := mw_t8_request_post(v_requestResourceURI, -,  v_niddDLDataTransferBody);
+			mcnPortIn.receive(mw_t8Request(v_requestPrimitiveNiddDownlinkDataTransfer));
+					
+			// Test Body
+			//Scef send niddDownlink data delivery notification
+			v_requestPrimitiveNiddDownlinkDataDeliveryStatusNotification := m_t8_request_post(v_requestResourceURI, v_requestHeader, v_niddDLDataStatusNotificationBody); // NIDD Uplink data transfer request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNiddDownlinkDataDeliveryStatusNotification));
+					
+			tc_ac.start;
+			alt{
+				[] mcnPortIn.receive(mw_t8Response(mw_t8_response_204_no_content)) { //Check if 204 no content is received from IUT
+					tc_ac.stop;
+					setverdict(pass, __SCOPE__ & ": 204 no content is received.");
+				}
+				[] mcnPortIn.receive(mw_t8Request(?)){
+					tc_ac.stop;
+					setverdict(fail, __SCOPE__ & ": Other operation received");
+				}
+				[] tc_ac.timeout {
+					setverdict(fail, __SCOPE__ & ": No Answer");
+				}
+			}
+					
+			// Postamble: NOTE This needs to be done.
+			//f_cse_postamble_deleteResourcesCSE();
+					
+			//Tear Down
+			f_cf05Down();
+		} // end of function f_CSE_3GPP_NIDD_008
+				
+				
+		testcase TC_CSE_3GPP_NIDD_009() runs on Tester system ScefSystem {
+						
+			var ScefSimu v_scef := ScefSimu.create("SCEF") alive;
+						
+			v_scef.start(f_CSE_3GPP_NIDD_009());
+			v_scef.done;
+						
+		} // end testcase TC_CSE_3GPP_NIDD_009
+				
+		function f_CSE_3GPP_NIDD_009() runs on ScefSimu system ScefSystem{
+			var template RequestPrimitive v_createRequest := m_createAe(PX_TS_AE1.appId, omit, omit);
+			var OneM2M_Types_3GPP_T8.URI v_requestResourceURI;
+			var template T8Request v_requestPrimitiveNIDDConfig;
+			const OneM2M_Types_3GPP_T8.ExternalId c_externalID := "M2M-Ext-ID";
+			const integer c_maxPacketSize := 1200; //Notification content will more than 20 Bytes
+			var NiddConfiguration v_niddConfiguration :=
+			{
+				externalId := c_externalID,
+				maximumPacketSize := c_maxPacketSize
+						
+			}; // Should contain ExternalId and MaxPacketsize
+			var RequestBody niddConfig :=
+			{
+				individualNiddConfiguration := v_niddConfiguration
+			};
+					 
+			var template T8Request v_requestPrimitiveNIDDUplink;
+					
+			v_createRequest.primitiveContent.aE.m2M_Ext_ID := "M2M-Ext-ID";
+			var universal charstring v_chr1 := any2unistr(v_createRequest);
+			var NiddUplinkDataNotification v_niddUplinkDataNotification :=
+			{
+				data := v_chr1
+			};
+			var RequestBody niddUplink :=
+			{
+				niddUplinkDataNotification := v_niddUplinkDataNotification
+			};
+			var RequestHeaders v_requestHeader; // := {header_name := "header1"};
+					
+			// Test component configuration
+			f_cf05Up();
+					
+			//Preamble
+			
+			//Sending NIDD config request with ExternalId "M2M-Ext-ID" and MaxPacketSize
+			v_requestPrimitiveNIDDConfig := m_t8_request_post(v_requestResourceURI, v_requestHeader, niddConfig); // NIDD configuration create request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNIDDConfig));
+					
+			// Test Body
+			//Scef sent MO request
+			v_requestPrimitiveNIDDUplink := m_t8_request_post(v_requestResourceURI, v_requestHeader, niddUplink); // NIDD Uplink data transfer request
+			mcnPort.send(mw_t8Request(v_requestPrimitiveNIDDUplink));
+					
+			tc_ac.start;
+			alt{
+				[] mcnPortIn.receive(mw_t8Response(mw_t8_response_204_no_content)) { //Check if 204 no content is received from IUT
+					tc_ac.stop;
+					setverdict(pass, __SCOPE__ & ": 204 no content is received.");
+				}
+				[] mcnPortIn.receive(mw_t8Request(?)){
+					tc_ac.stop;
+					setverdict(fail, __SCOPE__ & ": Other operation received");
+				}
+				[] tc_ac.timeout {
+					setverdict(fail, __SCOPE__ & ": No Answer");
+				}
+			}
+					
+			// Postamble: NOTE This needs to be done.
+			//f_cse_postamble_deleteResourcesCSE();
+					
+			//Tear Down
+			f_cf05Down();
+		} // end of function f_CSE_3GPP_NIDD_009
+	} // end group Scef_Based_NIDD
+			
+			
+} // end group IWK_3GPP
+		
 	}//end group CSE
 
 }
\ No newline at end of file