Commit 3ff99fc6 authored by ringst's avatar ringst
Browse files

playground for interface configuration purely with TTCN-3 module parameters

parent 85603f92
Loading
Loading
Loading
Loading
+108 −0
Original line number Diff line number Diff line
module Entity_configuration {

	type record Vendor {
    	charstring name
    	//integer id	
	}	
	
	type charstring IP_address;
	type integer Port_number;
	
	type record IP_interface {
		IP_address IpAddress,
		set of Port_number portNumber	
	}
	
	type set of IP_interface IpInterfaceList;
	
	type union Interface {
		IpInterfaceList IpInterface
	}
	
	type record Entity {
		charstring name,
		set of Vendor vendor,
		Interface interface
	}
 
	type set of Entity EntityList;
 
 	type record EntityConnection { 
 		charstring Entity_A,
 		charstring Entity_B,
 		charstring Interface_name
	}
 
 	type set of EntityConnection EntityConnectionList; 
 
	modulepar EntityList entities := {
	   {
			name := "UE",
			vendor := {
				{
					name := "UE_Provider_A" 
			   	}
		   	},
			interface := {
    			IpInterface := {
        						   {
        							   IpAddress := "127.0.0.1", 
        							   portNumber := {
        								   5060	
        							   }
        						   },
        						   {	
        							   IpAddress := "127.0.0.1",
        							   portNumber := {
        								   5061	
        							   }
        						   }	
    					   		}
						}	
	   },
	   {
		name := "IMS",
		vendor := {
			{
				name := "IMS_Provider_A" 
						}
					},
		interface := {
    		IpInterface := {
    							{
    								IpAddress := "127.0.0.2", 
    								portNumber := {
    									5060	
    								}
    							},
    							{
    								IpAddress := "127.0.0.2",
    								portNumber := {
    									5061	
    								}
    							}	
    						}
					}	
			}
   };
   
   modulepar EntityConnectionList entityInterfaceRelation := {
		{
			Entity_A := "UE",
			Entity_B := "IMS",
			Interface_name := "Gm"
		},
		{
			Entity_A := "IMS",
			Entity_B := "IMS",
			Interface_name := "Mw"
		}		 
   }
 
	modulepar integer vendorA := 0;
	modulepar integer vendorB := 1;



	
}
 No newline at end of file
+129 −0
Original line number Diff line number Diff line
module Interface_configuration {
	
	type charstring IP_address;
	type integer Port_number;
 
	type record IP_interface {
	   IP_address IpAddress,
	   set of Port_number portNumber	
	}
 
	type set of IP_interface IpInterfaceList;
 
	type union Interface {
	   IpInterfaceList IpInterface
	}
 
	type record Vendor {
	   charstring name,
	   Interface interface	
	}
 
 
	type record ReferencePoint {
	   charstring name,
	   set of Vendor vendor	
	}
 
	type set of ReferencePoint ReferencePointList;
 
 
	modulepar ReferencePointList refPoint := {
	   {
		   name := "Gm",
		   vendor := {
			   {
				   name := "A", // is this related to the vendor????
				   interface := {
					   IpInterface := {
						   {
								/* Conf of UE ???*/
							   IpAddress := "127.0.0.1",
							   portNumber := {
								   5060	
							   }
						   },
						   {
								/* Conf of IMS (P-CSCF) ???*/
							   IpAddress := "127.0.0.1",
							   portNumber := {
								   5061	
							   }
						   }	
					   }	
				   }
			   },
			   {
				   name := "B",
				   interface := {
					   IpInterface := {
						   {
							   IpAddress := "127.0.0.2",
							   portNumber := {
								   5060	
							   }
						   },
						   {
							   IpAddress := "127.0.0.2",
							   portNumber := {
								   5061	
							   }
						   }	
					   }	
				   }
			   }
		   }
	   },
		{
			name := "Mw",
			vendor := {
				{
					name := "A",
					interface := {
						IpInterface := {
							{
								IpAddress := "127.0.0.1",
								portNumber := {
									5062	
								}
							},
							{
								IpAddress := "127.0.0.1",
								portNumber := {
									5063	
								}
							}	
						}	
					}
				},
				{
					name := "B",
					interface := {
						IpInterface := {
							{
								IpAddress := "127.0.0.2",
								portNumber := {
									5062	
								}
							},
							{
								IpAddress := "127.0.0.2",
								portNumber := {
									5063	
								}
							}	
						}	
					}
				}
			}
		}   

	};
 
	modulepar integer vendorA := 0;
	modulepar integer vendorB := 1;



	
}
 No newline at end of file
+12 −0
Original line number Diff line number Diff line
module testcases {
	
	
	//import from Interface_configuration all;
	import from Entity_configuration all;
	
	type component comp {}
 
	testcase TC_TEST () runs on comp system comp {
				log ("test");	
	}
}
 No newline at end of file