Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
click_for_comnet2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jiachen,Chen
click_for_comnet2
Commits
719e9000
Commit
719e9000
authored
Apr 30, 2019
by
Jiachen,Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified TestArgs
parent
a28ad72f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
TestArgs.cc
TestArgs.cc
+5
-0
TestArgs.click
TestArgs.click
+1
-1
No files found.
TestArgs.cc
View file @
719e9000
...
...
@@ -44,6 +44,7 @@ int TestArgs::configure(Vector<String>& conf, ErrorHandler* errh) {
IPAddress
ip_addr
;
EtherAddress
src_ether_addr
,
dst_ether_addr
;
Element
*
tmp_elem_p
;
Timestamp
interval
;
if
(
Args
(
conf
,
this
,
errh
)
.
read_mp
(
"INT_VAL"
,
int_val
)
...
...
@@ -51,6 +52,7 @@ int TestArgs::configure(Vector<String>& conf, ErrorHandler* errh) {
.
read_mp
(
"IP_ADDR"
,
ip_addr
)
.
read_p
(
"SRC_ETH"
,
src_ether_addr
)
.
read_p
(
"DST_ETH"
,
dst_ether_addr
)
.
read_p
(
"INTERVAL"
,
interval
)
.
read_p
(
"ELEM"
,
ElementArg
(),
tmp_elem_p
)
.
complete
()
<
0
)
{
return
-
1
;
...
...
@@ -71,6 +73,9 @@ int TestArgs::configure(Vector<String>& conf, ErrorHandler* errh) {
printf
(
"DST_ETH=%s, "
,
dst_ether_addr
.
unparse
().
c_str
());
printf
(
"DST_ETH buf="
);
print_buf
(
dst_ether_addr
.
data
(),
6
);
// this is already big-endian
printf
(
"interval=%s, double_val=%f
\n
"
,
interval
.
unparse
().
c_str
(),
interval
.
doubleval
());
if
(
tmp_elem_p
!=
nullptr
)
{
printf
(
"elem->name: %s
\n
"
,
tmp_elem_p
->
class_name
());
...
...
TestArgs.click
View file @
719e9000
...
...
@@ -2,7 +2,7 @@ require(package "click_for_comnet");
elem::TestArgsElemParam;
test :: TestArgs(1, "string!", 192.168.1.1, SRC_ETH 01:02:03:04:05:06, DST_ETH 16:15:14:13:12:11, ELEM elem);
test :: TestArgs(1, "string!", 192.168.1.1, SRC_ETH 01:02:03:04:05:06, DST_ETH 16:15:14:13:12:11, ELEM elem
, INTERVAL 100ms
);
TimedSource(INTERVAL 1, DATA "test", LIMIT 1, STOP true)
-> test;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment