MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / create_header

Method create_header

src/board_controller/emotibit/emotibit.cpp:462–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462std::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
481std::vector<std::string> Emotibit::split_string (const std::string &package, char delim)
482{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected