#ifndef DMM_POLICY_CONFIG_H
#define DMM_POLICY_CONFIG_H

#include <ti_dmm_custom_activities.h>
#include <ti/dmm/dmm_policy.h>
#include <stddef.h>
//#include <ti_dmm_application_policy.h>

// Set the DMM policy module to print every transition
#define DMMPOLICY_LOG_LEVEL    DMMPOLICY_LOG_LEVEL_VERBOSE

// Route those prints to the console via the DIAG log API
#define DMM_USE_DIAG_LOG       1



// #define DMMPOLICY_ANY 0xFFFFFFFF
// #define DMMPOLICY_BLE_ADV 0x00000001
// #define DMMPOLICY_BLE_CONNECTED 0x00000002
// #define DMMPOLICY_BLE_PARAMUPDATE 0x00000004

// #define DMMPOLICY_BLE_IDLE          0x00000000
// #define DMMPOLICY_BLE_ADV           0x00000001
// #define DMMPOLICY_BLE_SCAN          0x00000002
// #define DMMPOLICY_BLE_INIT          0x00000004
// #define DMMPOLICY_BLE_CONNECTED     0x00000008
// #define DMMPOLICY_BLE_PARAMUPDATE   0x00000010 

// ======================================
// APPLICATION STATES (Used in updateApplicationState)
// ======================================

// BLE Application States
// #define DMMPOLICY_BLE_IDLE          0x00000000
// #define DMMPOLICY_BLE_ADV           0x00000001  // Advertising
// #define DMMPOLICY_BLE_SCAN          0x00000002  // Scanning
// #define DMMPOLICY_BLE_INIT          0x00000004  // Initiating (connecting)
// #define DMMPOLICY_BLE_CONNECTED     0x00000008  // Active connection
// #define DMMPOLICY_BLE_PARAMUPDATE   0x00000010  // Parameter update


// #define ANY                             0xFFFFFFFF
// #define DMMPOLICY_BLE_IDLE              0x00000001
// #define DMMPOLICY_BLE_ADV               0x00000002
// #define DMMPOLICY_BLE_CONNECTING        0x00000004
// #define DMMPOLICY_BLE_HIGH_BANDWIDTH    0x00000008
// #define DMMPOLICY_BLE_CONNECTED         0x00000010
// #define DMMPOLICY_BLE_OAD               0x00000020

#define ANY                             0xFFFFFFFF
#define DMMPOLICY_BLE_IDLE              0x00000001
#define DMMPOLICY_BLE_ADV               0x00000002
#define DMMPOLICY_BLE_CONNECTING        0x00000004
#define DMMPOLICY_BLE_PARAMUPDATE       0x00000040   // ← add this
#define DMMPOLICY_BLE_HIGH_BANDWIDTH    0x00000008
#define DMMPOLICY_BLE_CONNECTED         0x00000010
#define DMMPOLICY_BLE_OAD               0x00000020


// Sub-1 GHz RF Activities (custom defined)
// #define DMM_PROP_IDLE               0x00000040
// #define DMM_PROP_RX_TX              0x00000080  // Used when Sub-1 is actively transmitting or receiving
// #define DMM_PROP_PAUSED             0x00000100  // Used when Sub-1 is paused

// #define DMMPOLICY_154_UNINIT       0x00000040
// #define DMMPOLICY_154_PROVISIONING 0x00000080
// #define DMMPOLICY_154_CONNECTED    0x00000100

// // Sub-1 GHz (Custom) Application States
// #define APP_STATE_PROP_IDLE         0x00000040  // RF idle
// #define APP_STATE_PROP_ACTIVE       0x00000080  // RX/TX active
// #define APP_STATE_PROP_PAUSED       0x00000100  // Sub-1 paused due to BLE priority

// // ======================================
// // APPLIED ACTIVITIES (Used in .appliedActivity field of policy table)
// // ======================================

// // BLE RF Activities (must match priority table)
// #define DMM_BLE_IDLE                0x00000000
// #define DMM_BLE_BROADCASTING        0x00000001  // Used for advertising
// #define DMM_BLE_OBSERVING           0x00000002  // Used for scanning
// #define DMM_BLE_INITIATING          0x00000004  // Used for connecting
// #define DMM_BLE_CONNECTION          0x00000008  // Used for established connection





// Define BLE and Custom stack indices as used by the application
#define BLE_STACK_POLICY_IDX     0
#define CUSTOM1_STACK_POLICY_IDX 1

// Define custom stack states if not already defined
 #define APP_STATE_PROP_IDLE      0x00000040   //0x00000000  // Stack is idle
 #define APP_STATE_PROP_ACTIVE    0x00000080   //0x00000001  // RX/TX is active
 #define APP_STATE_PROP_PAUSED    0x00000100   //0x00000002  // Pause execution due to BLE priority

// External declaration of the policy table and policies
extern DMMPolicy_Policy DMMPolicy_ApplicationPolicy[];
extern DMMPolicy_PolicyTable DMMPolicy_ApplicationPolicyTable;


//! \brief The application policy table size
extern uint32_t DMMPolicy_ApplicationPolicySize;




#endif