package io.openems.edge.batteryinverter.kaco.blueplanetgridsave;

import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;

import io.openems.edge.batteryinverter.kaco.blueplanetgridsave.errorrestart.ErrorRestartBehaviourConfig;
import io.openems.edge.common.startstop.StartStopConfig;

@ObjectClassDefinition(//
		name = "Battery-Inverter KACO blueplanet gridsave", //
		description = "Implements the KACO blueplanet battery inverter.")
public @interface Config {

	@AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component")
	String id() default "batteryInverter0";

	@AttributeDefinition(name = "Alias", description = "Human-readable name of this Component; defaults to Component-ID")
	String alias() default "";

	@AttributeDefinition(name = "Is enabled?", description = "Is this Component enabled?")
	boolean enabled() default true;

	@AttributeDefinition(name = "Start/stop behaviour?", description = "Should this Component be forced to start or stop?")
	StartStopConfig startStop() default StartStopConfig.AUTO;

	@AttributeDefinition(name = "Activate watchdog", description = "Activate watchdog or not?")
	boolean activateWatchdog() default true;

	@AttributeDefinition(name = "GridCode Setting", description = "GridCode Setting e.g. VDE-AR-N 4105 for germany.")
	GridCode gridCode() default GridCode.VDE_4105;
	
	@AttributeDefinition(name = "Minimum DC-Voltage", description = "Minimum DC voltage, which may vary depending on the inverter and battery combination.")
	int dcMinVoltage() default 650;

	@AttributeDefinition(name = "Error handler behaviour")
	ErrorRestartBehaviourConfig errorBehaviour() default ErrorRestartBehaviourConfig.NO_RESTART;

	@AttributeDefinition(name = "Modbus-ID", description = "ID of Modbus bridge.")
	String modbus_id() default "modbus0";

	String webconsole_configurationFactory_nameHint() default "Battery-Inverter KACO blueplanet gridsave [{id}]";
}