Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Achou.Wang
4Gsim
提交
91102f9d
4
4Gsim
项目概览
Achou.Wang
/
4Gsim
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
4
4Gsim
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
91102f9d
编写于
8月 20, 2012
作者:
C
calin cerchez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
working on parser
上级
30c52e88
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
58 addition
and
31 deletion
+58
-31
examples/diameter/results/General-0.vci
examples/diameter/results/General-0.vci
+1
-1
src/linklayer/lte/rrc/RRC.h
src/linklayer/lte/rrc/RRC.h
+1
-3
src/linklayer/lte/rrc/message/RRCClassDefinitions.cc
src/linklayer/lte/rrc/message/RRCClassDefinitions.cc
+1
-1
src/linklayer/lte/rrc/message/RRCClassDefinitions.h
src/linklayer/lte/rrc/message/RRCClassDefinitions.h
+2
-1
src/linklayer/lte/rrc/message/RRCConstantDefinitions.cc
src/linklayer/lte/rrc/message/RRCConstantDefinitions.cc
+3
-0
src/linklayer/lte/rrc/message/RRCConstantDefinitions.h
src/linklayer/lte/rrc/message/RRCConstantDefinitions.h
+4
-0
src/linklayer/lte/rrc/message/RRCInformationElements.cc
src/linklayer/lte/rrc/message/RRCInformationElements.cc
+1
-1
src/linklayer/lte/rrc/message/RRCInformationElements.h
src/linklayer/lte/rrc/message/RRCInformationElements.h
+1
-1
src/linklayer/lte/rrc/message/RRCPDUDefinitions.cc
src/linklayer/lte/rrc/message/RRCPDUDefinitions.cc
+1
-1
src/linklayer/lte/rrc/message/RRCPDUDefinitions.h
src/linklayer/lte/rrc/message/RRCPDUDefinitions.h
+3
-2
src/linklayer/lte/rrc/message/test.asn.bk
src/linklayer/lte/rrc/message/test.asn.bk
+0
-0
src/util/asn/parser/asnparser.py
src/util/asn/parser/asnparser.py
+40
-20
未找到文件。
examples/diameter/results/General-0.vci
浏览文件 @
91102f9d
file 13724 134
1907082
file 13724 134
2196896
version 2
run General-0-20120709-16:16:37-6492
attr configname General
...
...
src/linklayer/lte/rrc/RRC.h
浏览文件 @
91102f9d
...
...
@@ -19,9 +19,7 @@
#define RRC_H_
#include <omnetpp.h>
#include "RRCPDUDefinitions.h"
using
namespace
RRC
;
//#include "RRCPDUDefinitions.h"
class
RRC
:
public
cSimpleModule
{
public:
...
...
src/linklayer/lte/rrc/message/RRCClassDefinitions.cc
浏览文件 @
91102f9d
...
...
@@ -17,7 +17,7 @@
#include "RRCClassDefinitions.h"
namespace
RRC
{
namespace
rrcNamespace
{
const
void
*
DLDCCHMessageType
::
choicesInfo
[
32
]
=
{
&
ActiveSetUpdate
::
theInfo
,
...
...
src/linklayer/lte/rrc/message/RRCClassDefinitions.h
浏览文件 @
91102f9d
...
...
@@ -22,7 +22,7 @@
#include "RRCPDUDefinitions.h"
#include "RRCInformationElements.h"
namespace
RRC
{
namespace
rrcNamespace
{
typedef
Null
DLDCCHMessageTypeSpare3
;
...
...
@@ -252,4 +252,5 @@ public:
};
}
#endif
/* RRCCLASSDEFINITIONS_H_ */
src/linklayer/lte/rrc/message/RRCConstantDefinitions.cc
浏览文件 @
91102f9d
...
...
@@ -17,3 +17,6 @@
#include "RRCConstantDefinitions.h"
namespace
rrcNamespace
{
}
src/linklayer/lte/rrc/message/RRCConstantDefinitions.h
浏览文件 @
91102f9d
...
...
@@ -20,6 +20,8 @@
#include "ASNTypes.h"
namespace
rrcNamespace
{
#define hiPDSCHidentities 64
#define hiPUSCHidentities 64
...
...
@@ -326,4 +328,6 @@
#define maxURNTI_Group 8
}
#endif
/* RRCCONSTANTDEFINITIONS_H_ */
src/linklayer/lte/rrc/message/RRCInformationElements.cc
浏览文件 @
91102f9d
...
...
@@ -17,7 +17,7 @@
#include "RRCInformationElements.h"
namespace
RRC
{
namespace
rrcNamespace
{
const void *CNDomainInformation::itemsInfo[2] = {
&CNDomainIdentity::theInfo,
src/linklayer/lte/rrc/message/RRCInformationElements.h
浏览文件 @
91102f9d
...
...
@@ -21,7 +21,7 @@
#include "ASNTypes.h"
#include "RRCConstantDefinitions.h"
namespace
RRC
{
namespace
rrcNamespace
{
typedef BitString<CONSTRAINED, 14, 14> Ansi41IDNNS;
...
...
src/linklayer/lte/rrc/message/RRCPDUDefinitions.cc
浏览文件 @
91102f9d
...
...
@@ -17,7 +17,7 @@
#include "RRCPDUDefinitions.h"
namespace
RRC
{
namespace
rrcNamespace
{
const void *ActiveSetUpdater3IEs::itemsInfo[12] = {
&RRCTransactionIdentifier::theInfo,
src/linklayer/lte/rrc/message/RRCPDUDefinitions.h
浏览文件 @
91102f9d
...
...
@@ -22,7 +22,7 @@
#include "RRCInformationElements.h"
#include "RRCConstantDefinitions.h"
namespace
RRC
{
namespace
rrcNamespace
{
class ActiveSetUpdater3IEs : Sequence {
private:
...
...
@@ -14595,5 +14595,6 @@ public:
SystemInformationContainer(): Sequence(&theInfo) {}
};
#endif /* RRCPDUDEFINITIONS_H_ */
}
#endif /* RRCPDUDEFINITIONS_H_ */
src/linklayer/lte/rrc/message/test.asn
→
src/linklayer/lte/rrc/message/test.asn
.bk
浏览文件 @
91102f9d
文件已移动
src/util/asn/parser/asnparser.py
浏览文件 @
91102f9d
import
re
from
optparse
import
OptionParser
import
os
openbracket
=
'{'
closedbracket
=
'}'
...
...
@@ -49,6 +50,8 @@ constrainttypes = ['Integer',
'OctetString'
,
'OctetStringBase'
]
module
=
"RRC"
#directory = "/root/Desktop/omnetpp-4.2.2/samples/4Gsim/src/linklayer/lte/rrc/message/"
directory
=
"D:
\\
omnetpp-4.2.2
\\
samples
\\
4Gsim
\\
src
\\
linklayer
\\
lte
\\
rrc
\\
message
\\
"
outfilename
=
''
includes
=
list
()
imports
=
list
()
...
...
@@ -345,7 +348,7 @@ def writeobject(asnobj, hdrfile, srcfile):
if
asnobj
.
type
in
constrainttypes
:
if
asnobj
.
constrainttype
==
"CONSTANT"
:
hdrfile
.
write
(
"#define "
+
asnobj
.
name
+
" "
+
str
(
asnobj
.
value
)
+
"
\n
"
)
if
asnobj
.
constrainttype
==
"UNCONSTRAINED"
:
el
if
asnobj
.
constrainttype
==
"UNCONSTRAINED"
:
hdrfile
.
write
(
"typedef "
+
asnobj
.
type
+
" "
+
asnobj
.
name
+
";
\n
"
)
else
:
hdrfile
.
write
(
"typedef "
+
asnobj
.
type
+
"<"
+
asnobj
.
constrainttype
)
...
...
@@ -469,27 +472,16 @@ def writeheader(file):
"//
\n
"
+
"// You should have received a copy of the GNU Lesser General Public License
\n
"
+
"// along with this program. If not, see http://www.gnu.org/licenses/.
\n
"
+
"//
\n\n
"
)
"//
\n\n
"
)
def
main
():
usage
=
"usage: %prog [options] input filename"
parser
=
OptionParser
(
usage
)
parser
.
add_option
(
"-o"
,
"--output"
,
dest
=
"filename"
,
help
=
"name of output file"
,
metavar
=
"FILENAME"
)
(
options
,
args
)
=
parser
.
parse_args
()
#directory = "/root/Desktop/omnetpp-4.2.2/samples/4Gsim/src/linklayer/lte/rrc/message/"
directory
=
"D:
\\
omnetpp-4.2.2
\\
samples
\\
4Gsim
\\
src
\\
linklayer
\\
lte
\\
rrc
\\
message
\\
"
filename
=
"InformationElements"
file
=
open
(
directory
+
filename
+
".asn"
,
"r"
)
def
parsefile
(
filename
):
file
=
open
(
directory
+
filename
,
"r"
)
lines
=
file
.
readlines
()
file
.
close
()
objectstring
=
""
print
(
"parsing file..."
)
print
(
"parsing file
"
+
filename
+
"
..."
)
for
i
,
line
in
enumerate
(
lines
):
if
assign
in
line
:
if
len
(
objectstring
)
>
0
:
...
...
@@ -500,8 +492,12 @@ def main():
asnobjs
.
append
(
parsestring
(
objectstring
))
#printobjects(asnobjs)
print
(
"writing source files..."
)
def
writefile
(
filename
):
global
asnobjs
global
includes
global
imports
print
(
"writing source files for "
+
filename
+
"..."
)
hdrfile
=
open
(
directory
+
outfilename
+
".h"
,
'w'
)
srcfile
=
open
(
directory
+
outfilename
+
".cc"
,
'w'
)
writeheader
(
hdrfile
)
...
...
@@ -516,8 +512,8 @@ def main():
srcfile
.
write
(
"#include
\"
"
+
outfilename
+
".h
\"\n\n
"
)
srcfile
.
write
(
"namespace "
+
module
+
"
{
\n\n
"
)
hdrfile
.
write
(
"namespace "
+
module
+
"
{
\n\n
"
)
srcfile
.
write
(
"namespace "
+
module
.
lower
()
+
"Namespace
{
\n\n
"
)
hdrfile
.
write
(
"namespace "
+
module
.
lower
()
+
"Namespace
{
\n\n
"
)
for
i
in
range
(
0
,
len
(
asnobjs
)):
asnobj
=
asnobjs
[
i
]
...
...
@@ -530,6 +526,30 @@ def main():
srcfile
.
close
()
hdrfile
.
close
()
includes
=
list
()
imports
=
list
()
asnobjs
=
list
()
def
main
():
os
.
chdir
(
directory
)
for
filename
in
os
.
listdir
(
"."
):
if
filename
.
endswith
(
".asn"
):
parsefile
(
filename
)
writefile
(
filename
)
## usage = "usage: %prog [options] input filename"
## parser = OptionParser(usage)
## parser.add_option("-o", "--output", dest="filename",
## help="name of output file", metavar="FILENAME")
##
## (options, args) = parser.parse_args()
##
##
## #printobjects(asnobjs)
if
__name__
==
"__main__"
:
main
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录