8b4f52daa89bdfbc932dfea37ab613dbeb8d9cb5
[o-du/l2.git] / src / 5gnrmac / rg_id.c
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18
19 /************************************************************************
20  
21      Name:     LTE-MAC layer
22   
23      Type:     C source file
24   
25      Desc:     C source code to provide software part number, version and
26                revision. 
27   
28      File:     rg_id.c 
29   
30 **********************************************************************/
31
32 /** @file rg_id.c
33 @brief This file contains the definition of this software's part number, 
34        version and revision. Also provides an API to access the same.
35 */
36
37 /* header include files (.h) */
38 #include "envopt.h"           /* environment options */  
39 #include "envdep.h"           /* environment dependent */
40 #include "envind.h"           /* environment independent */
41 #include "gen.h"              /* general layer */
42 #include "ssi.h"              /* system services */
43 #include "lrg.h"              /* layer manager */
44    
45 /* header/extern include files (.x) */
46 #include "gen.x"              /* general layer */
47 #include "ssi.x"              /* system services */
48 #include "cm_lib.x"           /* common library */
49
50
51 #ifdef __cplusplus
52 extern "C" {
53 #endif /* __cplusplus */
54 EXTERN Void rgGetSId ARGS((SystemId *s));
55 #ifdef __cplusplus
56 }
57 #endif /* __cplusplus */
58
59 /* defines */
60 #define RGSWMV 3             /* LTE MAC- main version */
61 #define RGSWMR 1             /* LTE MAC - main revision */
62 #define RGSWBV 0             /* LTE MAC - branch version */
63 /* Updated the branch revision Number */
64 #define RGSWBR 2             /* LTE MAC - branch revision */
65 #define RGSWPN "1000372"     /* LTE MAC - part number */
66
67 /* system id */
68 PRIVATE CONSTANT SystemId sId ={
69    RGSWMV,              /* LTE MAC - main version */
70    RGSWMR,              /* LTE MAC - main revision */
71    RGSWBV,              /* LTE MAC - branch version */
72    RGSWBR,              /* LTE MAC - branch revision */
73    (Txt *)RGSWPN               /* LTE MAC - part number */
74 };
75
76 \f
77 /**
78  * @brief Retrieve system id. 
79  *
80  * @details
81  *
82  *     Function : rgGetSId 
83  *    
84  *     Get system id consisting of part number, main version and
85  *     revision and branch version and branch.
86  *     
87  *     
88  *  @param[out] SystemId *s  
89  *  @return  void
90  **/
91 /*
92 *
93 *       Fun:   get system id
94 *
95 *       Desc:  Get system id consisting of part number, main version and
96 *              revision and branch version and branch.
97 *
98 *       Ret:   TRUE      - ok
99 *
100 *       Notes: None
101 *
102 *       File:  rg_id.c
103 *
104 */
105  
106 #ifdef ANSI
107 PUBLIC Void rgGetSId
108 (
109 SystemId *s                 /* system id */
110 )
111 #else
112 PUBLIC Void rgGetSId(s)
113 SystemId *s;                /* system id */
114 #endif
115 {
116    TRC2(rgGetSId);
117
118    s->mVer = sId.mVer;
119    s->mRev = sId.mRev;
120    s->bVer = sId.bVer;
121    s->bRev = sId.bRev;
122    cmMemcpy((U8 *)s->ptNmb, (U8 *)sId.ptNmb, LRG_MAX_PT_NUM_SIZE); 
123
124    /* Stack Crash Problem for TRACE5 Changes. Added the return below */
125   RETVOID; 
126   
127 } /* end of rgGetSid */
128
129
130 \f
131 /**********************************************************************
132  
133          End of file
134 **********************************************************************/