#include <kisslib.h>
KissHandle::KissHandle |
( |
string |
dest_call = "" , |
|
|
string |
sour_call = "" , |
|
|
uint8_t |
port = 0 , |
|
|
uint8_t |
comm = 0 , |
|
|
uint8_t |
dest_stat = 0x60 , |
|
|
uint8_t |
sour_stat = 0x61 , |
|
|
uint8_t |
cont = 0x03 , |
|
|
uint8_t |
prot = 0xf0 |
|
) |
| |
static string port
Definition: add_radio.cpp:16
void set_command(uint8_t C)
Definition: kisslib.cpp:57
void set_source_callsign(string source)
Definition: kisslib.cpp:106
void set_source_stationID(uint8_t ID)
Definition: kisslib.cpp:132
void set_port_number(uint8_t P)
Definition: kisslib.cpp:46
void set_protocolID(uint8_t protocol)
Definition: kisslib.cpp:154
void set_destination_callsign(string destination)
Definition: kisslib.cpp:69
void set_control(uint8_t control_number)
Definition: kisslib.cpp:143
void set_destination_stationID(uint8_t ID)
Definition: kisslib.cpp:95
void KissHandle::set_port_number |
( |
uint8_t |
P | ) |
|
packet_header header
Definition: kisslib.h:99
uint8_t KissHandle::get_port_number |
( |
| ) |
|
packet_header header
Definition: kisslib.h:99
void KissHandle::set_command |
( |
uint8_t |
C | ) |
|
packet_header header
Definition: kisslib.h:99
uint8_t KissHandle::get_command |
( |
| ) |
|
packet_header header
Definition: kisslib.h:99
void KissHandle::set_destination_callsign |
( |
string |
destination | ) |
|
71 for (uint16_t
i=0;
i<6; ++
i)
75 header.destination_callsign[
i] = 0x20 << 1;
int i
Definition: rw_test.cpp:37
static string destination
Definition: ax25_recv.cpp:43
packet_header header
Definition: kisslib.h:99
string KissHandle::get_destination_callsign |
( |
| ) |
|
88 for (uint8_t byte :
header.destination_callsign)
90 callsign.push_back(byte >> 1);
packet_header header
Definition: kisslib.h:99
void KissHandle::set_destination_stationID |
( |
uint8_t |
ID | ) |
|
97 header.destination_stationID = ID;
packet_header header
Definition: kisslib.h:99
uint8_t KissHandle::get_destination_stationID |
( |
| ) |
|
103 return header.destination_stationID;
packet_header header
Definition: kisslib.h:99
void KissHandle::set_source_callsign |
( |
string |
source | ) |
|
108 for (uint16_t
i=0;
i<6; ++
i)
112 header.source_callsign[
i] = 0x20 << 1;
int i
Definition: rw_test.cpp:37
packet_header header
Definition: kisslib.h:99
static string source
Definition: ax25_recv.cpp:42
std::string KissHandle::get_source_callsign |
( |
| ) |
|
125 for (uint8_t byte :
header.source_callsign)
127 callsign.push_back(byte >> 1);
packet_header header
Definition: kisslib.h:99
void KissHandle::set_source_stationID |
( |
uint8_t |
ID | ) |
|
134 header.source_stationID = ID;
packet_header header
Definition: kisslib.h:99
uint8_t KissHandle::get_source_stationID |
( |
| ) |
|
140 return header.source_stationID;
packet_header header
Definition: kisslib.h:99
void KissHandle::set_control |
( |
uint8_t |
control_number | ) |
|
145 header.control = control_number;
packet_header header
Definition: kisslib.h:99
uint8_t KissHandle::get_control |
( |
| ) |
|
packet_header header
Definition: kisslib.h:99
void KissHandle::set_protocolID |
( |
uint8_t |
protocol | ) |
|
156 header.protocolID = protocol;
packet_header header
Definition: kisslib.h:99
uint8_t KissHandle::get_protocolID |
( |
| ) |
|
packet_header header
Definition: kisslib.h:99
int32_t KissHandle::set_data |
( |
vector< uint8_t > |
input | ) |
|
vector< uint8_t > data
Definition: kisslib.h:100
vector< uint8_t > KissHandle::get_data |
( |
| ) |
|
vector< uint8_t > data
Definition: kisslib.h:100
int32_t KissHandle::load_packet |
( |
| ) |
|
283 int32_t tsize = 17 +
data.size();
int32_t slip_encode(uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize)
Encode data in to SLIP packet.
Definition: sliplib.cpp:212
packet_header header
Definition: kisslib.h:99
vector< uint8_t > data
Definition: kisslib.h:100
vector< uint8_t > raw_packet
Definition: kisslib.h:101
vector< uint8_t > slip_packet
Definition: kisslib.h:102
int32_t KissHandle::unload_packet |
( |
| ) |
|
packet_header header
Definition: kisslib.h:99
int32_t slip_decode(uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize)
Decode SLIP packet.
Definition: sliplib.cpp:109
vector< uint8_t > data
Definition: kisslib.h:100
vector< uint8_t > raw_packet
Definition: kisslib.h:101
vector< uint8_t > slip_packet
Definition: kisslib.h:102
int32_t KissHandle::set_raw_packet |
( |
vector< uint8_t > |
packet | ) |
|
vector< uint8_t > raw_packet
Definition: kisslib.h:101
int32_t KissHandle::set_slip_packet |
( |
vector< uint8_t > |
packet | ) |
|
vector< uint8_t > slip_packet
Definition: kisslib.h:102
vector< uint8_t > KissHandle::get_raw_packet |
( |
| ) |
|
vector< uint8_t > raw_packet
Definition: kisslib.h:101
vector< uint8_t > KissHandle::get_slip_packet |
( |
| ) |
|
vector< uint8_t > slip_packet
Definition: kisslib.h:102
int32_t KissHandle::get_error |
( |
| ) |
|
int32_t error
Definition: kisslib.h:103
struct KissHandle::__attribute__ |
( |
(packed) |
| ) |
|
|
inline |
83 unsigned port_number : 4;
84 uint8_t destination_callsign[6];
85 uint8_t destination_stationID;
86 uint8_t source_callsign[6];
87 uint8_t source_stationID;
88 uint8_t control = 0x03;
89 uint8_t protocolID = 0xf0;
string command
Definition: add_radio.cpp:27
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
KissHandle & |
K |
|
) |
| |
|
friend |
166 out<<
"port_number= "<< K.
header.port_number<<std::endl;
167 out<<
"command="<< K.
header.command<<std::endl;
168 out<<
"destination callsign=<"<< K.
header.destination_callsign<<
">"<<std::endl;
169 out<<
"destination station ID="<< K.
header.destination_stationID<<std::endl;
170 out<<
"source callsign=<"<< K.
header.source_callsign<<
">"<<std::endl;
171 out<<
"source station ID="<< K.
header.source_stationID<<std::endl;
172 out<<
"control="<< K.
header.control<<std::endl;
173 out<<
"protocol ID="<< K.
header.protocolID<<std::endl;
packet_header header
Definition: kisslib.h:99
packet_header KissHandle::header |
|
private |
vector<uint8_t> KissHandle::data |
|
private |
vector<uint8_t> KissHandle::raw_packet |
|
private |
vector<uint8_t> KissHandle::slip_packet |
|
private |
int32_t KissHandle::error |
|
private |
The documentation for this class was generated from the following files: