zhang
7 天以前 12c3f4de5ce151b50e187066a3c105260523abb8
zy-acs-charge/src/main/java/com/zy/acs/charge/ChargeCoreService.java
@@ -1,5 +1,6 @@
package com.zy.acs.charge;
import com.ghgande.j2mod.modbus.facade.ModbusTCPMaster;
import com.zy.acs.charge.model.ChargerStatus;
/**
@@ -7,21 +8,80 @@
 */
public interface ChargeCoreService {
    boolean connect() throws Exception;
    /**
     * 调度开启充电
     *
     * @param client
     * @return
     */
    boolean startCharging(ModbusTCPMaster client);
    void disconnect();
    /**
     * 调度停止充电
     *
     * @param client
     * @return
     */
    boolean stopCharging(ModbusTCPMaster client);
    boolean isConnected();
    /**
     * 在线正继电器状态(前进到位)
     *
     * @param client
     * @return
     */
    boolean checkForwardRelayOnline(ModbusTCPMaster client);
    boolean startCharging() throws Exception;
    boolean stopCharging() throws Exception;
    /**
     * 离线正继电器状态(后退到位)
     *
     * @param client
     * @return
     */
    boolean checkBackwardRelayOffline(ModbusTCPMaster client);
    ChargerStatus getStatus() throws Exception;
    /**
     * 获取充电机充电电压
     *
     * @param client
     * @return
     */
    double getVoltage(ModbusTCPMaster client);
    boolean setVoltage(int voltageDecivolts) throws Exception;  // 单位0.1V
    /**
     * 获取充电机充电电流
     *
     * @param client
     * @return
     */
    double getCurrent(ModbusTCPMaster client);
    boolean setCurrent(int currentDecamperes) throws Exception; // 单位0.1A
    /**
     * 获取充电机充电模式
     * @param client
     * @return
     */
    int getChargeMode(ModbusTCPMaster client);
    /**
     * 获取充电机id
     *
     * @param client
     * @return
     */
    int getChargeId(ModbusTCPMaster client);
    /**
     * 获取充电机状态
     * @param client
     * @return
     */
    ChargerStatus getStatus(ModbusTCPMaster client);
    boolean clearFault() throws Exception;
    boolean clearFault(ModbusTCPMaster client);
    boolean finishRetract(ModbusTCPMaster client);
    boolean restoreStandby(ModbusTCPMaster client);
}