package io.openems.edge.battery.fenecon.home;

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

import io.openems.edge.common.startstop.StartStopConfig;

@ObjectClassDefinition(//
		name = "Battery FENECON Home", //
		description = "Implements the FENECON Home Battery")
@interface Config {

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

	@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 = "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 1;

	@AttributeDefinition(name = "Battery Start Up Relay", description = "The output channel of control unit to start the battery automatically. "
			+ "This relay will be switched on until Battery started, afterwards will be switched off.")
	String batteryStartUpRelay() default "io0/Relay4";

	@AttributeDefinition(name = "Port on BatteryInverter", description = "The specific Port on the inverter, if the BatteryInverter can handle multiple batteries.")
	BatteryInverterPort inverterPort() default BatteryInverterPort.PORT_1;

	@AttributeDefinition(name = "Modbus target filter", description = "This is auto-generated by 'Modbus-ID'.")
	String Modbus_target() default "(enabled=true)";

	String webconsole_configurationFactory_nameHint() default "Battery FENECON Home [{id}]";

}
