Modbus RTU v1

This commit is contained in:
2026-06-11 16:51:52 -05:00
parent fe8acfbc2c
commit 254928cc18
1471 changed files with 39 additions and 171573 deletions

View File

@@ -7,9 +7,8 @@
#include "modbus_memory.h"
#define MODBUS_MAX_POINTS 384
#define MODBUS_MAX_NAME_LEN 32
#define MODBUS_MAX_NOTES_LEN 64
#define MODBUS_MAX_POINTS 384 /* Max amount of registers you allocate per device, base this on the highest register count, also the more you reserve the more memory you need*/
#define MODBUS_MAX_CSV_LINE_LEN 256
typedef enum
@@ -47,7 +46,6 @@ typedef struct modbus_point
uint32_t raw_address;
uint16_t offset;
char name[MODBUS_MAX_NAME_LEN];
modbus_data_type_t data_type;
uint8_t reg_span;
@@ -67,8 +65,6 @@ typedef struct modbus_point
uint16_t pics_words[4];
char notes[MODBUS_MAX_NOTES_LEN];
uint8_t bit_value;
uint16_t reg_value;
} modbus_point_t;
@@ -88,9 +84,6 @@ void modbus_points_reset(modbus_db_t *db);
bool modbus_points_load(modbus_db_t *db, const char *filename);
/* Lookup helpers */
const modbus_point_t *modbus_points_find_by_name(const modbus_db_t *db,
const char *name);
const modbus_point_t *modbus_points_find_by_type_offset(const modbus_db_t *db,
modbus_point_type_t type,
uint16_t offset);