This commit is contained in:
Warky 2024-09-16 14:00:18 +02:00
parent 70dce23d1d
commit dba4e936e5
3 changed files with 3391 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
import csv
print("Exporter")
file = open("PM8000_Modbus_Map.csv", "r")
data = list(csv.reader(file, delimiter=","))
file.close()
header = """
typedef struct
{
uint16_t address;
uint16_t size;
char* type[];
char* name[];
} pm8000_reg_map_t;
pm8000_reg_map_t pm8000_reg_map[] = {
};
"""
for d in range(1, len(data)):
if not data[d][1].isnumeric():
continue
print("{} @ {}:{} ({}) Tag: {}".format(data[d][0], data[d][1] ,data[d][2] ,data[d][3],data[d][7]))
#

View File