RisingEdgeDetector Class
(Automation::RisingEdgeDetector)Helper class to detect rising edge of any changing value in C++ code More...
Header: | #include <RisingEdgeDetector> |
Public Functions
RisingEdgeDetector(T initialValue) | |
bool | detect(T newValue, T threshold) |
Detailed Description
Helper class to detect rising edge of any changing value in C++ code
Constructor
RisingEdgeDetector::RisingEdgeDetector(T initialValue)
- Parameter initialValue specifies the start value to start detecting edges from
Methods
bool RisingEdgeDetector::detect(T newValue, T threshold)
- detects if the newValue represents a rising 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 rising 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.