Loading...
Searching...
No Matches
pdu.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2013,2021 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_GR_PDU_H
#define INCLUDED_GR_PDU_H
#include <gnuradio/api.h>
#include <pmt/pmt.h>
namespace gr {
namespace metadata_keys {
GR_RUNTIME_API const pmt::pmt_t pdu_num();
GR_RUNTIME_API const pmt::pmt_t rx_time();
GR_RUNTIME_API const pmt::pmt_t sample_rate();
GR_RUNTIME_API const pmt::pmt_t sys_time();
GR_RUNTIME_API const pmt::pmt_t tx_eob();
GR_RUNTIME_API const pmt::pmt_t tx_time();
GR_RUNTIME_API const pmt::pmt_t tx_sob();
} /* namespace metadata_keys */
namespace msgport_names {
// static const PMT interned string getters for standard port names
GR_RUNTIME_API const pmt::pmt_t bpdu();
GR_RUNTIME_API const pmt::pmt_t conf();
GR_RUNTIME_API const pmt::pmt_t cpdu();
GR_RUNTIME_API const pmt::pmt_t detects();
GR_RUNTIME_API const pmt::pmt_t dict();
GR_RUNTIME_API const pmt::pmt_t fpdu();
GR_RUNTIME_API const pmt::pmt_t msg();
GR_RUNTIME_API const pmt::pmt_t pdu();
GR_RUNTIME_API const pmt::pmt_t pdus();
GR_RUNTIME_API const pmt::pmt_t vec();
} /* namespace msgport_names */
namespace types {
enum vector_type { byte_t, short_t, int_t, float_t, complex_t };
} /* namespace types */
namespace pdu {
// pdu functions
GR_RUNTIME_API size_t itemsize(types::vector_type type);
GR_RUNTIME_API bool type_matches(types::vector_type type, pmt::pmt_t v);
GR_RUNTIME_API pmt::pmt_t
make_pdu_vector(types::vector_type type, const uint8_t* buf, size_t items);
GR_RUNTIME_API types::vector_type type_from_pmt(pmt::pmt_t vector);
} // namespace pdu
} // namespace gr
#endif /* INCLUDED_GR_PDU_H */
api.h
GR_RUNTIME_API
#define GR_RUNTIME_API
Definition gnuradio-runtime/include/gnuradio/api.h:18
gr::metadata_keys
Definition pdu.h:19
gr::metadata_keys::tx_sob
GR_RUNTIME_API const pmt::pmt_t tx_sob()
gr::metadata_keys::tx_eob
GR_RUNTIME_API const pmt::pmt_t tx_eob()
gr::metadata_keys::pdu_num
GR_RUNTIME_API const pmt::pmt_t pdu_num()
gr::metadata_keys::rx_time
GR_RUNTIME_API const pmt::pmt_t rx_time()
gr::metadata_keys::sample_rate
GR_RUNTIME_API const pmt::pmt_t sample_rate()
gr::metadata_keys::sys_time
GR_RUNTIME_API const pmt::pmt_t sys_time()
gr::metadata_keys::tx_time
GR_RUNTIME_API const pmt::pmt_t tx_time()
gr::msgport_names
Definition pdu.h:29
gr::msgport_names::bpdu
GR_RUNTIME_API const pmt::pmt_t bpdu()
gr::msgport_names::msg
GR_RUNTIME_API const pmt::pmt_t msg()
gr::msgport_names::pdu
GR_RUNTIME_API const pmt::pmt_t pdu()
gr::msgport_names::fpdu
GR_RUNTIME_API const pmt::pmt_t fpdu()
gr::msgport_names::pdus
GR_RUNTIME_API const pmt::pmt_t pdus()
gr::msgport_names::dict
GR_RUNTIME_API const pmt::pmt_t dict()
gr::msgport_names::conf
GR_RUNTIME_API const pmt::pmt_t conf()
gr::msgport_names::detects
GR_RUNTIME_API const pmt::pmt_t detects()
gr::msgport_names::cpdu
GR_RUNTIME_API const pmt::pmt_t cpdu()
gr::msgport_names::vec
GR_RUNTIME_API const pmt::pmt_t vec()
gr::pdu
Definition pdu.h:47
gr::pdu::make_pdu_vector
GR_RUNTIME_API pmt::pmt_t make_pdu_vector(types::vector_type type, const uint8_t *buf, size_t items)
gr::pdu::type_matches
GR_RUNTIME_API bool type_matches(types::vector_type type, pmt::pmt_t v)
gr::pdu::type_from_pmt
GR_RUNTIME_API types::vector_type type_from_pmt(pmt::pmt_t vector)
gr::pdu::itemsize
GR_RUNTIME_API size_t itemsize(types::vector_type type)
gr::types
Definition pdu.h:43
gr::types::vector_type
vector_type
Definition pdu.h:44
gr::types::complex_t
@ complex_t
Definition pdu.h:44
gr::types::byte_t
@ byte_t
Definition pdu.h:44
gr::types::int_t
@ int_t
Definition pdu.h:44
gr::types::float_t
@ float_t
Definition pdu.h:44
gr::types::short_t
@ short_t
Definition pdu.h:44
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
pmt::pmt_t
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition pmt.h:83
pmt.h
v
Definition cc_common.h:35