Z-Wave Protocol Controller Reference
zpc_config.h
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
29#if !defined(ZPC_CONFIG_H)
30#define ZPC_CONFIG_H
31
32// Generic includes
33#include <stdint.h>
34#include <stdbool.h>
35// Unify includes
36#include "uic_version.h"
37
38// Inclusion protocol preference values
40#define ZWAVE_CONFIG_REPRESENTATION "1"
42#define ZWAVE_LONG_RANGE_CONFIG_REPRESENTATION "2"
43
44// Default setting for the zpc.datastore_file.
45#define DEFAULT_ZPC_DATASTORE_FILE UIC_VAR_DIR "/zpc.db"
46// Config key for the ZPC datastore file
47#define CONFIG_KEY_ZPC_DATASTORE_FILE "zpc.datastore_file"
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53typedef struct {
55 const char *mqtt_host;
57 const char *mqtt_cafile;
59 const char *mqtt_certfile;
61 const char *mqtt_keyfile;
63 const char *mqtt_client_id;
65 const char *mqtt_client_psk;
69 const char *datastore_file;
71 const char *serial_port;
73 const char *serial_log_file;
75 // "EU", "US","ANZ", HK", "IN", "IL", "RU", "CN", "JP", "KR"
76 const char *zwave_rf_region;
87 uint16_t product_type;
88 uint16_t product_id;
89 const char *device_id;
99 const char *ota_cache_path;
102
107
110 // Z-Wave Basic Device Type
117
123
131int zpc_config_init();
132
133#ifdef __cplusplus
134}
135#endif
136
139#endif // ZPC_CONFIG_H
int zpc_config_init()
Register ZPC configurations in config.
Definition: zpc_config.c:87
const zpc_config_t * zpc_get_config()
Get the current configuration. This must only be called after zpc_config_init.
Definition: zpc_config.c:352
Definition: zpc_config.h:53
const char * mqtt_host
Hostname of the MQTT broker.
Definition: zpc_config.h:55
uint8_t accepted_transmit_failure
Prioritized list of protocols to use for SmartStart inclusions.
Definition: zpc_config.h:95
const char * mqtt_keyfile
Path to a file containing the PEM encoded unencrypted private key for this client.
Definition: zpc_config.h:61
uint8_t zpc_generic_device_type
Z-Wave Generic Device Type.
Definition: zpc_config.h:113
const char * inclusion_protocol_preference
OTA cache path, writable location where we can cache OTA images.
Definition: zpc_config.h:97
const char * serial_log_file
If set the Serial log will be written here.
Definition: zpc_config.h:73
int zwave_max_lr_tx_power_dbm
Max Z-Wave Long Range Transmit power.
Definition: zpc_config.h:83
bool ncp_version
Definition: zpc_config.h:104
int mqtt_port
Port of the MQTT broker.
Definition: zpc_config.h:67
int ota_cache_size
Should we return the NCP version and exit?
Definition: zpc_config.h:101
uint16_t product_type
Definition: zpc_config.h:87
uint16_t product_id
Definition: zpc_config.h:88
const char * device_id
hardware version of the device where ZPC is running on.
Definition: zpc_config.h:89
const char * mqtt_client_id
Client ID for MQTT Client for TLS Authentication and encryption.
Definition: zpc_config.h:63
const char * ncp_update_filename
If not zero length we should flash the NCP firmware and exit.
Definition: zpc_config.h:106
const char * serial_port
Name of the serial port of the Z-Wave module.
Definition: zpc_config.h:71
int zwave_normal_tx_power_dbm
Transmit power for the Z-Wave module. Refer to zwave_rx_init.
Definition: zpc_config.h:78
int default_wake_up_interval
Definition: zpc_config.h:85
const char * mqtt_certfile
Path to a file containing the PEM encoded certificate file for this client.
Definition: zpc_config.h:59
const char * mqtt_client_psk
Pre shared Key for MQTT Client for TLS Authentication and encryption.
Definition: zpc_config.h:65
int zwave_measured_0dbm_power
Definition: zpc_config.h:81
const char * ota_cache_path
OTA cache size in kb.
Definition: zpc_config.h:99
uint8_t zpc_specific_device_type
Z-Wave Specific Device Type.
Definition: zpc_config.h:115
uint16_t manufacturer_id
Definition: zpc_config.h:86
uint8_t missing_wake_up_notification
This value represents a maximum number of accepted frame transmission failure.
Definition: zpc_config.h:93
uint8_t zpc_basic_device_type
Definition: zpc_config.h:111
const char * mqtt_cafile
Path to a file containing the PEM encoded trusted CA certificate files.
Definition: zpc_config.h:57
const char * datastore_file
File name for persistent storage.
Definition: zpc_config.h:69
int hardware_version
This value represents a maximum number of missing wake up periods.
Definition: zpc_config.h:91
const char * zwave_rf_region
Z-Wave RF Region setting. It can be one of the following:
Definition: zpc_config.h:76