Add map
This commit is contained in:
parent
70dce23d1d
commit
dba4e936e5
3361
docs/PowerLogic-PM8000/PM8000_Modbus_Map.csv
Normal file
3361
docs/PowerLogic-PM8000/PM8000_Modbus_Map.csv
Normal file
File diff suppressed because it is too large
Load Diff
30
docs/PowerLogic-PM8000/buildregmap.py
Normal file
30
docs/PowerLogic-PM8000/buildregmap.py
Normal 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]))
|
||||||
|
|
||||||
|
#
|
||||||
|
|
0
firmware/testing/rs485/pm8000.reg.h
Normal file
0
firmware/testing/rs485/pm8000.reg.h
Normal file
Loading…
Reference in New Issue
Block a user