text: /***************************************************************************//**
   * @file
   * @brief Self provisioning header file
   *******************************************************************************
   * # License
   * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
   *******************************************************************************
   *
   * The licensor of this software is Silicon Laboratories Inc. Your use of this
   * software is governed by the terms of Silicon Labs Master Software License
   * Agreement (MSLA) available at
   * www.silabs.com/about-us/legal/master-software-license-agreement. This
   * software is distributed to you in Source Code format and is governed by the
   * sections of the MSLA applicable to Source Code.
   *
   ******************************************************************************/
  
  #ifndef SELFPROV_H
  #define SELFPROV_H
  
  #define UNICAST_ADDRESS             0x0000
  #define UADDR_ELEM_BITS             4
  #define UADDR_RSVD_BITS             1
  
  #define NETWORK_KEY                 {1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4}
  #define APPLICATION_KEY             {5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8}
  #define DEVICE_KEY                  {9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0}
  
  #define GRP_SVR_PUB_ADDRESS         0xC100
  #define GRP_SVR_PUB_TTL             3
  #define GRP_SVR_PUB_PERIOD          0
  #define GRP_SVR_PUB_RETRANS         0
  #define GRP_SVR_PUB_CREDENTIALS     0
  #define GRP_SVR_SUB_ADDRESSES       { 0xC000 }
  
  #define GRP_CLI_PUB_ADDRESS         0xC000
  #define GRP_CLI_PUB_TTL             3
  #define GRP_CLI_PUB_PERIOD          0
  #define GRP_CLI_PUB_RETRANS         0
  #define GRP_CLI_PUB_CREDENTIALS     0
  #define GRP_CLI_SUB_ADDRESSES       { 0xC100 }
  
  #define MAX_PUB_SUB_MODELS          20
  
  #define PUB_SUB_SERVER_MODELS   { \
      MESH_MODEL_GENERIC_ONOFF_SERVER, \
      MESH_MODEL_GENERIC_LEVEL_SERVER, \
      MESH_MODEL_GENERIC_TRANSITION_TIME_SERVER, \
      MESH_MODEL_GENERIC_POWER_ONOFF_SERVER, \
      MESH_MODEL_GENERIC_POWER_LEVEL_SERVER, \
      MESH_MODEL_GENERIC_BATTERY_SERVER, \
      MESH_MODEL_GENERIC_LOCATION_SERVER, \
      MESH_MODEL_GENERIC_ADMIN_PROPERTY_SERVER, \
      MESH_MODEL_GENERIC_MANUF_PROPERTY_SERVER, \
      MESH_MODEL_GENERIC_USER_PROPERTY_SERVER, \
      MESH_MODEL_GENERIC_CLIENT_PROPERTY_SERVER, \
      MESH_MODEL_SENSOR_SERVER, \
      MESH_MODEL_TIME_SERVER, \
      MESH_MODEL_SCENE_SERVER, \
      MESH_MODEL_SCHEDULER_SERVER, \
      MESH_MODEL_LIGHT_LIGHTNESS_SERVER, \
      MESH_MODEL_LIGHT_CTL_SERVER, \
      MESH_MODEL_LIGHT_CTL_TEMPERATURE_SERVER, \
      MESH_MODEL_LIGHT_LC_SERVER \
  }
  
  #define PUB_SUB_CLIENT_MODELS   { \
      MESH_MODEL_GENERIC_ONOFF_CLIENT, \
      MESH_MODEL_GENERIC_LEVEL_CLIENT, \
      MESH_MODEL_GENERIC_TRANSITION_TIME_CLIENT, \
      MESH_MODEL_GENERIC_POWER_ONOFF_CLIENT, \
      MESH_MODEL_GENERIC_POWER_LEVEL_CLIENT, \
      MESH_MODEL_GENERIC_BATTERY_CLIENT, \
      MESH_MODEL_GENERIC_LOCATION_CLIENT, \
      MESH_MODEL_GENERIC_PROPERTY_CLIENT, \
      MESH_MODEL_SENSOR_CLIENT, \
      MESH_MODEL_TIME_CLIENT, \
      MESH_MODEL_SCENE_CLIENT, \
      MESH_MODEL_SCHEDULER_CLIENT, \
      MESH_MODEL_LIGHT_LIGHTNESS_CLIENT, \
      MESH_MODEL_LIGHT_CTL_CLIENT, \
      MESH_MODEL_LIGHT_LC_CLIENT \
  }
  
  enum mesh_model_id_e {
      MESH_MODEL_CONFIGURATION_SERVER             = 0x0000,
      MESH_MODEL_CONFIGURATION_CLIENT,
      MESH_MODEL_HEALTH_SERVER,
      MESH_MODEL_HEALTH_CLIENT,
      MESH_MODEL_GENERIC_ONOFF_SERVER             = 0x1000,
      MESH_MODEL_GENERIC_ONOFF_CLIENT,
      MESH_MODEL_GENERIC_LEVEL_SERVER,
      MESH_MODEL_GENERIC_LEVEL_CLIENT,
      MESH_MODEL_GENERIC_TRANSITION_TIME_SERVER,
      MESH_MODEL_GENERIC_TRANSITION_TIME_CLIENT,
      MESH_MODEL_GENERIC_POWER_ONOFF_SERVER,
      MESH_MODEL_GENERIC_POWER_ONOFF_SETUP_SERVER,
      MESH_MODEL_GENERIC_POWER_ONOFF_CLIENT,
      MESH_MODEL_GENERIC_POWER_LEVEL_SERVER,
      MESH_MODEL_GENERIC_POWER_LEVEL_SETUP_SERVER,
      MESH_MODEL_GENERIC_POWER_LEVEL_CLIENT,
      MESH_MODEL_GENERIC_BATTERY_SERVER,
      MESH_MODEL_GENERIC_BATTERY_CLIENT,
      MESH_MODEL_GENERIC_LOCATION_SERVER,
      MESH_MODEL_GENERIC_LOCATION_SETUP_SERVER,
      MESH_MODEL_GENERIC_LOCATION_CLIENT,
      MESH_MODEL_GENERIC_ADMIN_PROPERTY_SERVER,
      MESH_MODEL_GENERIC_MANUF_PROPERTY_SERVER,
      MESH_MODEL_GENERIC_USER_PROPERTY_SERVER,
      MESH_MODEL_GENERIC_CLIENT_PROPERTY_SERVER,
      MESH_MODEL_GENERIC_PROPERTY_CLIENT,
      MESH_MODEL_SENSOR_SERVER                    = 0x1100,
      MESH_MODEL_SENSOR_SETUP_SERVER,
      MESH_MODEL_SENSOR_CLIENT,
      MESH_MODEL_TIME_SERVER                      = 0x1200,
      MESH_MODEL_TIME_SETUP_SERVER,
      MESH_MODEL_TIME_CLIENT,
      MESH_MODEL_SCENE_SERVER,
      MESH_MODEL_SCENE_SETUP_SERVER,
      MESH_MODEL_SCENE_CLIENT,
      MESH_MODEL_SCHEDULER_SERVER,
      MESH_MODEL_SCHEDULER_SETUP_SERVER,
      MESH_MODEL_SCHEDULER_CLIENT,
      MESH_MODEL_LIGHT_LIGHTNESS_SERVER           = 0x1300,
      MESH_MODEL_LIGHT_LIGHTNESS_SETUP_SERVER,
      MESH_MODEL_LIGHT_LIGHTNESS_CLIENT,
      MESH_MODEL_LIGHT_CTL_SERVER,
      MESH_MODEL_LIGHT_CTL_SETUP_SERVER,
      MESH_MODEL_LIGHT_CTL_CLIENT,
      MESH_MODEL_LIGHT_CTL_TEMPERATURE_SERVER,
      MESH_MODEL_LIGHT_HSL_SERVER,
      MESH_MODEL_LIGHT_HSL_SETUP_SERVER,
      MESH_MODEL_LIGHT_HSL_CLIENT,
      MESH_MODEL_LIGHT_HSL_HUE_SERVER,
      MESH_MODEL_LIGHT_HSL_SATURATION_SERVER,
      MESH_MODEL_LIGHT_XYL_SERVER,
      MESH_MODEL_LIGHT_XYL_SETUP_SERVER,
      MESH_MODEL_LIGHT_XYL_CLIENT,
      MESH_MODEL_LIGHT_LC_SERVER,
      MESH_MODEL_LIGHT_LC_SETUP_SERVER,
      MESH_MODEL_LIGHT_LC_CLIENT
  };
  
  void self_provisioning(void);
  
  #endif /* SELFPROV_H */
  