#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "config.h"
#include "sys.h"
#include "phy.h"
#include "nwk.h"
#include "sysTimer.h"
#include "commands.h"
#include "sio2host.h"
#include "sysclk.h"
#include "asf.h"
#include "board.h"
#include "wsndemo.h"
Data Structures | |
struct | AppMessage_t |
Macros | |
#define | APP_CAPTION_SIZE (sizeof(APP_CAPTION) - 1) |
#define | APP_COMMAND_PENDING 0x01 |
Typedefs | |
typedef struct AppMessage_t | AppMessage_t |
typedef enum AppState_t | AppState_t |
Functions | |
static void | APP_TaskHandler (void) |
static bool | appDataInd (NWK_DataInd_t *ind) |
static void | appDataSendingTimerHandler (SYS_Timer_t *timer) |
static void | appInit (void) |
static void | appSendData (void) |
static void | appUartSendMessage (uint8_t *data, uint8_t size) |
void | UartBytesReceived (uint16_t bytes, uint8_t *byte) |
void | wsndemo_init (void) |
Init function of the WSNDemo application. More... | |
void | wsndemo_task (void) |
Task of the WSNDemo application This task should be called in a while(1) More... | |
Variables | |
static SYS_Timer_t | appDataSendingTimer |
static AppMessage_t | appMsg |
static AppState_t | appState = APP_STATE_INITIAL |
static uint8_t | rx_data [APP_RX_BUF_SIZE] |
#define APP_CAPTION_SIZE (sizeof(APP_CAPTION) - 1) |
Referenced by appInit().
#define APP_COMMAND_PENDING 0x01 |
Referenced by appDataInd().
typedef struct AppMessage_t AppMessage_t |
typedef enum AppState_t AppState_t |
enum AppState_t |
|
static |
References APP_RX_BUF_SIZE, APP_SENDING_INTERVAL, APP_STATE_PREPARE_TO_SLEEP, APP_STATE_SEND, APP_STATE_SENDING_DONE, APP_STATE_SLEEP, APP_STATE_WAIT_SEND_TIMER, APP_STATE_WAKEUP, appInit(), appSendData(), appState, NWK_Busy(), NWK_SleepReq(), NWK_WakeupReq(), sio2host_rx(), SYS_TimerStart(), and UartBytesReceived().
|
static |
|
static |
References APP_STATE_SEND, APP_STATE_WAIT_SEND_TIMER, appState, and SYS_TimerStart().
Referenced by appInit().
|
static |
References APP_ADDR, APP_BAND, APP_CAPTION, APP_CAPTION_SIZE, APP_CHANNEL, APP_COMMAND_ID_NETWORK_INFO, APP_CommandsInit(), APP_ENDPOINT, APP_MODULATION, APP_NODE_TYPE, APP_PANID, APP_SECURITY_KEY, APP_SENDING_INTERVAL, APP_STATE_SEND, appDataInd(), appDataSendingTimerHandler(), appState, AppMessage_t::battery, AppMessage_t::caption, AppMessage_t::channelMask, AppMessage_t::commandId, AppMessage_t::extAddr, SYS_Timer_t::handler, SYS_Timer_t::interval, AppMessage_t::light, AppMessage_t::lqi, SYS_Timer_t::mode, AppMessage_t::nodeType, NWK_ACK_WAIT_TIME, NWK_OpenEndpoint(), NWK_SetAddr(), NWK_SetPanId(), AppMessage_t::panId, AppMessage_t::parentShortAddr, PHY_RandomReq(), PHY_SetBand(), PHY_SetChannel(), PHY_SetModulation(), PHY_SetRxState(), AppMessage_t::rssi, AppMessage_t::sensors, AppMessage_t::shortAddr, AppMessage_t::size, AppMessage_t::softVersion, SYS_TIMER_INTERVAL_MODE, SYS_TIMER_PERIODIC_MODE, SYS_TimerStart(), AppMessage_t::temperature, AppMessage_t::text, AppMessage_t::type, and AppMessage_t::workingChannel.
Referenced by APP_TaskHandler().
|
static |
References APP_ENDPOINT, APP_STATE_WAIT_CONF, APP_STATE_WAIT_SEND_TIMER, appDataConf(), appMsg, appState, appUartSendMessage(), AppMessage_t::battery, NWK_DataReq_t::confirm, NWK_DataReq_t::data, NWK_DataReq_t::dstAddr, NWK_DataReq_t::dstEndpoint, AppMessage_t::light, NWK_DataReq(), NWK_OPT_ACK_REQUEST, NWK_OPT_ENABLE_SECURITY, NWK_DataReq_t::options, AppMessage_t::parentShortAddr, AppMessage_t::sensors, NWK_DataReq_t::size, NWK_DataReq_t::srcEndpoint, SYS_TimerStart(), and AppMessage_t::temperature.
Referenced by APP_TaskHandler().
|
static |
References i, and sio2host_putchar().
Referenced by appDataInd(), and appSendData().
void UartBytesReceived | ( | uint16_t | bytes, |
uint8_t * | byte | ||
) |
References APP_CommandsByteReceived(), and i.
Referenced by APP_TaskHandler().
void wsndemo_init | ( | void | ) |
Init function of the WSNDemo application.
References sio2host_init(), and SYS_Init().
Referenced by main().
void wsndemo_task | ( | void | ) |
Task of the WSNDemo application This task should be called in a while(1)
References APP_TaskHandler(), and SYS_TaskHandler().
Referenced by main().
|
static |
|
static |
Referenced by appSendData().
|
static |
Referenced by APP_TaskHandler(), appDataSendingTimerHandler(), appInit(), and appSendData().
|
static |