Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Socket lwip-eth lwip-sys lwip
Fork of mbed-client-classic-example-lwip by
M2MTimer Class Reference
#include <m2mtimer.h>
Public Member Functions | |
| M2MTimer (M2MTimerObserver &observer) | |
| Constructor. | |
| virtual | ~M2MTimer () |
| Destructor. | |
| void | start_timer (uint64_t interval, M2MTimerObserver::Type type, bool single_shot=true) |
| Starts timer. | |
| void | start_dtls_timer (uint64_t intermediate_interval, uint64_t total_interval, M2MTimerObserver::Type type=M2MTimerObserver::Dtls) |
| Starts timer in DTLS manner. | |
| void | stop_timer () |
| Stops timer. | |
| bool | is_intermediate_interval_passed () |
| Checks if the intermediate interval has passed. | |
| bool | is_total_interval_passed () |
| Checks if the total interval has passed. | |
Detailed Description
Timer class for mbed client.
Definition at line 28 of file m2mtimer.h.
Constructor & Destructor Documentation
| M2MTimer | ( | M2MTimerObserver & | observer ) |
Constructor.
Definition at line 21 of file m2mtimer.cpp.
| ~M2MTimer | ( | ) | [virtual] |
Destructor.
Definition at line 27 of file m2mtimer.cpp.
Member Function Documentation
| bool is_intermediate_interval_passed | ( | ) |
Checks if the intermediate interval has passed.
- Returns:
- True if interval has passed, else false.
Definition at line 51 of file m2mtimer.cpp.
| bool is_total_interval_passed | ( | ) |
Checks if the total interval has passed.
- Returns:
- True if interval has passed, else false.
Definition at line 55 of file m2mtimer.cpp.
| void start_dtls_timer | ( | uint64_t | intermediate_interval, |
| uint64_t | total_interval, | ||
| M2MTimerObserver::Type | type = M2MTimerObserver::Dtls |
||
| ) |
Starts timer in DTLS manner.
- Parameters:
-
intermediate_interval Intermediate interval to use, must be smaller than total (usually 1/4 of total). total_interval Total interval to use; This is the timeout value of a DTLS packet. type Type of the timer.
Definition at line 42 of file m2mtimer.cpp.
| void start_timer | ( | uint64_t | interval, |
| M2MTimerObserver::Type | type, | ||
| bool | single_shot = true |
||
| ) |
Starts timer.
- Parameters:
-
interval Timer interval in milliseconds. single_shot Defines whether the timer is ticked once or restarted every time at expiry.
Definition at line 33 of file m2mtimer.cpp.
| void stop_timer | ( | ) |
Generated on Tue Jul 12 2022 13:53:53 by
1.7.2
