e558d025fd38c0e8ae420e9eaf9aa4664f577d23
[ric-app/rc.git] / control / rcTypes.go
1 package control\r
2 \r
3 import (\r
4         "sync"\r
5 \r
6         rc "gerrit.o-ran-sc.org/r/ric-app/rc/protocol/grpc/ricmsgcommrpc/rc"\r
7         "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"\r
8 )\r
9 \r
10 const MAX_CONTROL_REQ_ATTEMPTS = 2\r
11 const RIC_CONTROL_STYLE_TYPE = 3\r
12 const RIC_CONTROL_ACTION_ID = 1\r
13 \r
14 const TIME_NANOSEC = 1000000000\r
15 \r
16 const RIC_CONTROL_TARGET_PRIMARY_CELL = 1\r
17 const RIC_CONTROL_TARGET_CELL = 2\r
18 const RIC_CONTROL_CELL_TYPE = 3\r
19 const RIC_CONTROL_CGI_TYPE = 4\r
20 \r
21 //GRPC rsp codes\r
22 const GRPC_SUCCESS = 0\r
23 const GRPC_ERROR = -1\r
24 \r
25 type Control struct {\r
26         eventRicControlReqTimePeriod int32                //maximum time for the RIC Control Request creation procedure in the E2 Node\r
27         rcChan                       chan *xapp.RMRParams //channel for receiving rmr message\r
28         eventRicControlReqExpiredMap map[int]bool         //map for recording the RIC Control Request event creation procedure is expired or not\r
29         eventRicControlReqExpiredMu  *sync.Mutex          //mutex for eventCreateExpiredMap\r
30         ricRequestInstanceID         int\r
31 }\r
32 \r
33 type RicHoControlMsg struct {\r
34         RicControlGrpcReqPtr *rc.RicControlGrpcReq\r
35 }\r
36 \r
37 \r
38 type UEid struct {\r
39         amf_UE_NGAP_Id   int64\r
40         pLMNIdentitybuf  string\r
41         aMFRegionIDbuf   string\r
42         aMFSetIDbuf      string\r
43         aMFPointerbuf    string\r
44         F1AP_id         []int64\r
45         E1AP_id         []int64\r
46 }\r
47 \r
48 type ValueInt int64\r
49 \r
50 type valueReal float64\r
51 \r
52 type Null int32\r
53 \r
54 type PrintableString OctetString\r
55 \r
56 type OctetString struct {\r
57         Buf  []byte\r
58         Size int\r
59 }\r
60 \r
61 type BitString struct {\r
62         Buf        []byte\r
63         Size       int\r
64         BitsUnused int\r
65 }\r
66 \r
67 type ControlAckMsg struct {\r
68         RequestID             int32\r
69         InstanceId            int32\r
70         FuncID                int32\r
71         CallProcessID         []byte\r
72         CallProcessIDLength   int32\r
73         ControlOutcome        []byte\r
74         ControlOutcomeLength  int32\r
75 }\r
76 \r
77 type ControlOutcomeFormat1ItemType struct {\r
78         RanParameterID     int64\r
79         RANParameterValueType int\r
80         RANParameterValue interface{}\r
81 }\r
82 \r
83 type ControlOutcomeFormat1 struct {\r
84         ControlOutcomeFormat1Item      []ControlOutcomeFormat1ItemType\r
85         ControlOutcomeFormat1ItemCount int\r
86 }\r
87 \r
88 type ControlOutcomeMsg struct {\r
89         ControlOutcomeType  int32\r
90         ControlOutcome      interface{}\r
91 }\r