58 tcount = static_cast <
size_t>(atol(argv[2]));
61 if (
device.find(
':') != string::npos)
64 device_port = static_cast <uint16_t>(stoi(
device.substr(
device.find(
':')+1)));
72 shandle =
new Serial(device_addr, 19200);
77 printf(
"Usage: kiss_recv [device [tcount]]\n");
83 for (
size_t i=0;
i<tcount; ++
i)
86 vector <uint8_t> packet;
Definition: jsondef.h:647
Agent socket using Unicast UDP.
uint8_t get_port_number()
Definition: kisslib.cpp:52
PORT_TYPE
Definition: jsondef.h:644
static uint16_t device_port
Definition: ax25_recv.cpp:41
int i
Definition: rw_test.cpp:37
int32_t socket_recvfrom(socket_channel &channel, string &buffer, size_t maxlen, int flags)
Definition: socketlib.cpp:710
Definition: serialclass.h:43
int iretn
Definition: rw_test.cpp:37
ElapsedTime et
Definition: agent_cpu_device_test.cpp:51
uint8_t get_source_stationID()
Definition: kisslib.cpp:138
static string device_addr
Definition: ax25_recv.cpp:40
uint8_t get_command()
Definition: kisslib.cpp:63
string cosmos_error_string(int32_t cosmos_errno)
Definition: cosmos-errno.cpp:45
string to_hex_string(vector< uint8_t > buffer, bool ascii)
Definition: stringlib.cpp:204
int32_t unload_packet()
Definition: kisslib.cpp:292
int32_t set_slip_packet(vector< uint8_t > packet)
Definition: kisslib.cpp:270
Definition: socketlib.h:115
static KissHandle handle
Definition: kiss_recv.cpp:38
string get_destination_callsign()
Definition: kisslib.cpp:85
Definition: elapsedtime.h:62
int32_t set_timeout(int, double timeout)
Definition: serialclass.cpp:515
string get_source_callsign()
Definition: kisslib.cpp:122
#define SOCKET_LISTEN
Listen followed by optional talk (recvfrom INADDRANY)
Definition: socketlib.h:84
uint8_t get_protocolID()
Definition: kisslib.cpp:160
static Serial * shandle
Definition: kiss_send.cpp:35
Definition: jsondef.h:645
uint8_t get_destination_stationID()
Definition: kisslib.cpp:101
vector< uint8_t > get_data()
Definition: kisslib.cpp:276
int32_t socket_open(socket_channel *channel, NetworkType ntype, const char *address, uint16_t port, uint16_t role, bool blocking, uint32_t usectimeo, uint32_t rcvbuf, uint32_t sndbuf)
Open UDP socket.
Definition: socketlib.cpp:51
static string device
Definition: kiss_recv.cpp:39
uint8_t get_control()
Definition: kisslib.cpp:149
int32_t get_slip(vector< uint8_t > &data, size_t size=SIZE_MAX)
Read SLIP frame.
Definition: serialclass.cpp:1322