GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
add_system_time.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2021 NTESS LLC.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  */
9 
10 #ifndef INCLUDED_PDU_ADD_SYSTEM_TIME_H
11 #define INCLUDED_PDU_ADD_SYSTEM_TIME_H
12 
13 #include <gnuradio/block.h>
14 #include <gnuradio/pdu/api.h>
15 
16 namespace gr {
17 namespace pdu {
18 
19 /*!
20  * \brief Adds system time to a PDU's metadata
21  * \ingroup debug_tools_blk
22  * \ingroup pdu_blk
23  *
24  * Adds a user specified key to PDU dict containing the system time in seconds
25  * since unix epoch.
26  */
27 class PDU_API add_system_time : virtual public gr::block
28 {
29 public:
30  typedef std::shared_ptr<add_system_time> sptr;
31 
32  /*!
33  * \brief Return a shared_ptr to a new instance of pdu::add_system_time.
34  *
35  * @param key - key to use for system time metadata field
36  */
37  static sptr make(const pmt::pmt_t key);
38 };
39 
40 } // namespace pdu
41 } // namespace gr
42 
43 #endif /* INCLUDED_PDU_ADD_SYSTEM_TIME_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Adds system time to a PDU's metadata.
Definition: add_system_time.h:28
std::shared_ptr< add_system_time > sptr
Definition: add_system_time.h:30
static sptr make(const pmt::pmt_t key)
Return a shared_ptr to a new instance of pdu::add_system_time.
#define PDU_API
Definition: gr-pdu/include/gnuradio/pdu/api.h:18
GR_RUNTIME_API const pmt::pmt_t pdu()
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:83