FallingEdgeDetector Class
(Automation::FallingEdgeDetector)Helper class to detect falling edge of any changing value in C++ code More...
Header: | #include <FallingEdgeDetector> |
Public Functions
FallingEdgeDetector(T initialValue) | |
bool | detect(T newValue, T threshold) |
Detailed Description
Helper class to detect falling edge of any changing value in C++ code
Constructor
FallingEdgeDetector::FallingEdgeDetector(T initialValue)
- Parameter initialValue specifies the start value to start detecting edges from
Methods
bool FallingEdgeDetector::detect(T newValue, T threshold)
- detects if the newValue represents a falling edge of the value and stores the newValue as last known value for possible next detect. Parameter threshold specifies the threshold (absolute, positive) value that will be considered as the minimum change for the edge to be detected. For boolean values the threshold has no meaning.
- Returns true if there was a falling edge compared with last known value.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.