package io.openems.edge.victron.ess;

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

import io.openems.edge.common.type.Phase.SingleOrAllPhase;

@ObjectClassDefinition(//
		name = "Victron Multiplus 2 ESS", //
		description = "Victron ESS system with Multiplus2 inverter - ESS")
public @interface Config {

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

	@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 = "Modbus-ID", description = "ID of Modbus bridge.")
	String modbus_id() default "modbus0";

	@AttributeDefinition(name = "Modbus Unit-ID", description = "The Unit-ID of the Modbus device.")
	int modbusUnitId() default 227;

	@AttributeDefinition(name = "Connected Phase", description = "to which phase is the ESS connected?")
	SingleOrAllPhase phase() default SingleOrAllPhase.ALL;

	@AttributeDefinition(name = "Debug", description = "Enable debug mode?")
	boolean debugMode() default false;

	@AttributeDefinition(name = "Read-Only mode", description = "Enables Read-Only mode")
	boolean readOnlyMode() default false;

	@AttributeDefinition(name = "Capacity", description = "Total battery capacity in Wh")
	int capacity() default 10000;

	@AttributeDefinition(name = "Max Apparent Power", description = "Maximum apparent power in VA")
	int maxApparentPower() default 5000;

	String webconsole_configurationFactory_nameHint() default "Victron Multiplus 2 ESS [{id}]";

}