-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into hotfix/add-hdcp-control-to-airmedia
- Loading branch information
Showing
20 changed files
with
1,828 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
190 changes: 190 additions & 0 deletions
190
...ork/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
using System; | ||
using PepperDash.Essentials.Core; | ||
|
||
namespace PepperDash_Essentials_Core.Bridges | ||
{ | ||
public class HdPsXxxControllerJoinMap : JoinMapBaseAdvanced | ||
{ | ||
|
||
#region Digital | ||
|
||
[JoinName("EnableAutoRoute")] | ||
public JoinDataComplete EnableAutoRoute = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 1, | ||
JoinSpan = 1 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Enable Automatic Routing on Xx1 Switchers", | ||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL, | ||
JoinType = eJoinType.Digital | ||
}); | ||
|
||
|
||
[JoinName("InputSync")] | ||
public JoinDataComplete InputSync = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 2, | ||
JoinSpan = 8 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Input Sync", | ||
JoinCapabilities = eJoinCapabilities.ToSIMPL, | ||
JoinType = eJoinType.Digital | ||
}); | ||
|
||
|
||
[JoinName("EnableInputHdcp")] | ||
public JoinDataComplete EnableInputHdcp = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 11, | ||
JoinSpan = 8 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Enable Input Hdcp", | ||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL, | ||
JoinType = eJoinType.Digital | ||
}); | ||
|
||
|
||
[JoinName("DisableInputHdcp")] | ||
public JoinDataComplete DisableInputHdcp = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 21, | ||
JoinSpan = 8 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Disnable Input Hdcp", | ||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL, | ||
JoinType = eJoinType.Digital | ||
}); | ||
|
||
|
||
[JoinName("IsOnline")] | ||
public JoinDataComplete IsOnline = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 30, | ||
JoinSpan = 1 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Onlne", | ||
JoinCapabilities = eJoinCapabilities.ToSIMPL, | ||
JoinType = eJoinType.Digital | ||
}); | ||
|
||
#endregion | ||
|
||
|
||
#region Analog | ||
|
||
[JoinName("OutputRoute")] | ||
public JoinDataComplete OutputRoute = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 11, | ||
JoinSpan = 2 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Output Route Set/Get", | ||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL, | ||
JoinType = eJoinType.Analog | ||
}); | ||
|
||
#endregion | ||
|
||
|
||
#region Serial | ||
|
||
[JoinName("Name")] | ||
public JoinDataComplete Name = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 1, | ||
JoinSpan = 1 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Name", | ||
JoinCapabilities = eJoinCapabilities.ToSIMPL, | ||
JoinType = eJoinType.Serial | ||
}); | ||
|
||
|
||
[JoinName("InputName")] | ||
public JoinDataComplete InputName = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 2, | ||
JoinSpan = 8 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Input Name", | ||
JoinCapabilities = eJoinCapabilities.ToSIMPL, | ||
JoinType = eJoinType.Serial | ||
}); | ||
|
||
|
||
[JoinName("OutputName")] | ||
public JoinDataComplete OutputName = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 11, | ||
JoinSpan = 2 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Output Name", | ||
JoinCapabilities = eJoinCapabilities.ToSIMPL, | ||
JoinType = eJoinType.Serial | ||
}); | ||
|
||
|
||
[JoinName("OutputRoutedName")] | ||
public JoinDataComplete OutputRoutedName = new JoinDataComplete( | ||
new JoinData | ||
{ | ||
JoinNumber = 16, | ||
JoinSpan = 2 | ||
}, | ||
new JoinMetadata | ||
{ | ||
Description = "Device Output Route Name", | ||
JoinCapabilities = eJoinCapabilities.ToSIMPL, | ||
JoinType = eJoinType.Serial | ||
}); | ||
|
||
|
||
#endregion | ||
|
||
/// <summary> | ||
/// Constructor to use when instantiating this join map without inheriting from it | ||
/// </summary> | ||
/// <param name="joinStart">Join this join map will start at</param> | ||
public HdPsXxxControllerJoinMap(uint joinStart) | ||
: this(joinStart, typeof(HdPsXxxControllerJoinMap)) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Constructor to use when extending this Join map | ||
/// </summary> | ||
/// <param name="joinStart">Join this join map will start at</param> | ||
/// <param name="type">Type of the child join map</param> | ||
protected HdPsXxxControllerJoinMap(uint joinStart, Type type) | ||
: base(joinStart, type) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
...ework/Essentials Core/PepperDashEssentialsBase/Crestron IO/CenIoCom/CenIoComController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
using System.Collections.Generic; | ||
using Crestron.SimplSharpPro; | ||
using Crestron.SimplSharpPro.GeneralIO; | ||
using PepperDash.Core; | ||
using PepperDash.Essentials.Core.Config; | ||
|
||
namespace PepperDash.Essentials.Core.CrestronIO | ||
{ | ||
/// <summary> | ||
/// Wrapper class for CEN-IO-COM-Xxx expander module | ||
/// </summary> | ||
[Description("Wrapper class for the CEN-IO-COM-102 & CEN-IO-COM-202 expander module")] | ||
public class CenIoComController : CrestronGenericBaseDevice, IComPorts | ||
{ | ||
private readonly CenIoCom _cenIoCom; | ||
|
||
public CenIoComController(string key, string name, CenIoCom cenIo) | ||
:base(key, name, cenIo) | ||
{ | ||
_cenIoCom = cenIo; | ||
} | ||
|
||
#region Implementation of IComPorts | ||
|
||
public CrestronCollection<ComPort> ComPorts | ||
{ | ||
get { return _cenIoCom.ComPorts; } | ||
} | ||
|
||
public int NumberOfComPorts | ||
{ | ||
get { return _cenIoCom.NumberOfComPorts; } | ||
} | ||
|
||
#endregion | ||
|
||
} | ||
|
||
public class CenIoCom102ControllerFactory : EssentialsDeviceFactory<CenIoComController> | ||
{ | ||
private const string CenIoCom102Type = "ceniocom102"; | ||
private const string CenIoCom202Type = "ceniocom202"; | ||
|
||
public CenIoCom102ControllerFactory() | ||
{ | ||
TypeNames = new List<string> { CenIoCom102Type, CenIoCom202Type }; | ||
} | ||
|
||
public override EssentialsDevice BuildDevice(DeviceConfig dc) | ||
{ | ||
Debug.Console(1, "Factory Attempting to create new CEN-IO-COM-Xxx Device"); | ||
|
||
var control = CommFactory.GetControlPropertiesConfig(dc); | ||
if (control == null) | ||
{ | ||
Debug.Console(1, "Factory failed to create a new CEN-IO-COM-Xxx Device, control properties not found"); | ||
return null; | ||
} | ||
|
||
var ipid = control.IpIdInt; | ||
if (ipid < 2) | ||
{ | ||
Debug.Console(1, "Factory failed to create a new CEN-IO-COM-Xxx Device, invalid IP-ID found"); | ||
return null; | ||
} | ||
|
||
switch (dc.Type) | ||
{ | ||
case CenIoCom102Type: | ||
{ | ||
return new CenIoComController(dc.Key, dc.Name, new CenIoCom102(ipid, Global.ControlSystem)); | ||
} | ||
case CenIoCom202Type: | ||
{ | ||
return new CenIoComController(dc.Key, dc.Name, new CenIoCom202(ipid, Global.ControlSystem)); | ||
} | ||
default: | ||
{ | ||
Debug.Console(1, "Factory failed to create a new CEN-IO-COM-Xxx Device, invalid type '{0}'", dc.Type); | ||
return null; | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.