#ifndef _802_15_4_H_
#define _802_15_4_H_

#include "DigiType.h"         /* Defines basic types such as uint8_t */
#include "NwkMacInterface.h"  /* Defines MAC interface primitives, and API */
#include "AppAspInterface.h"  /* Defines ASP interface primitives, and API */
#include "MsgSystem.h"        /* Defines message interface, MSG_AllocType, MSG_Send, etc. */

  // MAC PIB attributes
enum {
    // Vendor specific attributes
  gMacRole_c                              = 0x20,
  gMacLogicalChannel_c                    = 0x21,
  gMacPanCoordinator_c                    = 0x22,
    // General MAC PIB attributes
  gMacPibAckWaitDuration_c                = 0x40,
  gMacPibAssociationPermit_c              = 0x41,
  gMacPibAutoRequest_c                    = 0x42,
  gMacPibBattLifeExt_c                    = 0x43,
  gMacPibBattLifeExtPeriods_c             = 0x44,
  gMacPibBeaconPayload_c                  = 0x45,
  gMacPibBeaconPayloadLength_c            = 0x46,
  gMacPibBeaconOrder_c                    = 0x47,
  gMacPibBeaconTxTime_c                   = 0x48,
  gMacPibBsn_c                            = 0x49,
  gMacPibCoordExtendedAddress_c           = 0x4A,
  gMacPibCoordShortAddress_c              = 0x4B,
  gMacPibDsn_c                            = 0x4C,
  gMacPibGtsPermit_c                      = 0x4D,
  gMacPibMaxCsmaBackoffs_c                = 0x4E,
  gMacPibMinBe_c                          = 0x4F,
  gMacPibPanId_c                          = 0x50,
  gMacPibPromiscuousMode_c                = 0x51,
  gMacPibRxOnWhenIdle_c                   = 0x52,
  gMacPibShortAddress_c                   = 0x53,
  gMacPibSuperFrameOrder_c                = 0x54,
  gMacPibTransactionPersistenceTime_c     = 0x55,
    // Security specific MAC PIB attributes
  gMacAclEntryDescriptorSet_c             = 0x70,
  gMacPibAclEntryDescriptorSetSize_c      = 0x71,
  gMacPibDefaultSecurity_c                = 0x72,
  gMacPibDefaultSecurityMaterialLength_c  = 0x73,
  gMacPibDefaultSecurityMaterial_c        = 0x74,
  gMacPibDefaultSecuritySuite_c           = 0x75,
  gMacPibSecurityMode_c                   = 0x76,
    // Vendor specific. Used for selecting current entry in ACL descriptor table.
  gMacPibAclEntryCurrent_c                = 0x77,
    // The following attributes are mapped to elements in mpPIBaclEntryDescriptorSet[gMacAclEntryCurrent_c]
  gMacPibAclEntryExtAddress_c             = 0x78,
  gMacPibAclEntryShortAddress_c           = 0x79,
  gMacPibAclEntryPanId_c                  = 0x7A,
  gMacPibAclEntrySecurityMaterialLength_c = 0x7B,
  gMacPibAclEntrySecurityMaterial_c       = 0x7C,
  gMacPibAclEntrySecuritySuite_c          = 0x7D,
};
typedef uint8_t macPibAttribute_t;

  // MAC error codes
enum {
  gSuccess_c              = 0x00,
  gPanAtCapacity_c        = 0x01,
  gPanAccessDenied_c      = 0x02,
  gBeaconLoss_c           = 0xE0,
  gChannelAccessFailure_c = 0xE1,
  gDenied_c               = 0xE2,
  gDisableTrxFailure_c    = 0xE3,
  gFailedSecurityCheck_c  = 0xE4,
  gFrameTooLong_c         = 0xE5,
  gInvalidGts_c           = 0xE6,
  gInvalidHandle_c        = 0xE7,
  gInvalidParameter_c     = 0xE8,
  gNoAck_c                = 0xE9,
  gNoBeacon_c             = 0xEA,
  gNoData_c               = 0xEB,
  gNoShortAddress_c       = 0xEC,
  gOutOfCap_c             = 0xED,
  gPanIdConflict_c        = 0xEE,
  gRealignment_c          = 0xEF,
  gTransactionExpired_c   = 0xF0,
  gTransactionOverflow_c  = 0xF1,
  gTxActive_c             = 0xF2,
  gUnavailableKey_c       = 0xF3,
  gUnsupportedAttribute_c = 0xF4
};


#endif /*_802_15_4_H_*/
