| 460 | } |
| 461 | |
| 462 | std::string Emotibit::create_header (const std::string &type_tag, uint32_t timestamp, |
| 463 | uint16_t package_number, uint16_t data_length, uint8_t protocol_version, |
| 464 | uint8_t data_reliability) |
| 465 | { |
| 466 | std::string header = ""; |
| 467 | header += std::to_string (timestamp); |
| 468 | header += PAYLOAD_DELIMITER; |
| 469 | header += std::to_string (package_number); |
| 470 | header += PAYLOAD_DELIMITER; |
| 471 | header += std::to_string (data_length); |
| 472 | header += PAYLOAD_DELIMITER; |
| 473 | header += type_tag; |
| 474 | header += PAYLOAD_DELIMITER; |
| 475 | header += std::to_string ((int)protocol_version); |
| 476 | header += PAYLOAD_DELIMITER; |
| 477 | header += std::to_string ((int)data_reliability); |
| 478 | return header; |
| 479 | } |
| 480 | |
| 481 | std::vector<std::string> Emotibit::split_string (const std::string &package, char delim) |
| 482 | { |
nothing calls this directly
no outgoing calls
no test coverage detected