150 size_t base =
message.size() + 6;
152 if (static_cast <size_t>(iretn) < base)
158 if (static_cast <size_t>(iretn) == base)
164 if (buffer[base] != 0xfe || buffer[base+1] != 0xfe || buffer[base+2] != 0xe0 || buffer[base+3] != handle.
address || buffer[static_cast <size_t>(iretn)-1] != 0xfd)
170 if (buffer[base+4] == 0xfa)
176 if (buffer[base+4] == 0xfb)
185 handle.
response.resize(static_cast <size_t>(iretn)-(base+1));
186 memcpy(static_cast<void *>(handle.
response.data()), &buffer[base], static_cast <size_t>(iretn)-(base+1));
188 return iretn - static_cast <int32_t>((base+1));
vector< uint8_t > response
Definition: ic9100_lib.h:72
int32_t put_data(vector< uint8_t > data)
Definition: serialclass.cpp:707
int iretn
Definition: rw_test.cpp:37
std::mutex mut
Definition: ic9100_lib.h:71
int32_t put_char(uint8_t c)
Definition: serialclass.cpp:609
static char buffer[255]
Definition: propagator_simple.cpp:60
uint8_t message[300]
Definition: kpc9612p_send.cpp:36
#define IC9100_ERROR_NG
Definition: cosmos-errno.h:184
Serial * serial
Definition: ic9100_lib.h:70
string command
Definition: add_radio.cpp:27
uint8_t address
Definition: ic9100_lib.h:68
int32_t ic9100_write_header(ic9100_handle &handle)
Definition: ic9100_lib.cpp:60
int32_t get_data(vector< uint8_t > &data, size_t size=SIZE_MAX)
Definition: serialclass.cpp:1202
#define IC9100_ERROR_ADDR
Definition: cosmos-errno.h:186
#define IC9100_ERROR_WRITE
Definition: cosmos-errno.h:183