mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
initial pass at fixing RMC activation issues
This commit is contained in:
@@ -30,7 +30,19 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
protected CrestronGenericBaseDevice(string key, string name, GenericBase hardware)
|
protected CrestronGenericBaseDevice(string key, string name, GenericBase hardware)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
|
SetHardwareAndRegisterEvents(hardware);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Added to support creating RMC and DM TX hardware during pre-activation
|
||||||
|
protected CrestronGenericBaseDevice(string key, string name) : base(key, name)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Added to support creating RMC and DM TX hardware during pre-activation
|
||||||
|
protected void SetHardwareAndRegisterEvents(GenericBase hardware)
|
||||||
|
{
|
||||||
Feedbacks = new FeedbackCollection<Feedback>();
|
Feedbacks = new FeedbackCollection<Feedback>();
|
||||||
|
|
||||||
Hardware = hardware;
|
Hardware = hardware;
|
||||||
@@ -40,7 +52,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
AddToFeedbackList(IsOnline, IpConnectionsText);
|
AddToFeedbackList(IsOnline, IpConnectionsText);
|
||||||
|
|
||||||
CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000);
|
CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make sure that overriding classes call this!
|
/// Make sure that overriding classes call this!
|
||||||
@@ -135,6 +147,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Added to support creating RMC and DM TX hardware during pre-activation
|
||||||
|
protected CrestronGenericBridgeableBaseDevice(string key, string name):base(key, name)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
|
public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Crestron.SimplSharpPro;
|
using System;
|
||||||
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||||
@@ -15,7 +16,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||||
IIROutputPorts, IComPorts, ICec
|
IIROutputPorts, IComPorts, ICec
|
||||||
{
|
{
|
||||||
private readonly DmRmc100S _rmc;
|
private 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; }
|
||||||
@@ -32,13 +33,51 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
_rmc = rmc;
|
_rmc = rmc;
|
||||||
|
|
||||||
|
InitializeRouting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DmRmc100SController(string key, string name, DMOutput dmOutput):base(key, name)
|
||||||
|
{
|
||||||
|
AddPreActivationAction(() =>
|
||||||
|
{
|
||||||
|
_rmc = new DmRmc100S(dmOutput);
|
||||||
|
|
||||||
|
SetBaseClassRmcs();
|
||||||
|
|
||||||
|
InitializeRouting();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public DmRmc100SController(string key, string name, uint ipId, DMOutput dmOutput) : base(key, name)
|
||||||
|
{
|
||||||
|
AddPreActivationAction(() =>
|
||||||
|
{
|
||||||
|
_rmc = new DmRmc100S(ipId, dmOutput);
|
||||||
|
|
||||||
|
SetBaseClassRmcs();
|
||||||
|
|
||||||
|
InitializeRouting();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetBaseClassRmcs()
|
||||||
|
{
|
||||||
|
//Set Rmc in DmRmcControllerBase Class
|
||||||
|
SetRmc(_rmc);
|
||||||
|
|
||||||
|
//Set Rmc In CrestronGenericBaseDevice
|
||||||
|
SetHardwareAndRegisterEvents(_rmc);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeRouting()
|
||||||
|
{
|
||||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.DmCat, 0, this);
|
eRoutingPortConnectionType.DmCat, 0, this);
|
||||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this) {Port = _rmc};
|
eRoutingPortConnectionType.Hdmi, null, this) { Port = _rmc };
|
||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
InputPorts = new RoutingPortCollection<RoutingInputPort> { DmIn };
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
[Description("Wrapper class for all DM-RMC variants")]
|
[Description("Wrapper class for all DM-RMC variants")]
|
||||||
public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice
|
public abstract class DmRmcControllerBase : CrestronGenericBridgeableBaseDevice
|
||||||
{
|
{
|
||||||
private readonly EndpointReceiverBase _rmc; //kept here just in case. Only property or method on this class that's not device-specific is the DMOutput that it's attached to.
|
private EndpointReceiverBase _rmc; //kept here just in case. Only property or method on this class that's not device-specific is the DMOutput that it's attached to.
|
||||||
|
|
||||||
public StringFeedback VideoOutputResolutionFeedback { get; protected set; }
|
public StringFeedback VideoOutputResolutionFeedback { get; protected set; }
|
||||||
public StringFeedback EdidManufacturerFeedback { get; protected set; }
|
public StringFeedback EdidManufacturerFeedback { get; protected set; }
|
||||||
@@ -26,8 +26,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device)
|
protected DmRmcControllerBase(string key, string name, EndpointReceiverBase device)
|
||||||
: base(key, name, device)
|
: base(key, name, device)
|
||||||
{
|
{
|
||||||
_rmc = device;
|
SetRmc(device);
|
||||||
// if wired to a chassis, skip registration step in base class
|
}
|
||||||
|
|
||||||
|
protected DmRmcControllerBase(string key, string name):base(key, name)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void SetRmc(EndpointReceiverBase rmc)
|
||||||
|
{
|
||||||
|
_rmc = rmc;
|
||||||
|
// if wired to a chassis, skip registration step in base class
|
||||||
PreventRegistration = _rmc.DMOutput != null;
|
PreventRegistration = _rmc.DMOutput != null;
|
||||||
|
|
||||||
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
AddToFeedbackList(VideoOutputResolutionFeedback, EdidManufacturerFeedback, EdidSerialNumberFeedback, EdidNameFeedback, EdidPreferredTimingFeedback);
|
||||||
@@ -82,6 +92,16 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected DmHdBaseTControllerBase(string key, string name, HDBaseTBase rmc)
|
protected DmHdBaseTControllerBase(string key, string name, HDBaseTBase rmc)
|
||||||
: base(key, name, rmc)
|
: base(key, name, rmc)
|
||||||
|
{
|
||||||
|
SetRmc(rmc);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected DmHdBaseTControllerBase(string key, string name) : base(key, name)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void SetRmc(HDBaseTBase rmc)
|
||||||
{
|
{
|
||||||
Rmc = rmc;
|
Rmc = rmc;
|
||||||
}
|
}
|
||||||
@@ -130,7 +150,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
ChassisCpu3Dict = new Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>>
|
ChassisCpu3Dict = new Dictionary<string, Func<string, string, DMOutput, CrestronGenericBaseDevice>>
|
||||||
{
|
{
|
||||||
{"dmrmc100c", (k, n, d) => new DmRmcX100CController(k, n, new DmRmc100C(d))},
|
{"dmrmc100c", (k, n, d) => new DmRmcX100CController(k, n, new DmRmc100C(d))},
|
||||||
{"dmrmc100s", (k, n, d) => new DmRmc100SController(k, n, new DmRmc100S(d))},
|
{"dmrmc100s", (k, n, d) => new DmRmc100SController(k, n, d)},
|
||||||
{"dmrmc4k100c", (k, n, d) => new DmRmcX100CController(k, n, new DmRmc4k100C(d))},
|
{"dmrmc4k100c", (k, n, d) => new DmRmcX100CController(k, n, new DmRmc4k100C(d))},
|
||||||
{"dmrmc4kz100c", (k, n, d) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(d))},
|
{"dmrmc4kz100c", (k, n, d) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(d))},
|
||||||
{"dmrmc150s", (k, n, d) => new DmRmc150SController(k, n, new DmRmc150S(d))},
|
{"dmrmc150s", (k, n, d) => new DmRmc150SController(k, n, new DmRmc150S(d))},
|
||||||
@@ -159,38 +179,38 @@ namespace PepperDash.Essentials.DM
|
|||||||
{"dmrmc4k100c1g", (k,n,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(d))}
|
{"dmrmc4k100c1g", (k,n,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(d))}
|
||||||
};
|
};
|
||||||
|
|
||||||
ChassisDict = new Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
ChassisDict = new Dictionary<string, Func<string, string, uint, DMOutput, CrestronGenericBaseDevice>>
|
||||||
{
|
{
|
||||||
{"dmrmc100c", (k, n, i, d) => new DmRmcX100CController(k, n, new DmRmc100C(i,d))},
|
{"dmrmc100c", (k, n, i, d) => new DmRmcX100CController(k, n, new DmRmc100C(i, d))},
|
||||||
{"dmrmc100s", (k, n,i, d) => new DmRmc100SController(k, n, new DmRmc100S(i,d))},
|
{"dmrmc100s", (k, n, i, d) => new DmRmc100SController(k, n, i, d)},
|
||||||
{"dmrmc4k100c", (k, n,i, d) => new DmRmcX100CController(k, n, new DmRmc4k100C(i,d))},
|
{"dmrmc4k100c", (k, n, i, d) => new DmRmcX100CController(k, n, new DmRmc4k100C(i, d))},
|
||||||
{"dmrmc4kz100c", (k, n,i, d) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(i,d))},
|
{"dmrmc4kz100c", (k, n, i, d) => new DmRmc4kZ100CController(k, n, new DmRmc4kz100C(i, d))},
|
||||||
{"dmrmc150s", (k, n,i, d) => new DmRmc150SController(k, n, new DmRmc150S(i,d))},
|
{"dmrmc150s", (k, n, i, d) => new DmRmc150SController(k, n, new DmRmc150S(i, d))},
|
||||||
{"dmrmc200c", (k, n,i, d) => new DmRmc200CController(k, n, new DmRmc200C(i,d))},
|
{"dmrmc200c", (k, n, i, d) => new DmRmc200CController(k, n, new DmRmc200C(i, d))},
|
||||||
{"dmrmc200s", (k, n,i, d) => new DmRmc200SController(k, n, new DmRmc200S(i,d))},
|
{"dmrmc200s", (k, n, i, d) => new DmRmc200SController(k, n, new DmRmc200S(i, d))},
|
||||||
{"dmrmc200s2", (k, n,i, d) => new DmRmc200S2Controller(k, n, new DmRmc200S2(i,d))},
|
{"dmrmc200s2", (k, n, i, d) => new DmRmc200S2Controller(k, n, new DmRmc200S2(i, d))},
|
||||||
{"dmrmcscalerc", (k, n,i, d) => new DmRmcScalerCController(k, n, new DmRmcScalerC(i,d))},
|
{"dmrmcscalerc", (k, n, i, d) => new DmRmcScalerCController(k, n, new DmRmcScalerC(i, d))},
|
||||||
{"dmrmcscalers", (k, n,i, d) => new DmRmcScalerSController(k, n, new DmRmcScalerS(i,d))},
|
{"dmrmcscalers", (k, n, i, d) => new DmRmcScalerSController(k, n, new DmRmcScalerS(i, d))},
|
||||||
{
|
{
|
||||||
"dmrmcscalers2",
|
"dmrmcscalers2",
|
||||||
(k, n,i, d) => new DmRmcScalerS2Controller(k, n, new DmRmcScalerS2(d))
|
(k, n, i, d) => new DmRmcScalerS2Controller(k, n, new DmRmcScalerS2(d))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"dmrmc4kscalerc",
|
"dmrmc4kscalerc",
|
||||||
(k, n,i, d) => new DmRmc4kScalerCController(k, n, new DmRmc4kScalerC(d))
|
(k, n, i, d) => new DmRmc4kScalerCController(k, n, new DmRmc4kScalerC(d))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"dmrmc4kscalercdsp",
|
"dmrmc4kscalercdsp",
|
||||||
(k, n,i, d) => new DmRmc4kScalerCDspController(k, n, new DmRmc4kScalerCDsp(d))
|
(k, n, i, d) => new DmRmc4kScalerCDspController(k, n, new DmRmc4kScalerCDsp(d))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"dmrmc4kzscalerc",
|
"dmrmc4kzscalerc",
|
||||||
(k, n,i, d) => new DmRmc4kZScalerCController(k, n, new DmRmc4kzScalerC(d))
|
(k, n, i, d) => new DmRmc4kZScalerCController(k, n, new DmRmc4kzScalerC(d))
|
||||||
},
|
},
|
||||||
{"hdbasetrx", (k,n,i,d) => new HDBaseTRxController(k,n, new HDRx3CB(d))},
|
{"hdbasetrx", (k, n, i, d) => new HDBaseTRxController(k, n, new HDRx3CB(d))},
|
||||||
{"dmrmc4k100c1g", (k,n,i,d) => new DmRmc4k100C1GController(k,n, new DmRmc4K100C1G(d))}
|
{"dmrmc4k100c1g", (k, n, i, d) => new DmRmc4k100C1GController(k, n, new DmRmc4K100C1G(d))}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A factory method for various DmRmcControllers
|
/// A factory method for various DmRmcControllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user