#include "pic_packet.h"
Go to the source code of this file.
Functions | |
void | pkt_calc_check_byte (rf_packet *packet) |
uns8 | pkt_check_check_byte (rf_packet *packet) |
void | pkt_init (uns16 my_addr) |
uns8 | pkt_load_rx (rf_packet *pkt_in) |
uns8 | pkt_print_packet (rf_packet *my_packet) |
void | pkt_process_tx_queue () |
uns8 | pkt_queue_packet (rf_packet *packet, uns8 resend) |
uns8 | pkt_seen (uns16 pkt_id, uns16 source_addr) |
uns8 | pkt_send (uns16 dest_addr, uns8 *payload, uns8 resend) |
Variables | |
uns16 | pkt_my_addr = 0x66 |
uns16 | pkt_my_next_pkt_id = 0 |
static seen_packet | pkt_seen_list [PKT_SEEN_LIST_SIZE] |
uns8 | pkt_seen_list_last = 0 |
static sending_item | pkt_tx_queue [PKT_TX_QUEUE_SIZE] |
void pkt_calc_check_byte | ( | rf_packet * | packet | ) |
Definition at line 310 of file pic_packet.c.
References _rf_packet::a, _rf_packet_det::check_byte, _rf_packet::d, PKT_PACKET_SIZE, and uns8.
Referenced by pkt_load_rx(), and pkt_send().
uns8 pkt_check_check_byte | ( | rf_packet * | packet | ) |
Definition at line 321 of file pic_packet.c.
References _rf_packet::a, _rf_packet_det::check_byte, _rf_packet::d, PKT_PACKET_SIZE, and uns8.
Referenced by pkt_load_rx().
void pkt_init | ( | uns16 | my_addr | ) |
Definition at line 263 of file pic_packet.c.
References _sending_item::flag, PKT_FLAG_DELETED, pkt_my_addr, _seen_packet::source_addr, uns16, and uns8.
uns8 pkt_load_rx | ( | rf_packet * | pkt_in | ) |
Definition at line 38 of file pic_packet.c.
References _sending_item::flag, pkt_calc_check_byte(), pkt_check_check_byte(), PKT_FLAG_DELETED, PKT_FLAG_NO_RESEND, _seen_packet::pkt_id, pkt_my_addr, PKT_PACKET_SIZE, pkt_print_packet(), pkt_process_payload(), pkt_queue_packet(), pkt_seen(), pkt_seen_list_last, pkt_send(), PKT_STATUS_CHECK_FAIL, PKT_STATUS_DIRECT_SEND, PKT_STATUS_I_AM_SENDER, PKT_STATUS_NEED_TO_REBROADCAST, PKT_STATUS_PKT_IS_ACK_FOR_ME, PKT_STATUS_PKT_IS_FACK_FOR_ME, PKT_STATUS_PKT_IS_FOR_ME, PKT_STATUS_PREVIOUS_ROUTED_VIA_ME, PKT_STATUS_ROUTING_FULL, PKT_STATUS_SEEN_BEFORE, serial_print_str(), _seen_packet::source_addr, uns16, and uns8.
uns8 pkt_print_packet | ( | rf_packet * | my_packet | ) |
Definition at line 338 of file pic_packet.c.
References _rf_packet::d, _rf_packet_det::dest_addr, _rf_packet_det::payload, _rf_packet_det::pkt_id, _rf_packet_det::r1_addr, _rf_packet_det::r2_addr, _rf_packet_det::r3_addr, serial_print_int(), serial_print_str(), serial_putc(), and _rf_packet_det::source_addr.
Referenced by pkt_load_rx(), pkt_process_tx_queue(), pkt_send(), and pkt_send_packet().
void pkt_process_tx_queue | ( | ) |
Definition at line 208 of file pic_packet.c.
References _rf_packet::d, _sending_item::flag, _sending_item::packet, PKT_FLAG_DELETED, PKT_FLAG_NO_RESEND, pkt_print_packet(), pkt_send_packet(), _rf_packet_det::r1_addr, _sending_item::sent_count, serial_print_int(), serial_print_str(), tick_calc_diff(), tick_get_count(), _sending_item::tick_sent, uns16, and uns8.
uns8 pkt_queue_packet | ( | rf_packet * | packet, | |
uns8 | resend | |||
) |
Definition at line 168 of file pic_packet.c.
References _sending_item::flag, PKT_FLAG_DELETED, PKT_PACKET_SIZE, PKT_STATUS_QUEUED, PKT_STATUS_TX_QUEUE_FULL, _sending_item::sent_count, serial_print_int(), serial_print_str(), and uns8.
Referenced by pkt_load_rx(), and pkt_send().
uns8 pkt_seen | ( | uns16 | pkt_id, | |
uns16 | source_addr | |||
) |
Definition at line 23 of file pic_packet.c.
References uns8.
Referenced by pkt_load_rx().
uns8 pkt_send | ( | uns16 | dest_addr, | |
uns8 * | payload, | |||
uns8 | resend | |||
) |
Definition at line 280 of file pic_packet.c.
References _rf_packet::d, _rf_packet_det::dest_addr, _rf_packet_det::payload, pkt_calc_check_byte(), _rf_packet_det::pkt_id, pkt_my_addr, pkt_my_next_pkt_id, pkt_print_packet(), pkt_queue_packet(), _rf_packet_det::r1_addr, _rf_packet_det::r2_addr, _rf_packet_det::r3_addr, serial_print_str(), _rf_packet_det::source_addr, and uns8.
Referenced by pkt_load_rx().
uns16 pkt_my_addr = 0x66 |
Definition at line 19 of file pic_packet.c.
Referenced by pkt_init(), pkt_load_rx(), and pkt_send().
uns16 pkt_my_next_pkt_id = 0 |
seen_packet pkt_seen_list[PKT_SEEN_LIST_SIZE] [static] |
Definition at line 15 of file pic_packet.c.
uns8 pkt_seen_list_last = 0 |
sending_item pkt_tx_queue[PKT_TX_QUEUE_SIZE] [static] |
Definition at line 16 of file pic_packet.c.