package io.openems.edge.meter.opendtu;

import io.openems.common.channel.Level;
import io.openems.edge.common.channel.Doc;
import io.openems.edge.common.component.OpenemsComponent;
import io.openems.edge.meter.api.ElectricityMeter;
import io.openems.edge.meter.api.SinglePhaseMeter;

public interface MeterOpenDtu extends ElectricityMeter, SinglePhaseMeter, OpenemsComponent {

	public enum ChannelId implements io.openems.edge.common.channel.ChannelId {

		/**
		 * Slave Communication Failed Fault.
		 *
		 * <p>
		 * Indicates a failure in communication with a slave device, which might affect
		 * system operations.
		 *
		 * <ul>
		 * <li>Interface: MeterOpenDtu
		 * <li>Type: State
		 * </ul>
		 */
		SLAVE_COMMUNICATION_FAILED(Doc.of(Level.FAULT)//
				.text("Communication with slave device failed."));

		private final Doc doc;

		private ChannelId(Doc doc) {
			this.doc = doc;
		}

		@Override
		public Doc doc() {
			return this.doc;
		}
	}
}
