From 3aed59276c2b7275603f6da18377b77718948667 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Mon, 7 Jun 2021 01:40:32 +0300 Subject: wip --- src/protocol_17/types.h | 103 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 src/protocol_17/types.h (limited to 'src/protocol_17/types.h') diff --git a/src/protocol_17/types.h b/src/protocol_17/types.h new file mode 100644 index 0000000..daec2e1 --- /dev/null +++ b/src/protocol_17/types.h @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#ifndef INVERTER_TOOLS_P17_TYPES_H +#define INVERTER_TOOLS_P17_TYPES_H + +namespace p17 { + +enum class CommandType: int { + GetProtocolID = 0, + GetCurrentTime, + GetTotalGenerated, + GetYearGenerated, + GetMonthGenerated, + GetDayGenerated, + GetHourGenerated, + GetSeriesNumber, + GetCPUVersion, + GetSecondaryCPUVersion, + GetDeviceModel, + GetRatedInformation, + GetGeneralStatus, + GetPowerStatus, + GetWorkingMode, + GetWarningStatus, + GetFlags, + GetACInputVoltageRange, + GetACInputFrequencyRange, + GetMaximumGridOutputPower, + GetMaximumOutputPower, + GetSolarInputMPPTRange, + GetSolarInputVoltageRange, + GetLCDSleepTimeout, + GetDefaults, + GetBatterySettings, + GetMachineModel, + GetMachineAdjustableRanges, + GetFaults, + GetFaultsHistory, + GetEnergyControlStatus, + GetACInputLongTimeHighestAvgVoltage, + GetFirstGeneratedEnergySavedTime, + GetFeedWaitTime, + GetACChargingTimeBucket, + GetACLoadsSupplyTimeBucket, + GetFeedingGridPowerCalibration, + GetFeedInPowerFactor, + GetAutoAdjustPFWithPowerInformation, + GetAllowOneOfSTPhaseLossStatus, + SetLoads = 100, + SetFlag, + SetDateTime, + SetACInputHighestVoltageForFeedingPower, + SetACInputLowestVoltageForFeedingPower, + SetACInputHighestFrequencyForFeedingPower, + SetACInputLowestFrequencyForFeedingPower, + SetMaxOutputPower, + SetMaxFeedingGridPower, + SetSolarInputHighestVoltage, + SetSolarInputLowestVoltage, + SetSolarInputHighestMPPTVoltage, + SetSolarInputLowestMPPTVoltage, + SetLCDSleepTimeout, + SetBatteryMaxChargingCurrent, + SetBatteryMaxACChargingCurrent, + SetBatteryMaxChargingVoltage, + SetACInputLongTimeHighestAverageVoltage, + SetBatteryDischargingVoltage, + SetSolarEnergyDistributionOfPriority, + SetEnergyDistribution, + SetBatteryChargerApplicationInFloatingCharging, + SetMachineModel, + SetDefaults, + SetACOutputFreq, + SetACOutputRatedVoltage, + SetFeedWaitTime, + SetACChargingTimeBucket, + SetACLoadsSupplyTimeBucket, + SetBatteryType, + SetBatteryInstallTime, + SetLiFeBatterySelfTest, + SetACChargerKeepBatteryVoltageSetting, + SetBatteryTempSensorCompensation, + SetFeedingGridPowerCalibration, + SetBatteryMaxDischargingCurrentInHybridMode, + SetFeedInPowerFactor, + SetParallelOutput, + SetRPhaseFeedingGridPowerCalibration, // ??? + SetSPhaseFeedingGridPowerCalibration, // ??? + SetTPhaseFeedingGridPowerCalibration, // ??? + SetAutoAdjustPFWithPowerInformation, + SetAllowOneOfSTPhaseLoss, + SetEmergencyPowerSupplyControl, +}; + +struct Flag { + std::string flag; + char letter; + std::string description; +}; + +} + +#endif //INVERTER_TOOLS_P17_TYPES_H \ No newline at end of file -- cgit v1.2.3