prototype webapi to get info, improved pwr limit

This commit is contained in:
Andreas Schiffler 2022-08-07 17:27:50 +02:00
parent c915e44557
commit 028aedb788
6 changed files with 188 additions and 99 deletions

View file

@ -30,6 +30,43 @@ typedef struct {
uint8_t packet[MAX_RF_PAYLOAD_SIZE];
} packet_t;
typedef enum
{
InverterDevInform_Simple = 0, // 0x00
InverterDevInform_All = 1, // 0x01
//GridOnProFilePara = 2, // 0x02
//HardWareConfig = 3, // 0x03
//SimpleCalibrationPara = 4, // 0x04
//SystemConfigPara = 5, // 0x05
RealTimeRunData_Debug = 11, // 0x0b
//RealTimeRunData_Reality = 12, // 0x0c
//RealTimeRunData_A_Phase = 13, // 0x0d
//RealTimeRunData_B_Phase = 14, // 0x0e
//RealTimeRunData_C_Phase = 15, // 0x0f
//AlarmData = 17, // 0x11 //Alarm data - all unsent alarms
//AlarmUpdate = 18, // 0x12 //Alarm data - all pending alarms
//RecordData = 19, // 0x13
//InternalData = 20, // 0x14
GetLossRate = 21, // 0x15
//GetSelfCheckState = 30, // 0x1e
//InitDataState = 0xff
} InfoCmdType;
typedef enum
{
TurnOn = 0, // 0x00
TurnOff = 1, // 0x01
Restart = 2, // 0x02
Lock = 3, // 0x03
Unlock = 4, // 0x04
ActivePowerContr = 11, // 0x0b
ReactivePowerContr = 12, // 0x0c
PFSet = 13, // 0x0d
CleanState_LockAndAlarm = 20, // 0x14
SelfInspection = 40, // 0x28 // self-inspection of grid-connected protection files
Init = 0xff
} DevControlCmdType;
// minimum serial interval
#define MIN_SERIAL_INTERVAL 5