Skip to content
Snippets Groups Projects
Commit e13c525e authored by Pierre Aubert's avatar Pierre Aubert
Browse files

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!2Add mock message builder
Pipeline #381692 passed
...@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment