![]() |
HT32SX Generic Push Button
Generic Push Button application for HT32SX
|
Sigfox user functions. More...
#include "sigfox_types.h"
Go to the source code of this file.
Data Structures | |
struct | sfx_monarch_pattern_search_t |
Macros | |
#define | MAX_MONARCH_PATTERN_PER_FREQUENCY_SEARCH 2 /* On 1 frequency, we can at the maximum ask for the research of 2 different patterns */ |
Enumerations | |
enum | sfx_timer_unit_enum_t { SFX_TIME_MS = 0, SFX_TIME_S, SFX_TIME_M, SFX_TIME_H } |
enum | sfx_bitfield_rc_enum_t { SFX_BITFIELD_SHIFT_RC1 = 0, SFX_BITFIELD_SHIFT_RC2 = 1, SFX_BITFIELD_SHIFT_RC3 = 2, SFX_BITFIELD_SHIFT_RC4 = 3, SFX_BITFIELD_SHIFT_RC5 = 4, SFX_BITFIELD_SHIFT_RC6 = 5, SFX_BITFIELD_SHIFT_RC7 = 6, SFX_MAX_SIGFOX_RC } |
enum | sfx_pattern_enum_t { NO_MONARCH_PATTERN = 0, MONARCH_DELTA_F1 = 1, MONARCH_DELTA_F2 = 2, MONARCH_DELTA_F3 = 3, LAST_MONARCH_PATTERN = MONARCH_DELTA_F3 } |
enum | sfx_monarch_listening_mode_t { MONARCH_LISTENING_SWEEP, MONARCH_LISTENING_WINDOW } |
Functions | |
sfx_error_t | SIGFOX_MONARCH_API_execute_rc_scan (sfx_u8 rc_capabilities_bit_mask, sfx_u16 timer, sfx_timer_unit_enum_t unit, sfx_u8(*app_callback_handler)(sfx_u8 rc_bit_mask, sfx_s16 rssi)) |
This function executes a scan of the air to detect a Sigfox Beacon. It will return the RC enum value corresponding to the beacon found and its RSSI level. The scan is executed during the specific timer / unit time. More... | |
sfx_error_t | SIGFOX_MONARCH_API_stop_rc_scan (void) |
This function stops a RC scan which is on going. More... | |
Sigfox user functions.
/ ___/ | | / ___| | ___| / _ \ \ \ / /
| |___ | | | | | |__ | | | | \ \/ /
___ \ | | | | _ | __| | | | | } {
___| | | | | |_| | | | | |_| | / /\ \ /_____/ |_| _____/ |_| _____/ /_/ _\
!!!! DO NOT MODIFY THIS FILE !!!!
This file includes the user's functions for the Monarch feature allowing to identify the coverage of the Radio Configuration based on beacon sent by the network.
enum sfx_pattern_enum_t |
sfx_error_t sfx_error_t SIGFOX_MONARCH_API_execute_rc_scan | ( | sfx_u8 | rc_capabilities_bit_mask, |
sfx_u16 | timer, | ||
sfx_timer_unit_enum_t | unit, | ||
sfx_u8(*)(sfx_u8 rc_bit_mask, sfx_s16 rssi) | app_callback_handler | ||
) |
This function executes a scan of the air to detect a Sigfox Beacon. It will return the RC enum value corresponding to the beacon found and its RSSI level. The scan is executed during the specific timer / unit time.
NOTE : there is no need to open the sigfox Library to run this function.
[in] | sfx_u8 | rc_capabilities_bit_mask Bit Mask (format below ) of the RCx on which the scan has to be executed : |
[in] | sfx_u16 | timer Scan duration value ( with the unit parameter information ) |
[in] | sfx_timer_unit_enum_t | unit Unit to be considered for the scan time computation |
[in] | app_callback_handler | This is the function that will be called by the Sigfox Library when the scan is completed. ( either when RC Found or when Timeout ) parameter of this callback are : |
[out] | sfx_u8 | rc Value of the RC found. There could be only 1 RC or 0 ( not found ) |
[out] | rssi | RSSI value of the RC found. if rc = 0, rssi is not valid ( is set to 0 too ) |
MSB_____________________________________________LSB
15 8 | 7 0 |
---|---|
MANUF_ERROR_CODE | SIGFOX_ERROR_CODE |
_______________________ | ______________________ |
SIGFOX_ERROR_CODE for this function : SFX_ERR_NONE or SFX_ERR_MONARCH_API_xx
sfx_error_t SIGFOX_MONARCH_API_stop_rc_scan | ( | void | ) |
This function stops a RC scan which is on going.
NOTE : there is no need to open the sigfox Library to run this function.
MSB_____________________________________________LSB
15 8 | 7 0 |
---|---|
MANUF_ERROR_CODE | SIGFOX_ERROR_CODE |
_______________________ | ______________________ |
SIGFOX_ERROR_CODE for this function : SFX_ERR_NONE or SFX_ERR_MONARCH_API_xx