using Content.Server.DeviceLinking.Systems;
using Content.Shared.DeviceLinking;
using Content.Shared.MachineLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.DeviceLinking.Components;
///
/// An edge detector that pulses high or low output ports when the input port gets a rising or falling edge respectively.
///
[RegisterComponent]
[Access(typeof(EdgeDetectorSystem))]
public sealed class EdgeDetectorComponent : Component
{
///
/// Name of the input port.
///
[DataField("inputPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string InputPort = "Input";
///
/// Name of the rising edge output port.
///
[DataField("outputHighPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OutputHighPort = "OutputHigh";
///
/// Name of the falling edge output port.
///
[DataField("outputLowPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OutputLowPort = "OutputLow";
// Initial state
[ViewVariables]
public SignalState State = SignalState.Low;
}