Mbed OS Reference
Loading...
Searching...
No Matches
LoRaWANTimeHandler Class Reference

/ _____) _ | | ( (____ _____ ____ _| |_ _____ ____| |__ ____ | ___ | (_ _) ___ |/ ___) _ \ _____) ) ____| | | || |_| ____( (___| | | | (______/|_____)_|_|_| __)_____)____)_| |_| (C)2013 Semtech More...

#include <LoRaWANTimer.h>

Public Member Functions

void activate_timer_subsystem (events::EventQueue *queue)
 Activates the timer subsystem. More...
 
lorawan_time_t get_current_time (void)
 Read the current time. More...
 
lorawan_time_t get_elapsed_time (lorawan_time_t saved_time)
 Return the time elapsed since a fixed moment in time. More...
 
void init (timer_event_t &obj, mbed::Callback< void()> callback)
 Initializes the timer object. More...
 
void start (timer_event_t &obj, const uint32_t timeout)
 Starts and adds the timer object to the list of timer events. More...
 
void stop (timer_event_t &obj)
 Stops and removes the timer object from the list of timer events. More...
 
void clear (timer_event_t &obj)
 Clear timer state so it is not inadvertently canceled. More...
 

Detailed Description

/ _____) _ | | ( (____ _____ ____ _| |_ _____ ____| |__ ____ | ___ | (_ _) ___ |/ ___) _ \ _____) ) ____| | | || |_| ____( (___| | | | (______/|_____)_|_|_| __)_____)____)_| |_| (C)2013 Semtech

Description: Timer objects and scheduling management

License: Revised BSD License, see LICENSE.TXT file include in the project

Maintainer: Miguel Luis and Gregory Cristian

Copyright (c) 2017, Arm Limited and affiliates.

SPDX-License-Identifier: BSD-3-Clause

Definition at line 29 of file LoRaWANTimer.h.

Member Function Documentation

◆ activate_timer_subsystem()

void activate_timer_subsystem ( events::EventQueue queue)

Activates the timer subsystem.

Embeds EventQueue object to timer subsystem which is subsequently used to extract timer information.

Parameters
[in]queueHandle to EventQueue object

◆ get_current_time()

lorawan_time_t get_current_time ( void  )

Read the current time.

Returns
time The current time.

◆ get_elapsed_time()

lorawan_time_t get_elapsed_time ( lorawan_time_t  saved_time)

Return the time elapsed since a fixed moment in time.

Parameters
[in]saved_timeThe fixed moment in time.
Returns
time The elapsed time.

◆ init()

void init ( timer_event_t obj,
mbed::Callback< void()>  callback 
)

Initializes the timer object.

Remarks
The TimerSetValue function must be called before starting the timer. This function initializes the time-stamp and reloads the value at 0.
Parameters
[in]objThe structure containing the timer object parameters.
[in]callbackThe function callback called at the end of the timeout.

◆ start()

void start ( timer_event_t obj,
const uint32_t  timeout 
)

Starts and adds the timer object to the list of timer events.

Parameters
[in]objThe structure containing the timer object parameters.
[in]timeoutThe new timeout value.

◆ stop()

void stop ( timer_event_t obj)

Stops and removes the timer object from the list of timer events.

Parameters
[in]objThe structure containing the timer object parameters.

◆ clear()

void clear ( timer_event_t obj)

Clear timer state so it is not inadvertently canceled.

This function must be called by the callback registered in init.

Parameters
[in]objThe structure containing the timer object parameters.