[ Jira id - ODUHIGH-593 ] Pack and unpack function nomenclature correction
[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 "common_def.h"
39 #include "lrg.h"              /* layer manager */
40    
41 /* header/extern include files (.x) */
42 #include "cm_lib.x"           /* common library */
43
44
45 #ifdef __cplusplus
46 extern "C" {
47 #endif /* __cplusplus */
48 Void rgGetSId ARGS((SystemId *s));
49 #ifdef __cplusplus
50 }
51 #endif /* __cplusplus */
52
53 /* defines */
54 #define RGSWMV 3             /* LTE MAC- main version */
55 #define RGSWMR 1             /* LTE MAC - main revision */
56 #define RGSWBV 0             /* LTE MAC - branch version */
57 /* Updated the branch revision Number */
58 #define RGSWBR 2             /* LTE MAC - branch revision */
59 #define RGSWPN "1000372"     /* LTE MAC - part number */
60
61 /* system id */
62 static const SystemId sId ={
63    RGSWMV,              /* LTE MAC - main version */
64    RGSWMR,              /* LTE MAC - main revision */
65    RGSWBV,              /* LTE MAC - branch version */
66    RGSWBR,              /* LTE MAC - branch revision */
67    (Txt *)RGSWPN               /* LTE MAC - part number */
68 };
69
70 \f
71 /**
72  * @brief Retrieve system id. 
73  *
74  * @details
75  *
76  *     Function : rgGetSId 
77  *    
78  *     Get system id consisting of part number, main version and
79  *     revision and branch version and branch.
80  *     
81  *     
82  *  @param[out] SystemId *s  
83  *  @return  void
84  **/
85 /*
86 *
87 *       Fun:   get system id
88 *
89 *       Desc:  Get system id consisting of part number, main version and
90 *              revision and branch version and branch.
91 *
92 *       Ret:   TRUE      - ok
93 *
94 *       Notes: None
95 *
96 *       File:  rg_id.c
97 *
98 */
99  
100 Void rgGetSId
101 (
102 SystemId *s                 /* system id */
103 )
104 {
105    s->mVer = sId.mVer;
106    s->mRev = sId.mRev;
107    s->bVer = sId.bVer;
108    s->bRev = sId.bRev;
109    memcpy(s->ptNmb, sId.ptNmb, LRG_MAX_PT_NUM_SIZE); 
110
111    /* Stack Crash Problem for TRACE5 Changes. Added the return below */
112   return; 
113   
114 } /* end of rgGetSid */
115
116
117 \f
118 /**********************************************************************
119  
120          End of file
121 **********************************************************************/