|
| bool | add (PinWatch pinWatch) |
| | Add an pinWatch to the list More...
|
| |
| bool | add (PinWatch *ptrPinWatch) |
| | Adds a T object in the end of the LinkedList; Increment _size; More...
|
| |
| bool | update (int index, PinWatch pinWatch) |
| | Updates an existing PinWatch More...
|
| |
| bool | addOrUpdate (PinWatch pinWatch) |
| | Adds or Updates PinWatch If a PinWatch with a specific GPin number already exists in the list the values of the existing PinWatch are updated. If a PinWatch with a specific GPin number does NOT exist in the list a new PinWatch is added to the list. More...
|
| |
| bool | addTimer (unsigned long minLogInterval) |
| | Adds a timer with a specific interval. Timer will get the pin number -1. So when deleting or updating timer use the pin number -1. More...
|
| |
| bool | addPinValueMonitoring (GPin *gPin, int pinValueMargin, int sampleTotalCount, unsigned long sampleInterval) |
| | Adds and a pinWatch that monitors the value of the pin and checks if it changes same or more than is specified in the pinValueMargin parameter More...
|
| |
| bool | addPinValueMonitoringAndTimer (GPin *gPin, int pinValueMargin, int sampleTotalCount, unsigned long sampleInterval, unsigned long minLogInterval) |
| | Adds and a pinWatch that monitors the value of the pin and checks if it changes same or more than is specified in the pinValueMargin parameter More...
|
| |
| bool | exists (int pinNumber) |
| | Checks if a pinWatch with pinNumber exists in the list More...
|
| |
| int | indexOfPin (int pinNumber) |
| | Searches for the index of pinWatch with a given pin number in the list. More...
|
| |
| bool | isEmpty () |
| | Is the list empty? More...
|
| |
| bool | removePin (int pinNumber) |
| | Removes a PinWatch for a pin with a specific number from the list. More...
|
| |
| bool | isAnyPinWatchDo () |
| | Checks if the value of of any pin in the list has changed enough. Checks also if any PinWatch for a pin has reached minimum time beetween checks. The function stops checking after the first PinWatch is do. More...
|
| |
| int | getFirstPinWatchDo () |
| | Checks if the value of of any pin in the list has changed enough. Checks also if any PinWatch for a pin has reached minimum time beetween checks. The function stops checking after the first PinWatch is do and returns the index of that pin. More...
|
| |
| int | getNextPinWatchDo (int index) |
| | Checks if the value of of any pin in the list has changed enough. Checks also if any PinWatch for a pin has reached minimum time beetween checks. The function stops checking after the first PinWatch is do and returns the index of that pin. More...
|
| |
| void | resetAllChecks () |
| | Resets all checks by updateing timers and resetting sampleSum and sampleCounts More...
|
| |
| int | updateMonitorFromJsonObject (JsonData *root, GPins *devicePins) |
| | Updates the list with item values from Json More...
|
| |
| int | deleteMonitorFromJsonObject (JsonData *root) |
| | Deletes list items provided by from Json array More...
|
| |
| String | toJson () |
| | Exports all pinWatch values of the list to A Json array string. More...
|
| |
| | ~PinWatchList () |
| | The deconstructor, which cleans up when the list is no longer needed. More...
|
| |
| | LinkedList () |
| | The list constructor More...
|
| |
| virtual int | size () |
| | Returns current size of LinkedList More...
|
| |
| virtual bool | add (int index, PinWatch *) |
| | Adds a T object in the specified index; Unlinkand link the LinkedList correcly; Increment _size More...
|
| |
| virtual bool | unshift (PinWatch *) |
| | Adds a T object in the start of the LinkedList; Increment _size; More...
|
| |
| virtual bool | set (int index, PinWatch *) |
| | Set the object at index, with T; Increment _size; More...
|
| |
| virtual PinWatch * | remove (int index) |
| | Remove object at index; If index is not reachable, returns false; else, decrement _size More...
|
| |
| virtual PinWatch * | pop () |
| | Remove last object; More...
|
| |
| virtual PinWatch * | shift () |
| | Remove first object; More...
|
| |
| virtual PinWatch * | get (int index) |
| | Get the index'th element on the list; Return Element if accessible, else, return false; More...
|
| |
| virtual void | clear () |
| | Clear the entire array That is remove all objects from the list and delete them from memory More...
|
| |
PinWatchList allows you to add one or more timers and/or monitor value changes on multiple pins
Example:
1 PinWatchList watchList;
3 watchList.addPinValueMonitoring(devicePins.get(D0), 1, 1, 1000);
4 watchList.addPinValueMonitoringAndTimer(devicePins.get(D1), 2, 2, 1000, 1000 * 60 * 3);
5 watchList.addTimer(1000 * 30 * 9);
9 if (watchList.isAnyPinWatchDo()) {
10 // One item did trigger so you could log
11 watchList.resetAllChecks();