GNU Radio's IEEE802 Package
ruc_connection.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2013 Christoph Leitner <c.leitner@student.uibk.ac.at>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef INCLUDED_RUC_CONNECTION_H
19#define INCLUDED_RUC_CONNECTION_H
20
21#include "rime_connection.h"
22#include "stubborn_sender.h"
23#include <array>
24
25namespace gr{
26 namespace ieee802_15_4{
28 private:
29 static const int header_length = 7;
30 static const int seqno_bits = 2;
31 int d_send_seqno;
32 int d_recv_seqno;
33 stubborn_sender d_stubborn_sender;
34 gr::thread::mutex d_mutex;
35 public:
36 static std::array<uint8_t, 256> make_msgbuf(uint16_t channel, bool ack, int seqno,
37 const uint8_t src[2], const uint8_t dest[2]);
38 ruc_connection(rime_stack *block, uint16_t channel,
39 pmt::pmt_t inport, pmt::pmt_t outport,
40 const uint8_t rime_add_mine[2]);
41 void pack(pmt::pmt_t msg);
42 void unpack(pmt::pmt_t msg);
45 };
46 }
47}
48#endif
#define IEEE802_15_4_API
Definition api.h:25
Definition rime_connection.h:26
Definition rime_stack.h:28
Definition ruc_connection.h:27
void unpack(pmt::pmt_t msg)
static std::array< uint8_t, 256 > make_msgbuf(uint16_t channel, bool ack, int seqno, const uint8_t src[2], const uint8_t dest[2])
ruc_connection(rime_stack *block, uint16_t channel, pmt::pmt_t inport, pmt::pmt_t outport, const uint8_t rime_add_mine[2])
Definition stubborn_sender.h:28
Definition access_code_prefixer.h:23