|
Z-Wave Protocol Controller Reference
|
#include "zpc_config.h"#include "device_id.h"#include "config.h"#include "sl_log.h"#include <string.h>#include <ctype.h>#include <stdlib.h>#include <time.h>#include <assert.h>#include "uic_version.h"#include "ZW_classcmd.h"Macros | |
| #define | LOG_TAG "zpc_config" |
| #define | DEFAULT_ZWAVE_RF_REGION "EU" |
| #define | DEFAULT_ZWAVE_NORMAL_TX_POWER_DBM 0 |
| #define | DEFAULT_ZWAVE_MEASURED_0DBM_POWER 0 |
| #define | DEFAULT_ZWAVE_MAX_LR_TX_POWER_DBM 0 |
| #define | DEFAULT_SERIAL_PORT "/dev/ttyUSB0" |
| #define | DEFAULT_WAKE_UP_INTERVAL 4200 |
| #define | DEFAULT_MANUFACTURER_ID 0x0000 |
| #define | DEFAULT_PRODUCT_TYPE 0x0005 |
| #define | DEFAULT_PRODUCT_ID 0x0001 |
| #define | DEFAULT_HARDWARE_VERSION 1 |
| #define | DEFAULT_NUMBER_OF_MISSING_WAKE_UP_NOTIFICATION 2 |
| #define | DEFAULT_NUMBER_OF_ACCEPTED_FRAME_TRANSMISSION_ERROR 2 |
| #define | DEFAULT_INCLUSION_PROTOCOL_PREFERENCE "1,2" |
| #define | DEFAULT_OTA_CACHE_PATH UIC_VAR_DIR "/zpc/ota_cache" |
| #define | DEFAULT_OTA_CACHE_SIZE 2 * 1024 |
| #define | CONFIG_ZWAVE_POLL_ATTRIBUTE_LIST CONFIG_ZWAVE_POLL_ATTRIBUTE_LIST_DIR "/zwave_poll_config.yaml" |
| #define | ZPC_SERIAL "zpc.serial" |
| #define | ZPC_RF_REGION "zpc.rf_region" |
| #define | ZPC_MANUFACTURER_ID "zpc.manufacturer_id" |
| #define | ZPC_PRODUCT_TYPE "zpc.product_type" |
| #define | ZPC_PRODUCT_ID "zpc.product_id" |
| #define | ZPC_DEVICE_ID "zpc.device_id" |
| #define | ZPC_NORMAL_TX_POWER_DBM "zpc.normal_tx_power_dbm" |
| #define | ZPC_MEASURED_0DBM_POWER "zpc.measured_0dbm_power" |
| #define | ZPC_MAX_LR_TX_POWER_DBM "zpc.max_lr_tx_power_dbm" |
| #define | ZPC_SERIAL_LOG_FILE "zpc.serial_log_file" |
| #define | ZPC_ACCEPTED_TRANSMIT_FAILURE "zpc.accepted_transmit_failure" |
| #define | ZPC_HARDWARE_VERSION "zpc.hardware_version" |
| #define | ZPC_DEFAULT_WAKE_UP_INTERVAL "zpc.default_wake_up_interval" |
| #define | ZPC_MISSING_WAKE_UP_NOTIFICATION "zpc.missing_wake_up_notification" |
| #define | ZPC_INCLUSION_PROTOCOL_PREFERENCE "zpc.inclusion_protocol_preference" |
| #define | ZPC_OTA_CACHE_PATH "zpc.ota.cache_path" |
| #define | ZPC_OTA_CACHE_SIZE "zpc.ota.cache_size" |
| #define | ZPC_CONFIG_NCP_VERSION "zpc.ncp_version" |
| #define | ZPC_CONFIG_NCP_UPDATE "zpc.ncp_update" |
| #define | ZPC_POLL_ATTRIBUTE_LIST_FILE "zpc.poll.attribute_list_file" |
| #define | ZPC_POLL_BACKOFF "zpc.poll.backoff" |
| #define | ZPC_POLL_DEFAULT_INTERVAL "zpc.poll.default_interval" |
| #define | ZPC_BASIC_DEVICE_TYPE "zpc.device_type.basic" |
| #define | ZPC_GENERIC_DEVICE_TYPE "zpc.device_type.generic" |
| #define | ZPC_SPECIFIC_DEVICE_TYPE "zpc.device_type.specific" |
Functions | |
| int | zpc_config_init () |
| Register ZPC configurations in config. More... | |
| sl_status_t | is_hex_string (const char *str) |
| static int | config_get_int_safe (const char *key) |
| sl_status_t | zpc_config_fixt_setup () |
| Fixture for setting up the zpc_config component. More... | |
| const zpc_config_t * | zpc_get_config () |
| Get the current configuration. This must only be called after zpc_config_init. More... | |
Variables | |
| static zpc_config_t | config |
| #define CONFIG_ZWAVE_POLL_ATTRIBUTE_LIST CONFIG_ZWAVE_POLL_ATTRIBUTE_LIST_DIR "/zwave_poll_config.yaml" |
| #define DEFAULT_HARDWARE_VERSION 1 |
| #define DEFAULT_INCLUSION_PROTOCOL_PREFERENCE "1,2" |
| #define DEFAULT_MANUFACTURER_ID 0x0000 |
| #define DEFAULT_NUMBER_OF_ACCEPTED_FRAME_TRANSMISSION_ERROR 2 |
| #define DEFAULT_NUMBER_OF_MISSING_WAKE_UP_NOTIFICATION 2 |
| #define DEFAULT_OTA_CACHE_PATH UIC_VAR_DIR "/zpc/ota_cache" |
| #define DEFAULT_OTA_CACHE_SIZE 2 * 1024 |
| #define DEFAULT_PRODUCT_ID 0x0001 |
| #define DEFAULT_PRODUCT_TYPE 0x0005 |
| #define DEFAULT_SERIAL_PORT "/dev/ttyUSB0" |
| #define DEFAULT_WAKE_UP_INTERVAL 4200 |
| #define DEFAULT_ZWAVE_MAX_LR_TX_POWER_DBM 0 |
| #define DEFAULT_ZWAVE_MEASURED_0DBM_POWER 0 |
| #define DEFAULT_ZWAVE_NORMAL_TX_POWER_DBM 0 |
| #define DEFAULT_ZWAVE_RF_REGION "EU" |
| #define LOG_TAG "zpc_config" |
| #define ZPC_ACCEPTED_TRANSMIT_FAILURE "zpc.accepted_transmit_failure" |
| #define ZPC_BASIC_DEVICE_TYPE "zpc.device_type.basic" |
| #define ZPC_CONFIG_NCP_UPDATE "zpc.ncp_update" |
| #define ZPC_CONFIG_NCP_VERSION "zpc.ncp_version" |
| #define ZPC_DEFAULT_WAKE_UP_INTERVAL "zpc.default_wake_up_interval" |
| #define ZPC_DEVICE_ID "zpc.device_id" |
| #define ZPC_GENERIC_DEVICE_TYPE "zpc.device_type.generic" |
| #define ZPC_HARDWARE_VERSION "zpc.hardware_version" |
| #define ZPC_INCLUSION_PROTOCOL_PREFERENCE "zpc.inclusion_protocol_preference" |
| #define ZPC_MANUFACTURER_ID "zpc.manufacturer_id" |
| #define ZPC_MAX_LR_TX_POWER_DBM "zpc.max_lr_tx_power_dbm" |
| #define ZPC_MEASURED_0DBM_POWER "zpc.measured_0dbm_power" |
| #define ZPC_MISSING_WAKE_UP_NOTIFICATION "zpc.missing_wake_up_notification" |
| #define ZPC_NORMAL_TX_POWER_DBM "zpc.normal_tx_power_dbm" |
| #define ZPC_OTA_CACHE_PATH "zpc.ota.cache_path" |
| #define ZPC_OTA_CACHE_SIZE "zpc.ota.cache_size" |
| #define ZPC_POLL_ATTRIBUTE_LIST_FILE "zpc.poll.attribute_list_file" |
| #define ZPC_POLL_BACKOFF "zpc.poll.backoff" |
| #define ZPC_POLL_DEFAULT_INTERVAL "zpc.poll.default_interval" |
| #define ZPC_PRODUCT_ID "zpc.product_id" |
| #define ZPC_PRODUCT_TYPE "zpc.product_type" |
| #define ZPC_RF_REGION "zpc.rf_region" |
| #define ZPC_SERIAL "zpc.serial" |
| #define ZPC_SERIAL_LOG_FILE "zpc.serial_log_file" |
| #define ZPC_SPECIFIC_DEVICE_TYPE "zpc.device_type.specific" |
|
static |
| sl_status_t is_hex_string | ( | const char * | str | ) |
|
static |