Sensor Demo for CTIA

Dependencies:   LoRaWAN-lib SX1272Lib lib_gps lib_mma8451q lib_mpl3115a2 mbed

Fork of LoRaWAN-NAMote72-Application-Demo by Semtech

Committer:
ubhat
Date:
Wed Jun 08 01:40:42 2016 +0000
Revision:
5:6ffeac53b7cb
Parent:
0:69f2e28d12c1
Child:
9:617844f7fdb1
Change state machine flow in main.cpp

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ubhat 0:69f2e28d12c1 1 /*
ubhat 0:69f2e28d12c1 2 / _____) _ | |
ubhat 0:69f2e28d12c1 3 ( (____ _____ ____ _| |_ _____ ____| |__
ubhat 0:69f2e28d12c1 4 \____ \| ___ | (_ _) ___ |/ ___) _ \
ubhat 0:69f2e28d12c1 5 _____) ) ____| | | || |_| ____( (___| | | |
ubhat 0:69f2e28d12c1 6 (______/|_____)_|_|_| \__)_____)\____)_| |_|
ubhat 0:69f2e28d12c1 7 (C)2015 Semtech
ubhat 0:69f2e28d12c1 8
ubhat 0:69f2e28d12c1 9 Description: Extern declaration of parameters defined in main.cpp
ubhat 0:69f2e28d12c1 10
ubhat 0:69f2e28d12c1 11 License: Revised BSD License, see LICENSE.TXT file include in the project
ubhat 0:69f2e28d12c1 12
ubhat 0:69f2e28d12c1 13 Maintainer: Uttam Bhat
ubhat 0:69f2e28d12c1 14 */
ubhat 0:69f2e28d12c1 15 #ifndef __COMMON_H__
ubhat 0:69f2e28d12c1 16 #define __COMMON_H__
ubhat 0:69f2e28d12c1 17
ubhat 0:69f2e28d12c1 18 #include "Comissioning.h"
ubhat 0:69f2e28d12c1 19 #include "board.h"
ubhat 0:69f2e28d12c1 20
ubhat 0:69f2e28d12c1 21 /*!
ubhat 0:69f2e28d12c1 22 * User application data buffer size
ubhat 0:69f2e28d12c1 23 */
ubhat 0:69f2e28d12c1 24 #define LORAWAN_APP_DATA_MAX_SIZE 64
ubhat 0:69f2e28d12c1 25
ubhat 0:69f2e28d12c1 26
ubhat 0:69f2e28d12c1 27 #if( OVER_THE_AIR_ACTIVATION != 0 )
ubhat 0:69f2e28d12c1 28 /*!
ubhat 0:69f2e28d12c1 29 * Over the Air Activation
ubhat 0:69f2e28d12c1 30 */
ubhat 0:69f2e28d12c1 31
ubhat 0:69f2e28d12c1 32 extern uint8_t DevEui[];
ubhat 0:69f2e28d12c1 33 extern uint8_t AppEui[];
ubhat 0:69f2e28d12c1 34 extern uint8_t AppKey[];
ubhat 0:69f2e28d12c1 35
ubhat 0:69f2e28d12c1 36 #else
ubhat 0:69f2e28d12c1 37 /*!
ubhat 0:69f2e28d12c1 38 * Activation by Personalization
ubhat 0:69f2e28d12c1 39 */
ubhat 0:69f2e28d12c1 40
ubhat 0:69f2e28d12c1 41 extern uint8_t NwkSKey[];
ubhat 0:69f2e28d12c1 42 extern uint8_t AppSKey[];
ubhat 0:69f2e28d12c1 43 extern uint32_t DevAddr;
ubhat 0:69f2e28d12c1 44
ubhat 0:69f2e28d12c1 45 #endif
ubhat 0:69f2e28d12c1 46
ubhat 0:69f2e28d12c1 47 extern uint8_t AppData[LORAWAN_APP_DATA_MAX_SIZE]; // User application data size
ubhat 0:69f2e28d12c1 48
ubhat 0:69f2e28d12c1 49 extern uint8_t AppPort; // Application port
ubhat 0:69f2e28d12c1 50
ubhat 0:69f2e28d12c1 51 extern uint8_t AppDataSize; // Application size
ubhat 0:69f2e28d12c1 52
ubhat 0:69f2e28d12c1 53 extern uint8_t IsTxConfirmed; // Indicates if the node is sending confirmed or unconfirmed messages
ubhat 0:69f2e28d12c1 54
ubhat 5:6ffeac53b7cb 55 extern bool IsTxIntUpdate; // Indicates if a new transmit interrupt can be set
ubhat 5:6ffeac53b7cb 56
ubhat 0:69f2e28d12c1 57 extern bool NextTx; // Indicates if a new packet can be sent
ubhat 0:69f2e28d12c1 58
ubhat 0:69f2e28d12c1 59 extern bool IsNetworkJoinedStatusUpdate; // Indicates if the MAC layer network join status has changed.
ubhat 0:69f2e28d12c1 60
ubhat 0:69f2e28d12c1 61 extern bool IsTxUpdate; // Indicates if the message sent
ubhat 0:69f2e28d12c1 62
ubhat 0:69f2e28d12c1 63 extern bool IsRxUpdate; // Indicates if the message received in the RX window.
ubhat 0:69f2e28d12c1 64
ubhat 0:69f2e28d12c1 65 extern TimerEvent_t TxNextPacketTimer; // Timer to handle the application data transmission duty cycle
ubhat 0:69f2e28d12c1 66
ubhat 0:69f2e28d12c1 67 #endif // __COMMON_H__