NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
LTENR_NetworkSlicing.h
1#pragma once
2/************************************************************************************
3* Copyright (C) 2023 *
4* TETCOS, Bangalore. India *
5* *
6* Tetcos owns the intellectual property rights in the Product and its content. *
7* The copying, redistribution, reselling or publication of any or all of the *
8* Product or its content without express prior written consent of Tetcos is *
9* prohibited. Ownership and / or any other right relating to the software and all *
10* intellectual property rights therein shall remain at all times with Tetcos. *
11* *
12* This source code is licensed per the NetSim license agreement. *
13* *
14* No portion of this source code may be used as the basis for a derivative work, *
15* or used, for any purpose other than its intended use per the NetSim license *
16* agreement. *
17* *
18* This source code and the algorithms contained within it are confidential trade *
19* secrets of TETCOS and may not be used as the basis for any other software, *
20* hardware, product or service. *
21* *
22* Author: Shashi Kant Suman *
23* *
24* ----------------------------------------------------------------------------------*/
25#ifndef _NETSIM_LTENR_NETWORKSLICING_H_
26#define _NETSIM_LTENR_NETWORKSLICING_H_
27
28#pragma region HEADER_FILES_AND_WARNING_REMOVAL
29#include "List.h"
30#pragma warning ( disable : 4090 )
31#pragma warning ( disable : 4100 )
32#pragma warning ( disable : 4189 )
33#pragma warning ( disable : 4244 )
34#pragma endregion
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40 //Standard
41 // 3GPP 24.501 - 9.11.2.8
42
43 typedef int SLICE_DIFFERENTIATOR;
44#define SLICE_DIFFERENTIATOR_NO_SLICE ((int)0xffffffff)
45#define MIN_SLICE_DIFFERENTIATOR ((int)0xffffffff)
46#define MAX_SLICE_DIFFERENTIATOR 0xfffffffe
47
48 typedef enum
49 {
50 SLICE_SERVICE_TYPE_NONE = 0x00000000,
51 SLICE_SERVICE_TYPE_EMBB = 0x00000001,
52 SLICE_SERVICE_TYPE_URLLC = 0x00000002,
53 SLICE_SERVICE_TYPE_MIOT = 0x00000003,
54 SLICE_SERVICE_TYPE_V2X = 0x00000004,
55 SLICE_SERVICE_TYPE_UNKNOWN,
56 }SLICE_SERVICE_TYPE;
57 static const char* strSLICE_SERVICE_TYPE[] = { "BE","EMBB","URLLC","MIOT","V2X","UNKNOWN" };
58
59 typedef enum
60 {
61 SLICE_STATUS_UNKNOWN = 0x00000000,
62 SLICE_STATUS_CONFIGURED = 0x00000001,
63 SLICE_STATUS_ALLOWED = 0x00000002,
64 SLICE_STATUS_REJECTED_NOT_AVAILABLE_IN_PLMN = 0x00000003,
65 SLICE_STATUS_REJECTED_NOT_AVAILABLE_IN_REGISTERED_AREA = 0x00000004,
66 }SLICE_STATUS;
67
68 typedef struct stru_SliceBandwidth
69 {
70 //double maxGuaranteedBitRate_mbps;
71 //double minGuaranteedBitRate_mbps;
72 //double aggregateRateGuarantee_mbps;
73 //Dynamic
74 double minResourceShare;
75 double maxResourceShare;
76 //Static
77 double resourceAllocationPercentage;
78 double nu;
79 double sumAvgThroughput;
80 }SLICEBANDWIDTH, * ptrSLICEBANDWIDTH;
81
82 typedef enum
83 {
84 LTENR_RESOURCE_SHARING_STATIC,
85 LTENR_RESOURCE_SHARING_DYNAMIC,
86 }LTENR_RESOURCE_SHARING_TECHNIQUE;
87 static const char* strLTENR_RESOURCE_SHARING_TECHNIQUE[] = {"STATIC","DYNAMIC" };
88
89 typedef struct stru_NetworkSliceInfo
90 {
91 NETSIM_ID sliceId;
92 SLICE_DIFFERENTIATOR sliceDifferentiator;
93 SLICE_SERVICE_TYPE sliceServiceType;
94 SLICE_STATUS sliceStatus;
95
96 SLICEBANDWIDTH uplinkBandwidth;
97 SLICEBANDWIDTH downlinkBandwidth;
98 }NetworkSliceInfo, * ptrNetworkSliceInfo;
99
101 {
102 bool isSlicing;
103 NETSIM_ID sliceCount;
104 NETSIM_ID* ueSliceId;
105 char* slicingFileName;
106 double EWMA_Learning_Rate;
107 double GBRBiasLearningRate;
108 double nu_max;
109 double lambda_max;
110 double sliceIndexBiasLearningRate;
111
112 LTENR_RESOURCE_SHARING_TECHNIQUE rsrcSharingTechnique;
113 NetworkSliceInfo Info[19];
114 }LTENR_NWSLICING, * ptrLTENR_NWSLICING;
115 ptrLTENR_NWSLICING nws;
116 static inline bool IsUEPartOfStaticSlice(NETSIM_ID ueId, UINT sliceId) {
117 return ((nws->rsrcSharingTechnique == LTENR_RESOURCE_SHARING_DYNAMIC)
118 || ((nws->rsrcSharingTechnique == LTENR_RESOURCE_SHARING_STATIC)
119 && (nws->ueSliceId[ueId] == sliceId)));
120 }
121
122 void LTENR_ConfigureNETWORK_SLICINGConfig();
123
124#ifdef __cplusplus
125}
126#endif
127#endif /* _NETSIM_LTENR_NETWORKSLICING_H_ */