Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADIOS2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Podhorszki, Norbert
ADIOS2
Commits
9d7bd89e
Commit
9d7bd89e
authored
8 years ago
by
Wang, Ruonan
Browse files
Options
Downloads
Patches
Plain Diff
changed DataMan engine to send arbitrary parameters to DataMan library
parent
31a553c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!8
Integrate groupless
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/engine/dataman/DataManReader.cpp
+19
-22
19 additions, 22 deletions
src/engine/dataman/DataManReader.cpp
src/engine/dataman/DataManWriter.cpp
+19
-23
19 additions, 23 deletions
src/engine/dataman/DataManWriter.cpp
with
38 additions
and
45 deletions
src/engine/dataman/DataManReader.cpp
+
19
−
22
View file @
9d7bd89e
...
...
@@ -143,30 +143,27 @@ void DataManReader::Init( )
}
};
std
::
string
method_type
,
method
,
local_ip
,
remote_ip
;
//no need to initialize to empty (it's default)
int
local_port
=
0
,
remote_port
=
0
,
num_channels
=
0
;
lf_AssignString
(
"method_type"
,
method_type
);
if
(
method_type
==
"stream"
)
auto
is_number
=
[]
(
const
std
::
string
&
s
)
{
lf_AssignString
(
"method"
,
method
);
lf_AssignString
(
"local_ip"
,
local_ip
);
lf_AssignString
(
"remote_ip"
,
remote_ip
);
lf_AssignInt
(
"local_port"
,
local_port
);
lf_AssignInt
(
"remote_port"
,
remote_port
);
lf_AssignInt
(
"num_channels"
,
num_channels
);
json
jmsg
;
jmsg
[
"method"
]
=
method
;
jmsg
[
"local_ip"
]
=
local_ip
;
jmsg
[
"remote_ip"
]
=
remote_ip
;
jmsg
[
"local_port"
]
=
local_port
;
jmsg
[
"remote_port"
]
=
remote_port
;
jmsg
[
"num_channels"
]
=
num_channels
;
jmsg
[
"stream_mode"
]
=
"receiver"
;
m_Man
.
add_stream
(
jmsg
);
return
!
s
.
empty
()
&&
std
::
find_if
(
s
.
begin
(),
s
.
end
(),
[](
char
c
)
{
return
!
std
::
isdigit
(
c
);
})
==
s
.
end
();
};
json
jmsg
;
for
(
auto
&
i
:
m_Method
.
m_Parameters
){
if
(
is_number
(
i
.
second
)
){
jmsg
[
i
.
first
]
=
std
::
stoi
(
i
.
second
);
}
else
{
jmsg
[
i
.
first
]
=
i
.
second
;
}
}
jmsg
[
"stream_mode"
]
=
"receiver"
;
m_Man
.
add_stream
(
jmsg
);
std
::
string
method_type
;
int
num_channels
=
0
;
lf_AssignString
(
"method_type"
,
method_type
);
lf_AssignInt
(
"num_channels"
,
num_channels
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/engine/dataman/DataManWriter.cpp
+
19
−
23
View file @
9d7bd89e
...
...
@@ -198,37 +198,33 @@ void DataManWriter::Init( )
}
};
std
::
string
method_type
,
method
,
local_ip
,
remote_ip
;
//no need to initialize to empty (it's default)
int
local_port
=
0
,
remote_port
=
0
,
num_channels
=
0
;
lf_AssignString
(
"method_type"
,
method_type
);
if
(
method_type
==
"stream"
)
auto
is_number
=
[]
(
const
std
::
string
&
s
)
{
lf_AssignString
(
"method"
,
method
);
lf_AssignString
(
"local_ip"
,
local_ip
);
lf_AssignString
(
"remote_ip"
,
remote_ip
);
lf_AssignInt
(
"local_port"
,
local_port
);
lf_AssignInt
(
"remote_port"
,
remote_port
);
lf_AssignInt
(
"num_channels"
,
num_channels
);
json
jmsg
;
jmsg
[
"method"
]
=
method
;
jmsg
[
"local_ip"
]
=
local_ip
;
jmsg
[
"remote_ip"
]
=
remote_ip
;
jmsg
[
"local_port"
]
=
local_port
;
jmsg
[
"remote_port"
]
=
remote_port
;
jmsg
[
"num_channels"
]
=
num_channels
;
jmsg
[
"stream_mode"
]
=
"sender"
;
m_Man
.
add_stream
(
jmsg
);
return
!
s
.
empty
()
&&
std
::
find_if
(
s
.
begin
(),
s
.
end
(),
[](
char
c
)
{
return
!
std
::
isdigit
(
c
);
})
==
s
.
end
();
};
json
jmsg
;
for
(
auto
&
i
:
m_Method
.
m_Parameters
){
if
(
is_number
(
i
.
second
)
){
jmsg
[
i
.
first
]
=
std
::
stoi
(
i
.
second
);
}
else
{
jmsg
[
i
.
first
]
=
i
.
second
;
}
}
jmsg
[
"stream_mode"
]
=
"sender"
;
m_Man
.
add_stream
(
jmsg
);
std
::
string
method_type
;
int
num_channels
=
0
;
lf_AssignString
(
"method_type"
,
method_type
);
lf_AssignInt
(
"num_channels"
,
num_channels
);
}
else
{
InitCapsules
(
);
InitTransports
(
);
}
}
void
DataManWriter
::
InitCapsules
(
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment