HT32SX Generic Push Button
Generic Push Button application for HT32SX
sigfox_monarch_api.h File Reference

Sigfox user functions. More...

#include "sigfox_types.h"
Include dependency graph for sigfox_monarch_api.h:
This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Sigfox user functions.

\if SIGFOX PATTERN


/ ___/ | | / ___| | ___| / _ \ \ \ / /
| |___ | | | | | |__ | | | | \ \/ /
___ \ | | | | _ | __| | | | | } {
___| | | | | |_| | | | | |_| | / /\ \ /_____/ |_| _____/ |_| _____/ /_/ _\


!!!! DO NOT MODIFY THIS FILE !!!!


 \endif

Author
Version
Date

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.

Enumeration Type Documentation

◆ sfx_bitfield_rc_enum_t

Enumerator
SFX_BITFIELD_SHIFT_RC1 

RC1 bitfield shift value

SFX_BITFIELD_SHIFT_RC2 

RC2 bitfield shift value

SFX_BITFIELD_SHIFT_RC3 

RC3 bitfield shift value

SFX_BITFIELD_SHIFT_RC4 

RC4 bitfield shift value

SFX_BITFIELD_SHIFT_RC5 

RC5 bitfield shift value

SFX_BITFIELD_SHIFT_RC6 

RC6 bitfield shift value

SFX_BITFIELD_SHIFT_RC7 

RC7 bitfield shift value

SFX_MAX_SIGFOX_RC 

Maximum number of RC supported by Sigfox

◆ sfx_monarch_listening_mode_t

Enumerator
MONARCH_LISTENING_SWEEP 

Sweep mode is used to scan all the frequencies given by the Sigfox Lib In that mode, when the check on pattern (or patterns) is identify as negative, it has to go to the next frequency and continue to search for the patterns of that frequency

MONARCH_LISTENING_WINDOW 

Listening Window mode is used to scan the frequency during a specific time. Check on one or two pattern can be executed till the end of the window.

◆ sfx_pattern_enum_t

Enumerator
NO_MONARCH_PATTERN 

No pattern defined

MONARCH_DELTA_F1 

Delta F1 pattern : 1024 Hz

MONARCH_DELTA_F2 

Delta F2 pattern : 1260.3077 Hz

MONARCH_DELTA_F3 

Delta F3 pattern : 1489.454545 Hz

LAST_MONARCH_PATTERN 

Last supported pattern

◆ sfx_timer_unit_enum_t

Enumerator
SFX_TIME_MS 

Millisecond unit

SFX_TIME_S 

Second unit

SFX_TIME_M 

Minute unit

SFX_TIME_H 

Hour unit

Function Documentation

◆ SIGFOX_MONARCH_API_execute_rc_scan()

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.

Parameters
[in]sfx_u8rc_capabilities_bit_mask Bit Mask (format below ) of the RCx on which the scan has to be executed :

| Bit7 | Bit6 | Bit5 | Bit4 | Bit3 | Bit2 | Bit1 | Bit0 |

| - | RC7 | RC6 | RC5 | RC4 | RC3 | RC2 | RC1 |

Parameters
[in]sfx_u16timer Scan duration value ( with the unit parameter information )
[in]sfx_timer_unit_enum_tunit Unit to be considered for the scan time computation
[in]app_callback_handlerThis 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_u8rc Value of the RC found. There could be only 1 RC or 0 ( not found )
[out]rssiRSSI 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

◆ SIGFOX_MONARCH_API_stop_rc_scan()

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