From 6416d82009ad160297a8b1c7aae862a9056a94fe Mon Sep 17 00:00:00 2001 From: maniacbug Date: Wed, 21 Dec 2011 10:40:26 -0800 Subject: [PATCH] Stub finder class. Will take over finder message duties --- tests/unit_rx/Finder.cpp | 19 +++++++++++++++++++ tests/unit_rx/Finder.h | 30 ++++++++++++++++++++++++++++++ tests/unit_rx/README | 17 +++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 tests/unit_rx/Finder.cpp create mode 100644 tests/unit_rx/Finder.h diff --git a/tests/unit_rx/Finder.cpp b/tests/unit_rx/Finder.cpp new file mode 100644 index 00000000..834c4f85 --- /dev/null +++ b/tests/unit_rx/Finder.cpp @@ -0,0 +1,19 @@ +/* + Copyright (C) 2011 J. Coliz + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + */ + +// STL headers +// C headers +// Framework headers +// Library headers +// Project headers +// This component's header +#include + +/****************************************************************************/ + +// vim:cin:ai:sts=2 sw=2 ft=cpp diff --git a/tests/unit_rx/Finder.h b/tests/unit_rx/Finder.h new file mode 100644 index 00000000..1088e17c --- /dev/null +++ b/tests/unit_rx/Finder.h @@ -0,0 +1,30 @@ +/* + Copyright (C) 2011 J. Coliz + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + */ + +#ifndef __FINDER_H__ +#define __FINDER_H__ + +// STL headers +// C headers +// Framework headers +// Library headers +// Project headers + +/** + * Example for how classes should be declared + */ + +class Finder +{ +private: +protected: +public: +}; + +#endif // __FINDER_H__ +// vim:cin:ai:sts=2 sw=2 ft=cpp diff --git a/tests/unit_rx/README b/tests/unit_rx/README index b20096f0..fc253993 100644 --- a/tests/unit_rx/README +++ b/tests/unit_rx/README @@ -1,2 +1,19 @@ This is the 'receiver' for the unit tests. Run it on a node which is NOT under test. + +TODO + +Send finder request needs a re-think. It needs to be re-implemented as a Tictocs::Timer, so it +doesn't block the loop(). + +I could also make Tictocs objects which monitor the RF24network and pull off messages that are just +for them. Likewise, the network can raise a signal when there is a new message. Although I would not +want to put that into the library for fear of adding a dependency. + +so the finder needs to maintain state +- Waiting: Waiting for a finder request +- Sending: In the midst of looping through children + +Needs to have some delay between each send. So the finder has a timer component. + +Also... Reset should also reset the internal copy of the sync data. Sync may need a 'reset' method.