SP8EBC-ParaTNC/include/etc/kiss_did_configuration.h

102 wiersze
4.7 KiB
C

2023-06-27 20:49:35 +00:00
/*
* kiss_did_configuration.h
*
* Configuration of all DIDs with theirs data source. There are separate
* definitions for DIDs which return strings and numeric values
*
*
* DID subsystem consist of three files:
* kiss_xmacro_helpers.h - files with macros used for expanding config
* kiss_did_configuration.h - definitions which DID return what data
* kiss_did.c - implementation of arrays with content definition and
* function which are responsible for returning raw
* binary data basing on configuration
*
* Created on: Jun 21, 2023
* Author: mateusz
*/
#ifndef KISS_DID_CONFIGURATION_H_
#define KISS_DID_CONFIGURATION_H_
2024-05-26 19:03:16 +00:00
#include "kiss_communication/types/kiss_xmacro_helpers.h"
2024-05-26 06:05:56 +00:00
#include "rte_main.h"
2023-06-27 20:49:35 +00:00
#include "rte_wx.h"
2023-07-12 12:09:03 +00:00
#include "main_master_time.h"
#include "main.h"
#include "aprsis.h"
2023-07-12 12:09:03 +00:00
#include "gsm/sim800c.h"
2024-05-26 06:05:56 +00:00
#include "packet_tx_handler.h"
#include <stored_configuration_nvm/config_data_externs.h>
#include "software_version.h"
2023-06-27 20:49:35 +00:00
2023-06-29 17:00:12 +00:00
//!< Dummy variable used only as end of definition marker in tables
extern char did_dummy_data;
//!< Definition of all DIDs with theirs source data for PARAMETEO platform
#if defined(PARAMETEO)
2023-07-12 12:09:03 +00:00
#define DIDS_STRING(ENTRY) \
ENTRY(0x1500U, gsm_sim800_registered_network) \
ENTRY(0x1501U, gsm_sim800_simcard_status_string) \
ENTRY(0x1502U, gsm_sim800_cellid) \
ENTRY(0x1503U, gsm_sim800_lac) \
2023-11-26 08:06:57 +00:00
ENTRY(0x5555U, main_test_string) \
2023-07-12 12:09:03 +00:00
#define DIDS_FLOAT(ENTRY) \
2023-07-14 20:37:25 +00:00
ENTRY(0x2000U, rte_wx_temperature_average_external_valid, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2001U, rte_wx_temperature_internal_valid, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2002U, rte_wx_pressure_history[0], rte_wx_pressure_history[1], rte_wx_pressure_history[2]) \
ENTRY(0x1505U, gsm_sim800_signal_level_dbm, DID_EMPTY, DID_EMPTY) \
2023-11-26 08:06:57 +00:00
ENTRY(0x2222U, main_test_float, DID_EMPTY, DID_EMPTY) \
2023-07-12 12:09:03 +00:00
2023-06-29 17:00:12 +00:00
#define DIDS_NUMERIC(ENTRY) \
2023-07-14 20:37:25 +00:00
ENTRY(0x1000U, master_time, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1001U, rx10m, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1002U, tx10m, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1003U, digi10m, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1004U, digidrop10m, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1100U, rte_main_battery_voltage, rte_main_average_battery_voltage, DID_EMPTY) \
ENTRY(0x2003U, rte_wx_temperature_average_dallas, rte_wx_temperature_average_pt, rte_wx_temperature_average_internal) \
ENTRY(0x2004U, rte_wx_average_winddirection, rte_wx_average_windspeed, rte_wx_max_windspeed) \
ENTRY(0x2005U, rte_wx_windspeed[0], rte_wx_windspeed[1], rte_wx_windspeed[2]) \
ENTRY(0x2006U, rte_wx_winddirection[0], rte_wx_winddirection[1], rte_wx_winddirection[2]) \
ENTRY(0x2007U, rte_wx_humidity, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2008U, rte_wx_humidity, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2009U, rte_wx_analog_anemometer_counter_timer_has_been_fired, rte_wx_analog_anemometer_counter_slew_limit_fired, rte_wx_analog_anemometer_counter_direction_doesnt_work) \
ENTRY(0x2100U, aprsis_logged, aprsis_connected, aprsis_unsucessfull_conn_counter) \
2024-05-26 06:05:56 +00:00
ENTRY(0x2200U, packet_tx_beacon_counter, packet_tx_meteo_counter, packet_tx_telemetry_counter) \
ENTRY(0x2201U, packet_tx_beacon_interval, packet_tx_meteo_interval, packet_tx_telemetry_interval) \
2023-07-14 20:37:25 +00:00
ENTRY(0x1504U, gsm_sim800_signal_level_dbm, DID_EMPTY, DID_EMPTY) \
ENTRY(0xF000U, config_running_pgm_counter, DID_EMPTY, DID_EMPTY) \
2023-07-14 20:37:25 +00:00
ENTRY(0xFFFFU, did_dummy_data, did_dummy_data, did_dummy_data)
2023-06-29 17:00:12 +00:00
#endif
//!< Definition of all DIDs with theirs source data for PARATNC platform
#if defined (PARATNC)
#define DIDS_STRING(ENTRY) \
ENTRY(0xFD01U, software_version_str) \
#define DIDS_FLOAT(ENTRY) \
ENTRY(0x2000U, rte_wx_temperature_average_external_valid, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2001U, rte_wx_temperature_internal_valid, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2002U, rte_wx_pressure_history[0], rte_wx_pressure_history[1], rte_wx_pressure_history[2]) \
2023-06-29 17:00:12 +00:00
#define DIDS_NUMERIC(ENTRY) \
2024-05-26 06:05:56 +00:00
ENTRY(0x1000U, master_time, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1001U, rx10m, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1002U, tx10m, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1003U, digi10m, DID_EMPTY, DID_EMPTY) \
ENTRY(0x1004U, digidrop10m, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2004U, rte_wx_average_winddirection, rte_wx_average_windspeed, rte_wx_max_windspeed) \
ENTRY(0x2005U, rte_wx_windspeed[0], rte_wx_windspeed[1], rte_wx_windspeed[2]) \
ENTRY(0x2006U, rte_wx_winddirection[0], rte_wx_winddirection[1], rte_wx_winddirection[2]) \
ENTRY(0x2007U, rte_wx_humidity, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2008U, rte_wx_humidity, DID_EMPTY, DID_EMPTY) \
ENTRY(0x2200U, packet_tx_beacon_counter, packet_tx_meteo_counter, packet_tx_telemetry_counter) \
ENTRY(0x2201U, packet_tx_beacon_interval, packet_tx_meteo_interval, packet_tx_telemetry_interval) \
ENTRY(0xFFFFU, did_dummy_data, did_dummy_data, did_dummy_data) \
2023-06-29 17:00:12 +00:00
#endif
2023-06-27 20:49:35 +00:00
#endif /* KISS_DID_CONFIGURATION_H_ */