Clean up HanToJson library and per meter header files

This commit is contained in:
Vegar Westerlund
2019-06-07 23:33:54 +02:00
parent 605eac8996
commit 711500a581
4 changed files with 150 additions and 239 deletions

View File

@@ -6,10 +6,11 @@
enum class Aidon
{
List1 = 0x01,
List21 = 0x09,
List2 = 0x0D,
List3 = 0x12
List1 = 0x01,
List1PhaseShort = 0x09,
List1PhaseLong = 0xff, // TODO: Need sample
List3PhaseShort = 0x0D,
List3PhaseLong = 0x12
};
enum class Aidon_List1
@@ -24,7 +25,7 @@ enum class Aidon_List1
};
enum class Aidon_List2
enum class Aidon_List1Phase
{
ListSize,
IGN_0,
@@ -67,38 +68,14 @@ enum class Aidon_List2
CurrentL1Int8,
CurrentL1Enum,
IGN_13,
CurrentL2_OBIS,
CurrentL2,
IGN_14,
CurrentL2Int8,
CurrentL2Enum,
IGN_15,
CurrentL3_OBIS,
CurrentL3,
IGN_16,
CurrentL3Int8,
CurrentL3Enum,
IGN_17,
VoltageL1_OBIS,
VoltageL1,
IGN_18,
IGN_14,
VoltageL1Int8,
VoltageL1Enum,
IGN_19,
VoltageL2_OBIS,
VoltageL2,
IGN_20,
VoltageL2Int8,
VoltageL2Enum,
IGN_21,
VoltageL3_OBIS,
VoltageL3,
IGN_22,
VoltageL3Int8,
VoltageL3Enum
};
enum class Aidon_List3
enum class Aidon_List3Phase
{
ListSize,
IGN_0,

View File

@@ -2,11 +2,11 @@
#define _KAIFA_h
enum class Kaifa : byte {
List1 = 0x01,
List21 = 0x09, // list 2 for 1 fase
List2 = 0x0D, // list 2 for 3 fase
List31 = 0x0E, // list 3 for 1 fase
List3 = 0x12 // list 3 for 3 fase
List1 = 0x01,
List1PhaseShort = 0x09,
List3PhaseShort = 0x0D,
List1PhaseLong = 0x0E,
List3PhaseLong = 0x12
};
enum class Kaifa_List1 {
@@ -14,55 +14,7 @@ enum class Kaifa_List1 {
ActivePowerImported
};
enum class Kaifa_List21 {
ListSize,
ListVersionIdentifier,
MeterID,
MeterType,
ActiveImportPower,
ActiveExportPower,
ReactiveImportPower,
ReactiveExportPower,
CurrentL1,
VoltageL1
};
enum class Kaifa_List2 {
ListSize,
ListVersionIdentifier,
MeterID,
MeterType,
ActiveImportPower,
ActiveExportPower,
ReactiveImportPower,
ReactiveExportPower,
CurrentL1,
CurrentL2,
CurrentL3,
VoltageL1,
VoltageL2,
VoltageL3
};
enum class Kaifa_List31 {
ListSize,
ListVersionIdentifier,
MeterID,
MeterType,
ActiveImportPower,
ActiveExportPower,
ReactiveImportPower,
ReactiveExportPower,
CurrentL1,
VoltageL1,
MeterClock,
CumulativeActiveImportEnergy,
CumulativeActiveExportEnergy,
CumulativeReactiveImportEnergy,
CumulativeReactiveExportEnergy
};
enum class Kaifa_List3 {
enum class Kaifa_List3Phase {
ListSize,
ListVersionIdentifier,
MeterID,
@@ -84,7 +36,7 @@ enum class Kaifa_List3 {
CumulativeReactiveExportEnergy
};
enum class Kaifa_List4 { // TODO: Stop using list size like this? Only really need a single long list.
enum class Kaifa_List1Phase {
ListSize,
ListVersionIdentifier,
MeterID,
@@ -94,7 +46,12 @@ enum class Kaifa_List4 { // TODO: Stop using list size like this? Only really ne
ReactiveImportPower,
ReactiveExportPower,
CurrentL1,
CurrentL2,
VoltageL1,
MeterClock,
CumulativeActiveImportEnergy,
CumulativeActiveExportEnergy,
CumulativeReactiveImportEnergy,
CumulativeReactiveExportEnergy
};
#endif

View File

@@ -6,44 +6,13 @@
enum class Kamstrup
{
List1 = 0x19,
List2 = 0x23,
List3 = 0x11,
List4 = 0x1B
List3PhaseShort = 0x19,
List3PhaseLong = 0x23,
List1PhaseShort = 0x11,
List1PhaseLong = 0x1B
};
enum class Kamstrup_List1
{
ListSize,
ListVersionIdentifier,
MeterID_OBIS,
MeterID,
MeterType_OBIS,
MeterType,
ActiveImportPower_OBIS,
ActiveImportPower,
ActiveExportPower_OBIS,
ActiveExportPower,
ReactiveImportPower_OBIS,
ReactiveImportPower,
ReactiveExportPower_OBIS,
ReactiveExportPower,
CurrentL1_OBIS,
CurrentL1,
CurrentL2_OBIS,
CurrentL2,
CurrentL3_OBIS,
CurrentL3,
VoltageL1_OBIS,
VoltageL1,
VoltageL2_OBIS,
VoltageL2,
VoltageL3_OBIS,
VoltageL3
};
enum class Kamstrup_List2
enum class Kamstrup_List3Phase
{
ListSize,
ListVersionIdentifier,
@@ -83,29 +52,7 @@ enum class Kamstrup_List2
CumulativeReactiveExportEnergy
};
enum class Kamstrup_List3
{
ListSize,
ListVersionIdentifier,
MeterID_OBIS,
MeterID,
MeterType_OBIS,
MeterType,
ActiveImportPower_OBIS,
ActiveImportPower,
ActiveExportPower_OBIS,
ActiveExportPower,
ReactiveImportPower_OBIS,
ReactiveImportPower,
ReactiveExportPower_OBIS,
ReactiveExportPower,
CurrentL1_OBIS,
CurrentL1,
VoltageL1_OBIS,
VoltageL1
};
enum class Kamstrup_List4
enum class Kamstrup_List1Phase
{
ListSize,
ListVersionIdentifier,