Skip to content

Commit

Permalink
Stub finder class. Will take over finder message duties
Browse files Browse the repository at this point in the history
  • Loading branch information
maniacbug committed Dec 21, 2011
1 parent 9a321c3 commit 6416d82
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/unit_rx/Finder.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
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 <Finder.h>

/****************************************************************************/

// vim:cin:ai:sts=2 sw=2 ft=cpp
30 changes: 30 additions & 0 deletions tests/unit_rx/Finder.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
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
17 changes: 17 additions & 0 deletions tests/unit_rx/README
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 6416d82

Please sign in to comment.