63 changes: 63 additions & 0 deletions python/bindings/fixedlen_tagger_python.cc
@@ -0,0 +1,63 @@
/*
* Copyright 2021 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/

/***********************************************************************************/
/* This file is automatically generated using bindtool and can be manually edited */
/* The following lines can be configured to regenerate this file during cmake */
/* If manual edits are made, the following tags should be modified accordingly. */
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(fixedlen_tagger.h) */
/* BINDTOOL_HEADER_FILE_HASH(3a81d52b374eb2892133ad27a61c51d6) */
/***********************************************************************************/

#include <pybind11/complex.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace py = pybind11;

#include <satellites/fixedlen_tagger.h>
// pydoc.h is automatically generated in the build directory
#include <fixedlen_tagger_pydoc.h>

void bind_fixedlen_tagger(py::module& m)
{

using fixedlen_tagger = ::gr::satellites::fixedlen_tagger;


py::class_<fixedlen_tagger, gr::block, gr::basic_block,
std::shared_ptr<fixedlen_tagger>>(m, "fixedlen_tagger", D(fixedlen_tagger))

.def(py::init(&fixedlen_tagger::make),
py::arg("sizeof_stream_item"),
py::arg("syncword_tag"),
py::arg("packetlen_tag"),
py::arg("packet_len"),
D(fixedlen_tagger,make)
)




;




}








2 changes: 2 additions & 0 deletions python/bindings/python_bindings.cc
Expand Up @@ -28,6 +28,7 @@ void bind_decode_rs(py::module& m);
void bind_descrambler308(py::module& m);
void bind_distributed_syncframe_soft(py::module& m);
void bind_encode_rs(py::module& m);
void bind_fixedlen_tagger(py::module& m);
void bind_lilacsat1_demux(py::module& m);
void bind_matrix_deinterleaver_soft(py::module& m);
void bind_nrzi_decode(py::module& m);
Expand Down Expand Up @@ -75,6 +76,7 @@ PYBIND11_MODULE(satellites_python, m)
bind_descrambler308(m);
bind_distributed_syncframe_soft(m);
bind_encode_rs(m);
bind_fixedlen_tagger(m);
bind_lilacsat1_demux(m);
bind_matrix_deinterleaver_soft(m);
bind_nrzi_decode(m);
Expand Down
77 changes: 0 additions & 77 deletions python/fixedlen_tagger.py

This file was deleted.

2 changes: 1 addition & 1 deletion python/hier/sync_to_pdu.py
Expand Up @@ -40,7 +40,7 @@ def __init__(self, packlen=0, sync="00011010110011111111110000011101", threshold
##################################################
# Blocks
##################################################
self.satellites_fixedlen_tagger_0_0_0 = satellites.fixedlen_tagger('syncword', 'packet_len', packlen, numpy.byte)
self.satellites_fixedlen_tagger_0_0_0 = satellites.fixedlen_tagger(gr.sizeof_char, 'syncword', 'packet_len', packlen)
self.digital_correlate_access_code_tag_bb_0_0_0 = digital.correlate_access_code_tag_bb(sync, threshold, 'syncword')
self.blocks_tagged_stream_to_pdu_0_0_0 = blocks.tagged_stream_to_pdu(blocks.byte_t, 'packet_len')

Expand Down
2 changes: 1 addition & 1 deletion python/hier/sync_to_pdu_packed.py
Expand Up @@ -40,7 +40,7 @@ def __init__(self, packlen=0, sync="00011010110011111111110000011101", threshold
##################################################
# Blocks
##################################################
self.satellites_fixedlen_tagger_0_0_0 = satellites.fixedlen_tagger('syncword', 'packet_len', packlen*8, numpy.byte)
self.satellites_fixedlen_tagger_0_0_0 = satellites.fixedlen_tagger(gr.sizeof_char, 'syncword', 'packet_len', packlen*8)
self.digital_correlate_access_code_tag_bb_0_0_0 = digital.correlate_access_code_tag_bb(sync, threshold, 'syncword')
self.blocks_unpacked_to_packed_xx_0 = blocks.unpacked_to_packed_bb(1, gr.GR_MSB_FIRST)
self.blocks_tagged_stream_to_pdu_0_0_0 = blocks.tagged_stream_to_pdu(blocks.byte_t, 'packet_len')
Expand Down
2 changes: 1 addition & 1 deletion python/hier/sync_to_pdu_soft.py
Expand Up @@ -40,7 +40,7 @@ def __init__(self, packlen=0, sync="00011010110011111111110000011101", threshold
##################################################
# Blocks
##################################################
self.satellites_fixedlen_tagger_0_0_0 = satellites.fixedlen_tagger('syncword', 'packet_len', packlen, numpy.float32)
self.satellites_fixedlen_tagger_0_0_0 = satellites.fixedlen_tagger(gr.sizeof_float, 'syncword', 'packet_len', packlen)
self.digital_correlate_access_code_tag_bb_0_0_0 = digital.correlate_access_code_tag_ff(sync, threshold, 'syncword')
self.blocks_tagged_stream_to_pdu_0_0_0 = blocks.tagged_stream_to_pdu(blocks.float_t, 'packet_len')

Expand Down
4 changes: 2 additions & 2 deletions python/qa_fixedlen_tagger.py
Expand Up @@ -37,8 +37,8 @@ def setUp(self):
self.tag2pdu = blocks.tagged_stream_to_pdu(blocks.byte_t,
self.packetlen_tag)
self.debug = blocks.message_debug()
self.tagger = fixedlen_tagger(self.syncword_tag, self.packetlen_tag,
self.packet_len, np.byte)
self.tagger = fixedlen_tagger(gr.sizeof_char, self.syncword_tag, self.packetlen_tag,
self.packet_len)
self.tb = gr.top_block()
self.tb.connect(self.source, self.tagger, self.tag2pdu)
self.tb.msg_connect((self.tag2pdu, 'pdus'), (self.debug, 'store'))
Expand Down