/**************************************************************************//**
  \file blank.h
  
  \brief Blank application header file.

  \author
    Atmel Corporation: http://www.atmel.com \n
    Support email: avr@atmel.com

  Copyright (c) 2008 , Atmel Corporation. All rights reserved.
  Licensed under Atmel's Limited License Agreement (BitCloudTM).

  \internal
    History:     
******************************************************************************/

#ifndef _BLANK_H
#define _BLANK_H

/******************************************************************************
                    Includes section
******************************************************************************/
#include <aps.h> 
#include "parameters.h"                                       // Main APS header

/******************************************************************************
                    Defines section
******************************************************************************/

#define APS_ASDU_SIZE 107


#define MESSAGE_APP_STARTED     "Start routeru\n"
#define MESSAGE_NETWORK_STARTED "Start site\n"
#define MESSAGE_NETWORK_ERR     "Start site selhal\n"
#define MESSAGE_SENT_OK         "Posilani zpravy\n"
#define MESSAGE_SENT_ERR        "Posilani zpravy selhalo\n"


enum {
	APP_STATE_INIT,
	APP_STATE_NETWORK_STARTED,
	APP_ADC,
	APP_IDLE,
	APP_SEND,
	APP_TRSH,	
};



typedef struct
{
  char payload[APS_PAYLOAD]; /* Velikost datove casti */
  uint8_t curr_txPwr; //tx power value - 1B
  uint16_t seq; //packet number - 2B  
}AsduMessage_t;



//Application message buffer structure
BEGIN_PACK
typedef struct
{
  uint8_t header[APS_ASDU_OFFSET]; //APS header
  uint8_t data[APS_ASDU_SIZE]; //Application data - the payload
  uint8_t footer[APS_AFFIX_LENGTH - APS_ASDU_OFFSET]; // Footer
} PACK AppMessageBuffer_t;
END_PACK


#endif // _BLANK_H
// eof blank.h
