HT32SX Monarch Scan
Monarch Scan application for HT32SX
monarch_app.c File Reference

Monarch Application HT32SX iMCP SiP Sigfox. More...

#include "monarch_app.h"

Functions

void configRegion (void)
 Configures the device using the RCZ found after Monarch Scan. Call the functions St_Sigfox_Open_RCZ, to execute these configurations and sendFrameRCZ. More...
 
void closeSigfoxLib (void)
 This function closes the library (Free the allocated memory of SIGFOX_API_open and close RF). More...
 
void sendFrameRCZ (rc_mask RCZ)
 Send a frame to the Sigfox network using the RCZ found after Monarch Scan. More...
 
void monarchScan (sfx_u8 rc_capabilities_bit_mask, sfx_u16 timer, sfx_timer_unit_enum_t unit)
 Executes a scan of the air to detect a Sigfox Beacon. It will return 0, if success and 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_u8 callback (sfx_u8 rc_bit_mask, sfx_s16 rssi)
 Monarch callback called after finding a Monarch Beacon. More...
 
uint8_t getScanStatus (void)
 Get the Monarch Scan status (running or not running). More...
 
void setScanStatus (uint8_t scanStatus)
 Set Monarch Scan status. More...
 

Detailed Description

Monarch Application HT32SX iMCP SiP Sigfox.

Author
HT Micron Advanced R&D
Version
1.0
Date
November 20, 2019

This file defines the Monarch Scan Application.

Function Documentation

◆ callback()

sfx_u8 callback ( sfx_u8  rc_bit_mask,
sfx_s16  rssi 
)

Monarch callback called after finding a Monarch Beacon.


Parameters
[in]sfx_u8rc_bit_mask Bit Mask of the RCx on which the scan has to be executed.
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
- - RC6 RC5 RC4 RC3 RC2 RC1
Parameters
[in]rssiSignal rssi.
[out]none
Return values
SFX_ERR_NONENo error
MCU_ERR_API_FREEVerify sigfox_api.h for more info

◆ closeSigfoxLib()

void closeSigfoxLib ( void  )

This function closes the library (Free the allocated memory of SIGFOX_API_open and close RF).


Parameters
[in]none
[out]none

◆ configRegion()

void configRegion ( void  )

Configures the device using the RCZ found after Monarch Scan. Call the functions St_Sigfox_Open_RCZ, to execute these configurations and sendFrameRCZ.


Parameters
[in]none
[out]none

◆ getScanStatus()

uint8_t getScanStatus ( void  )

Get the Monarch Scan status (running or not running).


Parameters
[in]none
[out]none
Return values
Scanstatus (1 if it's running, 0 if it's not running)

◆ monarchScan()

void monarchScan ( sfx_u8  rc_capabilities_bit_mask,
sfx_u16  timer,
sfx_timer_unit_enum_t  unit 
)

Executes a scan of the air to detect a Sigfox Beacon. It will return 0, if success and the RC enum value corresponding to the beacon found and its RSSI level. The scan is executed during the specific timer/unit time.


Parameters
[in]sfx_u8rc_capabilities_bit_mask Bit Mask of the RCx on which the scan has to be executed.
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
- - 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
[out]none

◆ sendFrameRCZ()

void sendFrameRCZ ( rc_mask  RCZ)

Send a frame to the Sigfox network using the RCZ found after Monarch Scan.


Parameters
[in]rc_maskRCZ Radio zone
[out]none

◆ setScanStatus()

void setScanStatus ( uint8_t  scanStatus)

Set Monarch Scan status.


Parameters
[in]scanStatusScan status
[out]none
Return values
none