27 #include "gsdf_msgs/CommPacket.h" 28 #include "gsdf_msgs/JoinSwarm.h" 29 #include "micros_swarm/message.h" 31 #define MAX_PACKET_LEN 1024 32 #define NUM_PACKET 1000000 38 std::cout<<
"length: "<<s.length()<<
", data: ";
39 for(
int i = 0; i < s.length(); i++) {
47 std::cout<<
"length: "<<len<<
", data: ";
48 for(
int i = 0; i < len; i++) {
49 std::cout<<(int)(*(s+i));
56 std::cout<<
"length: "<<vec.size()<<
", data: ";
57 for(
int i = 0; i < vec.size(); i++) {
58 std::cout<<(int)(vec[i]);
69 std::string test =
"";
72 gsdf_msgs::JoinSwarm js;
77 unsigned int bufsize = msg_data.size();
78 std::cout<<bufsize<<std::endl;
79 packet.
data.replace(bufsize, bufsize, (
char*)(&msg_data[0]),
false);
void dump_char_seq(char *s, int len)
void dump_char_vec(std::vector< uint8_t > vec)
std::vector< uint8_t > serialize_ros(T t)
void publish(const GSDFPacket &packet)
void dump_string(const std::string &s)
void checkHandle(void *handle, const char *info)