/*
   HARK Library
   Copyright (C) 2021 Honda Research Institute Japan Inc.
 */

#include "hark-lib/node/SubscribeData.h"

namespace hark
{
namespace node
{
    SubscribeData::SubscribeData():
        NodeDef("SubscribeData")
    {
        *this
            << Terminal::in("INPUT");
    }

    void
    SubscribeData::reset()
    {
    }

    bool
    SubscribeData::operator () (size_t count, InputDataBundle &input, OutputDataBundle &output)
    {
//        {
//            std::stringstream ss;
//            ss << "SubscribeData: count=" << count << ", data=" << input["INPUT"].last() << std::endl;
//            std::cout << ss.str();
//        }
        this->receive(input["INPUT"].last());
        return true;
    }
}
}

/* end of file */
