ttcn3_drb_interface: use uint8_t and len as tx interface

master
Andre Puschmann 5 years ago
parent 7f47edf67f
commit bf6ddbe976

@ -50,12 +50,11 @@ public:
return port_listen(); return port_listen();
} }
void tx(std::string out) void tx(const uint8_t* buffer, uint32_t len)
{ {
if (initialized) { if (initialized) {
log->info_hex( log->info_hex(buffer, len, "Sending %d B to Titan\n", len);
reinterpret_cast<const uint8_t*>(out.c_str()), out.length(), "Sending %ld B to Titan\n", out.length()); send(buffer, len);
send(reinterpret_cast<const uint8_t*>(out.c_str()), out.length());
} else { } else {
log->error("Trying to transmit but port not connected.\n"); log->error("Trying to transmit but port not connected.\n");
} }

@ -1045,7 +1045,7 @@ void ttcn3_syssim::write_pdu(uint32_t lcid, unique_byte_buffer_t pdu)
} else { } else {
std::string out = ttcn3_helpers::get_drb_common_ind_for_pdu(tti, lcid, cells[pcell_idx]->name, std::move(pdu)); std::string out = ttcn3_helpers::get_drb_common_ind_for_pdu(tti, lcid, cells[pcell_idx]->name, std::move(pdu));
log->error("DRB send:\n%s", out.c_str()); log->error("DRB send:\n%s", out.c_str());
drb.tx(out); drb.tx(reinterpret_cast<const uint8_t*>(out.c_str()), out.length());
} }
} }

Loading…
Cancel
Save