RCKit
Main Page
Classes
Files
Examples
File List
File Members
SetterDebug.h
1
// SetterDebug.h
2
//
3
// Class for testing and debugging Setter and subclasses
4
/// \author Mike McCauley (mikem@airspayce.com)
5
///
6
// Copyright (C) 2010 Mike McCauley
7
// $Id: SetterDebug.h,v 1.4 2012/08/25 06:18:13 mikem Exp $
8
9
#ifndef SetterDebug_h
10
#define SetterDebug_h
11
12
#include "Setter.h"
13
#if ARDUINO >= 100
14
#include <Arduino.h>
15
#else
16
#include <wiring.h>
17
#endif
18
19
/////////////////////////////////////////////////////////////////////
20
/// \class SetterDebug SetterDebug.h <SetterDebug.h>
21
/// \brief Class for testing Setters.
22
/// Used by the sample TestSuite sketch.
23
///
24
class
SetterDebug
:
public
Setter
25
{
26
public
:
27
/// Input the value to be inverted
28
/// \param[in] value The input value
29
virtual
void
input
(
int
value);
30
31
/// Return the last value that
32
/// was set here
33
int
lastValue
();
34
35
/// Called when the source of input data is lost,
36
/// and the Setter is required to fail in a safe way
37
virtual
void
failsafe
();
38
39
/// Returns whether there has been a
40
/// failsafe event
41
boolean
failed
();
42
43
protected
:
44
45
private
:
46
int
_lastValue;
47
boolean
_failed;
48
};
49
50
#endif
Generated by
1.8.1