OpenDTU-old/include
Bernhard Kirchen 68783b450f
Messages: thread-safety and dynamic memory (#418)
* thread-safety and dynamic memory for MessageOutput

* use dynamic memory to allow handling of arbitrary message lenghts.
* keep a message buffer for every task so no task ever mangles the
  message of another task.
* every complete line is written to the serial console and moved to
  a line buffer for sending them through the websocket.
* the websocket is always fed complete lines.
* make sure to feed only as many lines as possible to the websocket
  handler, so that no lines are dropped.
* lock all MessageOutput state against concurrent access.

* MessageOutput: respect HardwareSerial buffer size

the MessageOutput class buffers whole lines of output printed by any
task in order to avoid mangling of text. that means we hand over full
lines to the HardwareSerial instance, which might be too much in one
call to write(buffer, size). we now check the return value of
write(buffer, size) and call the function again with the part of the
message that could not yet be written by HardwareSerial.
2023-09-04 14:08:30 +02:00
..
Battery.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00
BatteryStats.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00
Configuration.h VE.Direct: Reset state machine on timeout, fix and extend logging (#416) 2023-09-04 14:07:48 +02:00
Datastore.h Use lock_guard to simplify code 2023-08-05 01:25:53 +02:00
defaults.h VE.Direct: Reset state machine on timeout, fix and extend logging (#416) 2023-09-04 14:07:48 +02:00
Display_Graphic.h Feature: Turn off Display before reboot 2023-08-25 16:57:24 +02:00
helper.h Change License to GPLv2 as the RF24 lib uses GPL-2.0-only 2022-07-15 18:05:58 +02:00
HttpPowerMeter.h feature: add digest auth on power meter 2023-07-04 11:54:46 +02:00
Huawei_can.h Dynamic power control and more power control modes on the Huawei PSU 2023-07-01 12:37:55 +02:00
InverterSettings.h Added settings to pause polling/sending commands in general and at night 2023-02-18 19:44:16 +01:00
JkBmsController.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00
JkBmsDataPoints.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00
JkBmsSerialMessage.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00
Led_Single.h Feature: Turn off LEDs before reboot 2023-08-25 13:15:55 +02:00
MessageOutput.h Messages: thread-safety and dynamic memory (#418) 2023-09-04 14:08:30 +02:00
MqttHandleDtu.h Cleanup includes 2022-12-14 22:13:03 +01:00
MqttHandleHass.h Rename FLD_PRA to FLD_Q 2023-04-24 22:29:59 +02:00
MqttHandleHuawei.h Adding Huawei CAN interface, web-api, websocket and Mqtt extensions to access the data 2023-03-24 10:03:22 +01:00
MqttHandleInverter.h Rename FLD_PRA to FLD_Q 2023-04-24 22:29:59 +02:00
MqttHandleInverterTotal.h Feature: Implemented MQTT publishing of total values 2023-04-24 18:51:30 +02:00
MqttHandlePowerLimiter.h Fix DPL Mode 2 MQTT Status (#402) 2023-08-28 13:20:56 +02:00
MqttHandlePylontechHass.h Feature: add nice Icons for HA autoconfiguration (#413) 2023-09-04 14:07:24 +02:00
MqttHandleVedirect.h fix: Home Assistant MQTT-Auto-Discovery with VE.Direct (#297) 2023-07-09 17:08:50 +02:00
MqttHandleVedirectHass.h Feature: add nice Icons for HA autoconfiguration (#413) 2023-09-04 14:07:24 +02:00
MqttSettings.h Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-08-04 12:21:16 +02:00
NetworkSettings.h Feature: Admin AccessPoint Timeout now configurable 2023-07-22 18:14:07 +02:00
NtpSettings.h Cleanup includes 2022-12-14 22:13:03 +01:00
PinMapping.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00
PowerLimiter.h Fix DPL Mode 2 MQTT Status (#402) 2023-08-28 13:20:56 +02:00
PowerMeter.h PowerMeter fixes (#342) 2023-07-31 14:16:06 +02:00
PylontechCanReceiver.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00
README Initial commit 2022-04-09 11:05:14 +02:00
SunPosition.h Fix: If no sunset/sunrise calculation is possible a wrong value is shown 2023-06-01 18:39:50 +02:00
Utils.h Move different restart calls into one method 2023-08-25 12:58:53 +02:00
WebApi_battery.h initial merge of power_limiter * missing is inverter and channel setting in gui 2023-02-20 15:56:02 +01:00
WebApi_config.h webapp: Allow download of individual config files 2023-01-05 01:44:38 +01:00
WebApi_device.h Added Device Profiles 2023-01-16 21:09:24 +01:00
WebApi_devinfo.h Added small dialog to show inverter info (firmware version etc.) 2022-08-11 16:42:50 +02:00
WebApi_dtu.h Change License to GPLv2 as the RF24 lib uses GPL-2.0-only 2022-07-15 18:05:58 +02:00
WebApi_errors.h Feature: Admin AccessPoint Timeout now configurable 2023-07-22 18:14:07 +02:00
WebApi_eventlog.h Change License to GPLv2 as the RF24 lib uses GPL-2.0-only 2022-07-15 18:05:58 +02:00
WebApi_firmware.h Change License to GPLv2 as the RF24 lib uses GPL-2.0-only 2022-07-15 18:05:58 +02:00
WebApi_Huawei.h Adding enable/disable option and pin to control a switch/relais to power the Huawei PSU 2023-03-26 11:00:37 +02:00
WebApi_inverter.h Feature: Allow reordering of the inverters in the live view 2023-05-29 20:17:07 +02:00
WebApi_limit.h Added web api to set limit 2022-09-30 18:34:30 +02:00
WebApi_maintenance.h Added device reboot functionality 2022-11-21 23:29:57 +01:00
WebApi_mqtt.h src/WebApi_mqtt.cpp: rename function getRootCaCertInfo 2023-04-12 08:47:24 +02:00
WebApi_network.h Change License to GPLv2 as the RF24 lib uses GPL-2.0-only 2022-07-15 18:05:58 +02:00
WebApi_ntp.h Added API to set and get the current time 2022-09-20 19:44:24 +02:00
WebApi_power.h Implemented WebAPI to get status of last power command 2022-10-04 18:48:21 +02:00
WebApi_powerlimiter.h initial merge of power_limiter * missing is inverter and channel setting in gui 2023-02-20 15:56:02 +01:00
WebApi_powermeter.h New Power meter support: HTTP(S) + JSON (Shelly 3EM, Tasmota, Volkszähler etc.) (#153) 2023-04-03 21:36:20 +02:00
WebApi_prometheus.h Prometheus Endpoint: Simplify code by looping over fields instead of duplicated code 2023-08-22 13:00:52 +02:00
WebApi_security.h Introduce configuration option to decide wether the web ui is accessable without password or not 2022-11-22 23:32:52 +01:00
WebApi_sysstatus.h Change License to GPLv2 as the RF24 lib uses GPL-2.0-only 2022-07-15 18:05:58 +02:00
WebApi_vedirect.h Password protection for vedirect settings API 2022-11-19 14:34:59 +01:00
WebApi_webapp.h Change License to GPLv2 as the RF24 lib uses GPL-2.0-only 2022-07-15 18:05:58 +02:00
WebApi_ws_battery.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00
WebApi_ws_console.h Added websocket for debug output 2022-12-19 21:38:39 +01:00
WebApi_ws_Huawei.h Adding Huawei CAN interface, web-api, websocket and Mqtt extensions to access the data 2023-03-24 10:03:22 +01:00
WebApi_ws_live.h BREAKING CHANGE: Prometheus API! 2023-02-06 19:51:10 +01:00
WebApi_ws_vedirect_live.h VE.Direct: websocket and status API response size (#371) 2023-08-10 13:40:09 +02:00
WebApi.h Support for Jikong JK BMS using serial connection (#319) 2023-08-31 16:21:32 +02:00

This directory is intended for project header files.

A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.

```src/main.c

#include "header.h"

int main (void)
{
 ...
}
```

Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.

In C, the usual convention is to give header files names that end with `.h'.
It is most portable to use only letters, digits, dashes, and underscores in
header file names, and at most one dot.

Read more about using header files in official GCC documentation:

* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes

https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html