#include <string.h>
#include <inttypes.h>
#include <stdio.h>
#include "conf_board.h"
#include "avr2025_mac.h"
#include "delay.h"
#include "common_sw_timer.h"
#include "sio2host.h"
#include "common_hw_timer.h"
#include "beacon_app.h"
#include <asf.h>
Macros | |
#define | APP_GUARD_TIME_US (10000) |
#define | CHANNEL_OFFSET (0) |
Channel Offset will give us the channel number as (CHANNEL_OFFSET + 11) More... | |
#define | GTS_PAYLOAD_LEN (18) |
#define | LED_DATA (LED0) |
#define | LED_DATA (LED0) |
#define | LED_NWK_SETUP (LED0) |
#define | LED_START (LED0) |
#define | MCU_WAKEUP_TIME (150) |
#define | PAYLOAD_LEN (104) |
#define | SCAN_DURATION_LONG (6) |
Defines the long scan duration time. More... | |
#define | SCAN_DURATION_SHORT (5) |
Defines the short scan duration time. More... | |
#define | TIMER_SYNC_BEFORE_ASSOC_MS (3000) |
Functions | |
static void | app_alert (void) |
Alert to indicate something has gone wrong in the application. More... | |
int | main (void) |
Main function of the device application. More... | |
static void | network_search_indication_cb (void *parameter) |
Callback function indicating network search. More... | |
static void | print_stack_app_build_features (void) |
This function shows the stack and application capabilities on terminal if SIO_HUB switch is enabled. More... | |
static void | rx_data_led_off_cb (void *parameter) |
Callback function for switching off the LED after data reception. More... | |
void | usr_mcps_data_conf (uint8_t msduHandle, uint8_t status, uint32_t Timestamp) |
Callback function that must be implemented by application (NHLE) for MAC service MCPS-DATA.confirm. More... | |
void | usr_mcps_data_ind (wpan_addr_spec_t *SrcAddrSpec, wpan_addr_spec_t *DstAddrSpec, uint8_t msduLength, uint8_t *msdu, uint8_t mpduLinkQuality, uint8_t DSN, uint32_t Timestamp) |
void | usr_mlme_gts_conf (gts_char_t GtsChar, uint8_t status) |
void | usr_mlme_gts_ind (uint16_t DeviceAddr, gts_char_t GtsChar) |
void | usr_mlme_reset_conf (uint8_t status) |
Callback function that must be implemented by application (NHLE) for MAC service MLME-RESET.confirm. More... | |
void | usr_mlme_set_conf (uint8_t status, uint8_t PIBAttribute) |
Callback function that must be implemented by application (NHLE) for MAC service MLME-SET.confirm. More... | |
void | usr_mlme_sync_loss_ind (uint8_t LossReason, uint16_t PANId, uint8_t LogicalChannel, uint8_t ChannelPage) |
Callback function that must be implemented by application (NHLE) for MAC service MLME-SYNC-LOSS.indication. More... | |
Variables | |
app_state_t | app_state = APP_IDLE |
This variable stores the current state of the node. More... | |
static uint8_t | APP_TIMER |
static uint32_t | bc_rx_cnt |
static uint32_t | channels_supported |
wpan_addr_spec_t | coord_addr_spec |
uint8_t | current_channel |
uint8_t | current_channel_page |
uint8_t | default_key_source [8] |
static uint32_t | indirect_rx_cnt |
static uint8_t | msdu_payload [PAYLOAD_LEN] |
This array stores the current msdu payload. More... | |
#define APP_GUARD_TIME_US (10000) |
Referenced by main().
#define CHANNEL_OFFSET (0) |
Channel Offset will give us the channel number as (CHANNEL_OFFSET + 11)
#define GTS_PAYLOAD_LEN (18) |
#define LED_DATA (LED0) |
#define LED_DATA (LED0) |
#define LED_NWK_SETUP (LED0) |
Referenced by main(), and network_search_indication_cb().
#define LED_START (LED0) |
Referenced by main().
#define MCU_WAKEUP_TIME (150) |
#define PAYLOAD_LEN (104) |
#define SCAN_DURATION_LONG (6) |
Defines the long scan duration time.
#define SCAN_DURATION_SHORT (5) |
Defines the short scan duration time.
#define TIMER_SYNC_BEFORE_ASSOC_MS (3000) |
|
static |
Alert to indicate something has gone wrong in the application.
int main | ( | void | ) |
Main function of the device application.
References app_alert(), APP_GUARD_TIME_US, APP_TIMER, board_init(), cpu_irq_enable, delay_init(), irq_initialize_vectors, LED_DATA, LED_NWK_SETUP, LED_START, mac_ready_to_sleep(), MAC_SUCCESS, print_stack_app_build_features(), printf, sio2host_getchar(), sio2host_init(), sw_timer_get_id(), sw_timer_init(), system_init(), wpan_init(), wpan_mlme_reset_req(), and wpan_task().
|
static |
Callback function indicating network search.
parameter | Pointer to callback parameter (not used in this application, but could be if desired). |
References LED_NWK_SETUP.
|
static |
|
static |
Callback function for switching off the LED after data reception.
parameter | Pointer to callback parameter (not used in this application, but could be if desired). |
References LED_DATA.
Referenced by usr_mcps_data_ind().
void usr_mcps_data_ind | ( | wpan_addr_spec_t * | SrcAddrSpec, |
wpan_addr_spec_t * | DstAddrSpec, | ||
uint8_t | msduLength, | ||
uint8_t * | msdu, | ||
uint8_t | mpduLinkQuality, | ||
uint8_t | DSN, | ||
uint32_t | Timestamp | ||
) |
app_state_t app_state = APP_IDLE |
This variable stores the current state of the node.
Referenced by app_ble_wifi_provisioning(), app_connected_event_handler(), app_connected_state(), app_connected_state_handler(), app_disconnected_event_handler(), app_disconnected_state_handler(), blp_sensor_app_custom_event(), button_cb(), execute_state_machine(), hr_sensor_app_custom_event(), pas_custom_event(), set_state(), usr_mlme_reset_conf(), and usr_mlme_set_conf().
|
static |
Referenced by hw_timer_init(), main(), and usr_mcps_data_ind().
|
static |
Referenced by usr_mcps_data_ind().
|
static |
wpan_addr_spec_t coord_addr_spec |
uint8_t current_channel |
uint8_t current_channel_page |
uint8_t default_key_source[8] |
|
static |
Referenced by usr_mcps_data_ind().
|
static |
This array stores the current msdu payload.