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: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo 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 the timer. | |
| void | start_dtls_timer (uint64_t intermediate_interval, uint64_t total_interval, M2MTimerObserver::Type type=M2MTimerObserver::Dtls) |
| Starts the timer in DTLS manner. | |
| void | stop_timer () |
| Stops the 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 40 of file test/mbedclient/utest/stub/m2mtimer_stub.cpp.
| ~M2MTimer | ( | ) | [virtual] |
Destructor.
Definition at line 45 of file test/mbedclient/utest/stub/m2mtimer_stub.cpp.
Member Function Documentation
| bool is_intermediate_interval_passed | ( | ) |
Checks if the intermediate interval has passed.
- Returns:
- True if the interval has passed, else false.
Definition at line 64 of file test/mbedclient/utest/stub/m2mtimer_stub.cpp.
| bool is_total_interval_passed | ( | ) |
Checks if the total interval has passed.
- Returns:
- True if the interval has passed, else false.
Definition at line 68 of file test/mbedclient/utest/stub/m2mtimer_stub.cpp.
| void start_dtls_timer | ( | uint64_t | intermediate_interval, |
| uint64_t | total_interval, | ||
| M2MTimerObserver::Type | type = M2MTimerObserver::Dtls |
||
| ) |
Starts the timer in DTLS manner.
- Parameters:
-
intermediate_interval The intermediate interval to use, must be smaller than total (usually 1/4 of total). total_interval The total interval to use; This is the timeout value of a DTLS packet. type The type of the timer.
Definition at line 55 of file test/mbedclient/utest/stub/m2mtimer_stub.cpp.
| void start_timer | ( | uint64_t | interval, |
| M2MTimerObserver::Type | type, | ||
| bool | single_shot = true |
||
| ) |
Starts the timer.
- Parameters:
-
interval The timer interval in milliseconds. single_shot Defines whether the timer is ticked once or restarted every time at expiry.
Definition at line 49 of file test/mbedclient/utest/stub/m2mtimer_stub.cpp.
| void stop_timer | ( | ) |
Stops the timer.
This cancels the ongoing timer.
Definition at line 59 of file test/mbedclient/utest/stub/m2mtimer_stub.cpp.
Generated on Tue Jul 12 2022 12:29:08 by
1.7.2
