#ifndef __PCU_PORT_H__
#define __PCU_PORT_H__
#include <stdio.h>
#include <stdint.h>
#include "ccu_define.h"


typedef enum pcu_request_mode
{
    POWER_REQUEST_PLACE_FREE = 0,
    POWER_REQUEST_PLACE_HOLD,
    POWER_REQUEST_INSULATION,
    POWER_REQUEST_CONST_VOLTAGE,
    POWER_REQUEST_CONST_CURRENT,
    POWER_REQUEST_SHUTDOWN
}pcu_request_mode_t;

typedef struct pcu_port
{
    void *priv;
    void (*update_GUN_type)(void *self, gun_type_t type);
    void (*update_GUN_error_state)(void *self, uint32_t error, uint32_t state);
    void (*update_K1K2_state)(void *self, int K1, int K2);
    void (*update_ElecLock_state)(void *self, int state);
    void (*update_K1K2_voltate)(void *self, float voltage);
    void (*update_Meter_EnergyPower)(void *self, float energy, float power);
    void (*update_Meter_VoltageCurrent)(void *self, float voltage, float current);

    void (*update_EV_BatteryPower)(void *self, float voltage);

    void (*set_GUNLine_PermittedVoltageCurrent)(void *self, float maxI);
    void (*get_PCU_maxVoltageCurrent)(void *self, float *maxV, float *maxI);
    void (*get_PCU_minVoltageCurrent)(void *self, float *minV, float *minI);
    void (*get_PCU_maxPermittedPower)(void *self, float *power);

    void (*request_Power)(void* self, pcu_request_mode_t mode, float voltage, float current);

} pcu_port_t;



#endif//__PCU_PORT_H__
