From f90f6872ed452fd5c46c28b54a11b6d9502477dd Mon Sep 17 00:00:00 2001
From: Sebastian Hahta <joseha@utu.fi>
Date: Fri, 30 Aug 2019 11:18:24 +0300
Subject: [PATCH] documentation

---
 components/rgbd-sources/include/ftl/rgbd/frame.hpp | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/components/rgbd-sources/include/ftl/rgbd/frame.hpp b/components/rgbd-sources/include/ftl/rgbd/frame.hpp
index 15428e665..fa87424ad 100644
--- a/components/rgbd-sources/include/ftl/rgbd/frame.hpp
+++ b/components/rgbd-sources/include/ftl/rgbd/frame.hpp
@@ -9,32 +9,33 @@ namespace rgbd {
 
 class Frame {
 public:
-	/* @todo	REMOVE HARDCODED CHANNEL COUNT!
+	/* @todo	TODO: REMOVE HARDCODED CHANNEL COUNT!
 	 */
 	Frame() : channels_host_(11), channels_gpu_(11), available_(11, 0) {}
 
-	/* @brief	Reset all channels without releasing memory
+	/* @brief	Reset all channels without releasing memory.
 	 */
 	void reset()
 	{
 		std::fill(available_.begin(), available_.end(), 0);
 	}
 
-	/* @brief	Is there valid data in channel. Must be checked if user
-	 *			is not providing the data and it is uncertain that valid data is
-	 * 			available.
+	/* @brief	Is there valid data in channel (either host or gpu).
 	 */
 	bool hasChannel(const ftl::rgbd::channel_t& channel)
 	{
 		return available_[_channelIdx(channel)];
 	}
 
-	/* @brief	Get reference to the channel.
+	/* @brief	Get reference to the channel data.
 	 * @param	Channel type
 	 * @param	Output parameter
 	 * @param	User of the method sets data. NOTE: Only works on unused
 	 * 			channels or if reset() was called previously (TODO).
 	 * @returns	True, if output parameter contains valid data
+	 * 
+	 * Methods automatically copy between host/gpu if the data is only available
+	 * in the other. Results are cached.
 	 */
 
 	bool getChannel(const ftl::rgbd::channel_t& channel, cv::Mat& out, bool set=false)
-- 
GitLab