Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
PhoenixSocket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab has been updated. More info
here
and
there
.
Show more breadcrumbs
CTA-LAPP
PHOENIX_LIBS2
PhoenixSocket
Commits
e13c525e
Commit
e13c525e
authored
2 months ago
by
Pierre Aubert
Browse files
Options
Downloads
Plain Diff
Merge branch 'add_mock_message_builder' into 'master'
Add mock message builder See merge request
!2
parents
c27c9238
a5a217c3
No related branches found
No related tags found
1 merge request
!2
Add mock message builder
Pipeline
#381692
passed
2 months ago
Stage: BuildTestinstall
Stage: DocCoverage
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/phoenix_mock_socket.h
+16
-0
16 additions, 0 deletions
src/phoenix_mock_socket.h
with
16 additions
and
0 deletions
src/phoenix_mock_socket.h
+
16
−
0
View file @
e13c525e
...
@@ -14,6 +14,22 @@
...
@@ -14,6 +14,22 @@
///Vector of messages
///Vector of messages
typedef
std
::
vector
<
std
::
vector
<
char
>
>
PVecMockMessage
;
typedef
std
::
vector
<
std
::
vector
<
char
>
>
PVecMockMessage
;
///Add Data in a sequence of mock messages
/** @param[out] vecOutput : vector of messages (sequence of message)
* @param data : data to be added into the message
* @return true if the message has been added successfully to the vecOutput, false otherwise
*/
template
<
typename
T
>
bool
phoenix_addMockMessage
(
PVecMockMessage
&
vecOutput
,
const
T
&
data
){
std
::
vector
<
char
>
vecData
(
data_size
(
data
));
char
*
iter
=
(
char
*
)
vecData
.
data
();
if
(
data_message_save
(
iter
,
data
)){
vecOutput
.
push_back
(
vecData
);
return
true
;
}
return
false
;
}
bool
phoenix_createMockSocket
(
PVecMockMessage
&
vecInput
,
std
::
string
&
inputFileName
,
std
::
string
&
outputFileName
,
const
std
::
string
&
address
,
size_t
port
);
bool
phoenix_createMockSocket
(
PVecMockMessage
&
vecInput
,
std
::
string
&
inputFileName
,
std
::
string
&
outputFileName
,
const
std
::
string
&
address
,
size_t
port
);
...
...
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