2 #include "hpda/processor/processor_base.h"
3 #include "ypc/core_t/analyzer/ntpackage_item_parser.h"
4 #include "ypc/corecommon/nt_cols.h"
6 #include <ff/util/ntobject.h>
12 template <
typename BytesType,
typename NTObj>
14 ::ff::util::ntobject<typename nt<BytesType>::data>, NTObj> {
16 typedef ::ff::util::ntobject<typename nt<BytesType>::data>
20 : hpda::processor::internal::processor_base<data_source_output_t, NTObj>(
23 typedef ::hpda::processor::internal::processor_base<data_source_output_t,
26 virtual bool process() {
27 if (!base::has_input_value()) {
31 using ntt = nt<BytesType>;
32 const BytesType &data =
33 base::input_value().template get<typename ntt::data>();
36 m_data = ntpackage_item_parser<typename BytesType::byte_t, NTObj>::parser(
37 data.data(), data.size());
38 }
catch (
const std::exception &e) {
39 LOG(ERROR) <<
"failed to convert to type";
42 base::consume_input_value();
46 virtual NTObj output_value() {
return m_data; }