mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Merge pull request #207 from PepperDash/feature/Add-IRoutingNumeric
Added new interface IRoutingNumeric
This commit is contained in:
@@ -80,24 +80,26 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IRouting : IRoutingInputsOutputs
|
public interface IRouting : IRoutingInputsOutputs
|
||||||
{
|
{
|
||||||
//void ClearRoute(object outputSelector);
|
|
||||||
void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType);
|
void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ITxRouting : IRouting
|
public interface IRoutingNumeric : IRouting
|
||||||
|
{
|
||||||
|
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ITxRouting : IRoutingNumeric
|
||||||
{
|
{
|
||||||
IntFeedback VideoSourceNumericFeedback { get; }
|
IntFeedback VideoSourceNumericFeedback { get; }
|
||||||
IntFeedback AudioSourceNumericFeedback { get; }
|
IntFeedback AudioSourceNumericFeedback { get; }
|
||||||
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a receiver that has internal routing (DM-RMC-4K-Z-SCALER-C)
|
/// Defines a receiver that has internal routing (DM-RMC-4K-Z-SCALER-C)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IRmcRouting : IRouting
|
public interface IRmcRouting : IRoutingNumeric
|
||||||
{
|
{
|
||||||
IntFeedback AudioVideoSourceNumericFeedback { get; }
|
IntFeedback AudioVideoSourceNumericFeedback { get; }
|
||||||
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ namespace PepperDash.Essentials.DM {
|
|||||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DmBladeChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingInputsOutputs, IRouting, IHasFeedback {
|
public class DmBladeChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumeric
|
||||||
|
{
|
||||||
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
|
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
|
||||||
|
|
||||||
public Switch Chassis { get; private set; }
|
public Switch Chassis { get; private set; }
|
||||||
@@ -563,14 +564,23 @@ namespace PepperDash.Essentials.DM {
|
|||||||
var outCard = input == 0 ? null : Chassis.Outputs[output];
|
var outCard = input == 0 ? null : Chassis.Outputs[output];
|
||||||
|
|
||||||
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
||||||
if ((sigType | eRoutingSignalType.Video) == eRoutingSignalType.Video) {
|
if ((sigType | eRoutingSignalType.Video) != eRoutingSignalType.Video) return;
|
||||||
Chassis.VideoEnter.BoolValue = true;
|
Chassis.VideoEnter.BoolValue = true;
|
||||||
Chassis.Outputs[output].VideoOut = inCard;
|
Chassis.Outputs[output].VideoOut = inCard;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region IRoutingNumeric Members
|
||||||
|
|
||||||
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
|
||||||
|
{
|
||||||
|
ExecuteSwitch(inputSelector, outputSelector, sigType);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new DmBladeChassisControllerJoinMap(joinStart);
|
var joinMap = new DmBladeChassisControllerJoinMap(joinStart);
|
||||||
@@ -808,6 +818,7 @@ namespace PepperDash.Essentials.DM {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")]
|
[Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")]
|
||||||
public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingInputsOutputs, IRouting, IHasFeedback
|
public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumeric
|
||||||
{
|
{
|
||||||
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
|
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
|
||||||
|
|
||||||
@@ -1094,6 +1094,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region IRoutingNumeric Members
|
||||||
|
|
||||||
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
|
||||||
|
{
|
||||||
|
ExecuteSwitch(inputSelector, outputSelector, sigType);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new DmChassisControllerJoinMap(joinStart);
|
var joinMap = new DmChassisControllerJoinMap(joinStart);
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ using PepperDash.Essentials.DM.Config;
|
|||||||
using Feedback = PepperDash.Essentials.Core.Feedback;
|
using Feedback = PepperDash.Essentials.Core.Feedback;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.DM
|
namespace PepperDash.Essentials.DM
|
||||||
{
|
{
|
||||||
public class DmpsRoutingController : EssentialsBridgeableDevice, IRouting, IHasFeedback
|
public class DmpsRoutingController : EssentialsBridgeableDevice, IRoutingNumeric, IHasFeedback
|
||||||
{
|
{
|
||||||
public CrestronControlSystem Dmps { get; set; }
|
public CrestronControlSystem Dmps { get; set; }
|
||||||
public ISystemControl SystemControl { get; private set; }
|
public ISystemControl SystemControl { get; private set; }
|
||||||
@@ -661,8 +661,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
void Dmps_DMOutputChange(Switch device, DMOutputEventArgs args)
|
void Dmps_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DMOutputChange Output: {0} EventId: {1}", args.Number, args.EventId.ToString());
|
Debug.Console(2, this, "DMOutputChange Output: {0} EventId: {1}", args.Number, args.EventId.ToString());
|
||||||
@@ -724,10 +722,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
if (RouteOffTimers.ContainsKey(pnt))
|
if (RouteOffTimers.ContainsKey(pnt))
|
||||||
return;
|
return;
|
||||||
RouteOffTimers[pnt] = new CTimer(o =>
|
RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(0, pnt.Number, pnt.Type), RouteOffTime);
|
||||||
{
|
|
||||||
ExecuteSwitch(0, pnt.Number, pnt.Type);
|
|
||||||
}, RouteOffTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IRouting Members
|
#region IRouting Members
|
||||||
@@ -809,6 +804,15 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region IRoutingNumeric Members
|
||||||
|
|
||||||
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
|
||||||
|
{
|
||||||
|
ExecuteSwitch(inputSelector, outputSelector, sigType);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ using PepperDash.Essentials.Core.Config;
|
|||||||
namespace PepperDash.Essentials.DM.Chassis
|
namespace PepperDash.Essentials.DM.Chassis
|
||||||
{
|
{
|
||||||
[Description("Wrapper class for all HdMdNxM4E switchers")]
|
[Description("Wrapper class for all HdMdNxM4E switchers")]
|
||||||
public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingInputsOutputs, IRouting, IHasFeedback
|
public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingInputsOutputs, IRoutingNumeric, IHasFeedback
|
||||||
{
|
{
|
||||||
private HdMdNxM _Chassis;
|
private HdMdNxM _Chassis;
|
||||||
private HdMd4x14kE _Chassis4x1;
|
private HdMd4x14kE _Chassis4x1;
|
||||||
@@ -240,6 +240,15 @@ namespace PepperDash.Essentials.DM.Chassis
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region IRoutingNumeric Members
|
||||||
|
|
||||||
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
||||||
|
{
|
||||||
|
ExecuteSwitch(inputSelector, outputSelector, signalType);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Bridge Linking
|
#region Bridge Linking
|
||||||
@@ -389,6 +398,8 @@ namespace PepperDash.Essentials.DM.Chassis
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user