mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
lots of refactoring
This commit is contained in:
@@ -15,20 +15,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
public DmRmc100S Rmc { get; private set; }
|
private readonly DmRmc100S _rmc;
|
||||||
|
|
||||||
public RoutingInputPort DmIn { get; private set; }
|
public RoutingInputPort DmIn { get; private set; }
|
||||||
public RoutingOutputPort HdmiOut { get; private set; }
|
public RoutingOutputPort HdmiOut { get; private set; }
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingInputPort> { DmIn }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
{
|
|
||||||
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a Crestron RMC and put it in here
|
/// Make a Crestron RMC and put it in here
|
||||||
@@ -36,20 +30,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmRmc100SController(string key, string name, DmRmc100S rmc)
|
public DmRmc100SController(string key, string name, DmRmc100S rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
_rmc = rmc;
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
|
||||||
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this) {Port = Rmc};
|
||||||
|
|
||||||
// Set Ports for CEC
|
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||||
HdmiOut.Port = Rmc; // Unique case, this class has no HdmiOutput port and ICec is implemented on the receiver class itself
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Base does register and sets up comm monitoring.
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
@@ -58,17 +47,17 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region IIROutputPorts Members
|
#region IIROutputPorts Members
|
||||||
public CrestronCollection<IROutputPort> IROutputPorts { get { return Rmc.IROutputPorts; } }
|
public CrestronCollection<IROutputPort> IROutputPorts { get { return _rmc.IROutputPorts; } }
|
||||||
public int NumberOfIROutputPorts { get { return Rmc.NumberOfIROutputPorts; } }
|
public int NumberOfIROutputPorts { get { return _rmc.NumberOfIROutputPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IComPorts Members
|
#region IComPorts Members
|
||||||
public CrestronCollection<ComPort> ComPorts { get { return Rmc.ComPorts; } }
|
public CrestronCollection<ComPort> ComPorts { get { return _rmc.ComPorts; } }
|
||||||
public int NumberOfComPorts { get { return Rmc.NumberOfComPorts; } }
|
public int NumberOfComPorts { get { return _rmc.NumberOfComPorts; } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ICec Members
|
#region ICec Members
|
||||||
public Cec StreamCec { get { return Rmc.HdmiOutput.StreamCec; } }
|
public Cec StreamCec { get { return _rmc.HdmiOutput.StreamCec; } }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user