-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release of yasmine C++ finite state machine 0.3.0, September 2016
- Loading branch information
Showing
262 changed files
with
2,872 additions
and
2,346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// // | ||
// This file is part of the Seadex yasmine ecosystem (http://yasmine.seadex.de). // | ||
// Copyright (C) 2016 Seadex GmbH // | ||
// // | ||
// Licensing information is available in the folder "license" which is part of this distribution. // | ||
// The same information is available on the www @ http://yasmine.seadex.de/License.html. // | ||
// // | ||
////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
#ifndef DETECTOR_5EBE86D2_647F_4029_94D8_B5521F641349 | ||
#define DETECTOR_5EBE86D2_647F_4029_94D8_B5521F641349 | ||
|
||
|
||
#include <memory> | ||
#include <mutex> | ||
#include <thread> | ||
#include <condition_variable> | ||
|
||
|
||
namespace sxy | ||
{ | ||
|
||
|
||
class detector_callback; | ||
|
||
|
||
class detector final | ||
{ | ||
public: | ||
explicit detector( detector_callback& _detector_callback ); | ||
~detector(); | ||
detector( const detector& ) = delete; | ||
detector& operator=( const detector& ) = delete; | ||
void start(); | ||
void stop(); | ||
bool is_on(); | ||
|
||
|
||
private: | ||
void generate_detector_events(); | ||
|
||
|
||
detector_callback& detector_callback_; | ||
bool is_on_; | ||
std::unique_ptr< std::thread > generate_random_detector_events_; | ||
bool run_; | ||
std::mutex mutex_; | ||
std::condition_variable condition_variable_; | ||
}; | ||
|
||
|
||
} | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// // | ||
// This file is part of the Seadex yasmine ecosystem (http://yasmine.seadex.de). // | ||
// Copyright (C) 2016 Seadex GmbH // | ||
// // | ||
// Licensing information is available in the folder "license" which is part of this distribution. // | ||
// The same information is available on the www @ http://yasmine.seadex.de/License.html. // | ||
// // | ||
////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
#ifndef DETECTOR_CALLBACK_0AF0AB58_4818_48B8_A10D_3894B6652355 | ||
#define DETECTOR_CALLBACK_0AF0AB58_4818_48B8_A10D_3894B6652355 | ||
|
||
|
||
namespace sxy | ||
{ | ||
|
||
|
||
class detector_callback | ||
{ | ||
public: | ||
detector_callback() = default; | ||
virtual ~detector_callback() = default; | ||
detector_callback( const detector_callback& ) = delete; | ||
detector_callback& operator=( const detector_callback& ) = delete; | ||
virtual void detector_on() = 0; | ||
virtual void detector_off() = 0; | ||
}; | ||
|
||
|
||
} | ||
|
||
|
||
#endif |
Oops, something went wrong.