// Copyright (C) by Josh Blum. See LICENSE.txt for licensing information. #ifndef INCLUDED_LIBGRAS_IMPL_BLOCK_DATA_HPP #define INCLUDED_LIBGRAS_IMPL_BLOCK_DATA_HPP #include #include #include #include #include #include #include #include #include #include #include namespace gras { enum BlockState { BLOCK_STATE_INIT, BLOCK_STATE_LIVE, BLOCK_STATE_DONE, }; struct BlockData { //block pointer to call into parent Block *block; //per port properties std::vector input_configs; std::vector output_configs; //work buffers for the new work interface Block::InputItems input_items; Block::OutputItems output_items; //track the subscriber counts std::vector input_tokens; std::vector output_tokens; BitSet inputs_done; BitSet outputs_done; std::set token_pool; boost::system_time first_input_done_time; //buffer queues and ready conditions InputBufferQueues input_queues; OutputBufferQueues output_queues; BitSet inputs_available; std::vector time_input_not_ready; std::vector time_output_not_ready; //tag and msg tracking std::vector input_tags_changed; std::vector > input_tags; std::vector num_input_msgs_read; std::vector num_input_items_read; std::vector num_output_items_read; std::vector total_items_consumed; std::vector total_items_produced; std::vector > input_msgs; //interruptible thread stuff SharedThreadGroup thread_group; boost::shared_ptr interruptible_thread; //is the fg running? BlockState block_state; GlobalBlockConfig global_config; std::vector > output_allocation_hints; BlockStats stats; }; } //namespace gras #endif /*INCLUDED_LIBGRAS_IMPL_BLOCK_DATA_HPP*/