Compare commits

...

83 Commits

Author SHA1 Message Date
Jason T Alborough
d2a40df70e Chagnes pepperdash core refrence 2019-11-08 16:23:23 -05:00
Neil Dorin
a1de8e2edd Merged in maintenance/pdcore-submodule-creds (pull request #36)
Maintenance/pdcore submodule creds

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-11-08 19:55:34 +00:00
Neil Dorin
841cc1a5e4 Readds PDCore submodule without user creds 2019-11-08 12:54:07 -07:00
Neil Dorin
130bac79f3 Removes PDCore submodule with user creds 2019-11-08 12:53:04 -07:00
Neil Dorin
2fe1ac0e75 Merged in maintenance/pd-core-submodule (pull request #35)
Maintenance/pd core submodule

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-10-17 15:53:13 +00:00
Neil Dorin
fcfec55b20 Removes PepperDash_Core.dll static reference and replaces it with submodule for pepperdashcore-builds 2019-10-16 15:58:14 -06:00
Neil Dorin
ae87498c0b Adds HDCP support for DM 8G+ input card types 2019-10-11 17:13:56 -06:00
Neil Dorin
96d48c9d56 Adds HDCP support for DMInput on 8G+ input cards (requires addtional config info on DmChassisController device config to tell if input cards support HDCP2 or not). 2019-10-09 15:55:59 -06:00
Neil Dorin
d21f6798fd Better handling for HdBaseT style TX units on non CPU3 DM Chassis 2019-10-09 12:32:58 -06:00
Neil Dorin
ac93081278 Merge remote-tracking branch 'origin/development' into bugfix/ecs-1168 2019-10-09 10:23:30 -06:00
Neil Dorin
690ba92773 Adds condition to DmChassisControllerBridge to use the endpoint online feedback from the input card when a basic HDBaseT transmitter is found. 2019-10-09 10:22:59 -06:00
Heath Volmer
115745467a Merged in feature/ecs-1162 (pull request #34)
ecs-1162: Messaging changes for Weil
2019-10-04 15:31:40 +00:00
Heath Volmer
0bb107f5ef ecs-1162: Messaging changes for Weil 2019-10-04 09:30:53 -06:00
Neil Dorin
3887a07d55 Fixed duplicate assignment statements 2019-09-26 11:31:03 -06:00
Neil Dorin
da832a7da1 Merged in bugfix/ecs-1160 (pull request #33)
Bugfix/ecs 1160

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-09-17 18:32:14 +00:00
Neil Dorin
0e80c6f54d fixes output card HDMI port naming issue and type case sensitivity issue for two affected input card types. 2019-09-17 12:31:24 -06:00
Neil Dorin
c7b813447c Finished GlsOccupancySensorBaseControllerBridge to handle both single and dual technology sensors. 2019-09-17 11:12:00 -06:00
Neil Dorin
1257dde4ce Continued work on bridge 2019-09-16 16:36:24 -06:00
Neil Dorin
af7d97efef Updates to GlsOccupancySensorBaseController and created new GlsOdtOccupancySensorController. Added JoinMap class and started on bridge. 2019-09-16 16:20:03 -06:00
Neil Dorin
ce782c1cd3 Merged in maintenance/pr-3 (pull request #32)
Maintenance/pr 3

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-09-11 22:35:27 +00:00
Neil Dorin
f93287641f Merge remote-tracking branch 'origin/feature/ecs-1154' into maintenance/pr-3 2019-09-11 16:33:30 -06:00
Neil Dorin
d2e9c2e238 Merge branch 'bugfix/ecs-1157' into maintenance/pr-3 2019-09-11 16:33:20 -06:00
Jason T Alborough
4b926c10f6 ECS-1158 Fixes issue where iBasicCommunicationBridge will toss an exception when it receives data. 2019-09-11 15:44:19 -04:00
Neil Dorin
7e9256187a corrects issues with VideoSyncStatus feedback 2019-09-11 13:16:23 -06:00
Neil Dorin
061d95e2b1 Moves IBridge condition to the top of the list to allow plugin bridges to override existing ones. 2019-09-09 16:13:25 -06:00
Neil Dorin
78fe799afc Updates all Bridge types to properly support custom join maps from config. Corrects issues in DisplayControllerBridge due to static properties outside of LinkToApi method. (ECS-1153) 2019-09-09 16:11:20 -06:00
Neil Dorin
596b8bf29a Merged in feature/ecs-1145 (pull request #31)
Feature/ecs 1145

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-09-05 23:37:40 +00:00
Neil Dorin
87de4a4bf0 Documents all join maps and moves them to their own files for easier linking in Confluence documentation. 2019-09-05 17:36:08 -06:00
Neil Dorin
52343ddf7b Fixes value for name serial output to use name value from config instead of class name 2019-09-05 09:21:22 -06:00
Neil Dorin
854c2bcb6f Merged in feature/ecs-1148 (pull request #30)
Feature/ecs 1148

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-09-04 20:33:23 +00:00
Neil Dorin
0b9ed462b4 Tested working onsite with Trevor Payne 2019-09-04 14:28:50 -06:00
Neil Dorin
4dafa34b2e Renamed file to match product SKU 2019-09-04 10:17:35 -06:00
Neil Dorin
f1611da74c Adds device support for HdMdxxxCE family of Tx/Rx pairs. 2019-09-03 16:43:07 -06:00
Neil Dorin
d588757eb6 Adds conditional statments in DmRmcHelper to construct the DM-RMC-100-S 2019-09-03 13:14:34 -06:00
Neil Dorin
5bb5c9e07f Commit before switching branches (no significant change 2019-09-03 13:09:13 -06:00
Neil Dorin
176c9d9835 Tested DmpsAudioOutputController and matching bridge on processor successfully 2019-08-29 17:34:19 -06:00
Neil Dorin
6726e989a7 Sets up actions and feedback for each level on a DMPS audio output 2019-08-29 14:04:21 -06:00
Neil Dorin
77fbee78a8 working on DmpsAudioOutputControllerBridge 2019-08-28 17:07:18 -06:00
Neil Dorin
172e2fb744 Adds feedbacks to DmpsAudioOutputController 2019-08-28 11:45:03 -06:00
Neil Dorin
f2b2825220 Merge remote-tracking branch 'origin/development' into feature/ecs-1127 2019-08-27 12:18:49 -06:00
Neil Dorin
1b832409e4 Merged in bugfix/ecs-1144 (pull request #29)
Addresses exceptions in DmTx401CController constructor

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-08-26 21:35:32 +00:00
Neil Dorin
969ba3c87c Addresses exceptions in DmTx401CController constructor 2019-08-26 15:28:02 -06:00
Neil Dorin
d93a563cd8 Merged in feature/ecs-1140 (pull request #28)
Feature/ecs 1140

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-08-16 05:29:06 +00:00
Neil Dorin
63f81456e8 Merge branch 'feature/ecs-1139' into feature/ecs-1140
# Conflicts:
#	PepperDashEssentials/Bridges/DmChassisControllerBridge.cs
#	essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
2019-08-15 21:07:16 -06:00
Neil Dorin
764d8d2b48 Tested working with USB routing and SystemId setting on DmChassisController and DmChassisControllerBridge 2019-08-15 20:56:03 -06:00
Neil Dorin
1ae6069ac2 Adds USB routing to DmChassisController and DmChassisControllerBridge.
Major update to remove eRoutingSignalType.AudioVideo in favor of bitmasked values and adding UsbOutput and UsbInput types.  Updated all affected routing ports and ExecuteSwitch method calls.
Need to review and test routing to ensure bitwise operators are all correct.
2019-08-15 14:07:10 -06:00
Neil Dorin
7eccc82541 Adds HDCP Capability type values 2019-08-14 17:16:17 -06:00
Neil Dorin
b2dbd3c377 Built HDCP Capability feedbacks for input card HDMI ports 2019-08-14 16:48:15 -06:00
Neil Dorin
47e47ec272 Merged in bugfix/ecs-1138a (pull request #27)
Minor correction to EventId
2019-08-14 20:13:32 +00:00
Neil Dorin
c392ac6b06 Minor correction to EventId 2019-08-14 14:13:00 -06:00
Neil Dorin
af2fe7e54e Merged in bugfix/ecs-1138a (pull request #26)
Fixed EventIds for EndpointOnlineFeedback in DMInput/Output change handlers

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-08-14 20:11:27 +00:00
Neil Dorin
3f68a84fe8 Fixed EventIds for EndpointOnlineFeedback in DMInput/Output change handlers 2019-08-14 14:09:11 -06:00
Neil Dorin
5d93a5177c Start adding HDCP state feedback collection 2019-08-14 13:46:28 -06:00
Neil Dorin
f83a7aecf2 Updates eventIds for EndpointOnlineFeedabck 2019-08-14 13:29:04 -06:00
Neil Dorin
6b21b37aef First attempt to address HDCP setting on input cards/TXs on DmChassisControllerBridge 2019-08-13 21:40:22 -06:00
Neil Dorin
b1459da2ba Merged in maintenance/ecs-1138 (pull request #25)
Fixes issue with missing DmpsAudioController.cs file

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-08-01 20:03:48 +00:00
Neil Dorin
82e2f1e959 Fixes issue with missing DmpsAudioController.cs file 2019-08-01 14:03:01 -06:00
Neil Dorin
c329e31802 Merged in bugfix/ecs-1138 (pull request #24)
Attemtping to debug issue with EndpointOnlineFeedback on output cards

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-08-01 19:52:27 +00:00
Neil Dorin
2b9615ad94 Adds devjson command 2019-08-01 13:47:18 -06:00
Neil Dorin
71098ca65d Adding DmpsAudioOutputController 2019-07-31 15:32:59 -06:00
Neil Dorin
b917ff980a Attemtping to debug issue with EndpointOnlineFeedback on output cards 2019-07-31 15:31:40 -06:00
Neil Dorin
c3c9c584ae Merged in feature/ecs-1125 (pull request #23)
Feature/ecs 1125

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-07-30 20:24:25 +00:00
Neil Dorin
b6f6c72c92 Merge remote-tracking branch 'origin/development' into feature/ecs-1125
# Conflicts:
#	PepperDashEssentials/Bridges/DmChassisControllerBridge.cs
2019-07-30 14:24:02 -06:00
Neil Dorin
59b2995a1b Fixes exceptions in Eisc_SigChange by checking uo for null first. Then fixes issue where if output card is Card.Dmps3CodecOutput the NameFeedback property throws a null ref exception, even if you first check it for null. 2019-07-30 14:19:01 -06:00
Neil Dorin
bdf3e2054f Efforts to debug exceptions thrown on bridge string sigs 101-108 and 301-308 2019-07-29 16:32:39 -06:00
Neil Dorin
1acb3a20c5 Routing tested and working with EfS bridge 2019-07-26 16:53:52 -06:00
Neil Dorin
2c98fc4545 Merged in bugfix/ecs-1134 (pull request #22)
Switches to using input/output enpoint online feedback collections on chassis rather than IsOnline feedback from individual endpoints.

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-07-25 16:13:35 +00:00
Neil Dorin
05c9dd3c69 Switches to using input/output enpoint online feedback collections on chassis rather than IsOnline feedback from individual endpoints. 2019-07-25 10:01:04 -06:00
Neil Dorin
5de8b703dd Adds attemps to hanlde output card types. 2019-07-25 09:54:06 -06:00
Neil Dorin
a3887510df Additional progress after initial testing. Having issues iterating CrestronControlSystem.SwitcherInputs/Outputs collections. 2019-07-24 22:44:39 -06:00
Neil Dorin
dc8d0e25d5 Adds Virtual Dm Tx Controller classes to handle Dmps inputs with mutliple connectors and auto switching. Completes DmpsRoutingController (requires testing) 2019-07-22 17:04:41 -06:00
Neil Dorin
028e411ffe Started DmpsRoutingController 2019-07-18 16:46:01 -06:00
Neil Dorin
5aed3c4480 Merged in bugfix/ecs-1131 (pull request #21)
Bugfix/ecs 1131

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-07-18 20:16:48 +00:00
Neil Dorin
ddfd1d0586 Corrected case of dmTx to dmtx on dmtx200 2019-07-18 14:13:43 -06:00
Neil Dorin
77d5438063 Updates to script file 2019-07-12 11:37:16 -06:00
Neil Dorin
42a79f0e1e Merged in testing/jenkinsCI-1 (pull request #20)
Testing/jenkinsCI-1

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2019-07-11 23:34:17 +00:00
Neil Dorin
f8a6ef8c41 Updated readme 2019-07-11 17:13:11 -06:00
Neil Dorin
af1489d511 reset revision number for assembly version to allow CI process to set it. 2019-07-11 16:35:36 -06:00
Neil Dorin
aa2b5b9ab4 Fixes double quotes in script 2019-07-11 12:26:56 -06:00
Neil Dorin
fd2fe8fa6e Comments out set-ExecutionPolicy RemoteSigned from script 2019-07-11 12:22:42 -06:00
Neil Dorin
15c6da43eb Adds PowerShell Script for updating assembly version number 2019-07-11 12:04:37 -06:00
Neil Dorin
6725266ad9 Set SGD files to copy to output directory 2019-07-10 12:01:11 -06:00
Neil Dorin
8f564a82d4 copies Crestron.SimplSharpPro.UI hint path from Essentials Core.csproj which works 2019-07-10 11:55:23 -06:00
119 changed files with 6230 additions and 2195 deletions

3
.gitmodules vendored
View File

@@ -0,0 +1,3 @@
[submodule "essentials-framework/pepperdashcore-builds"]
path = essentials-framework/pepperdashcore-builds
url = https://bitbucket.org/Pepperdash_Products/pepperdashcore-builds.git

View File

@@ -132,6 +132,14 @@ namespace PepperDash.Essentials.AppServer.Messengers
/// 842
/// </summary>
const uint BCameraLayout = 842;
/// <summary>
/// 843
/// </summary>
const uint BCameraSupportsAutoMode = 843;
/// <summary>
/// 844
/// </summary>
const uint BCameraSupportsOffMode = 844;
/********* Ushorts *********/
@@ -294,6 +302,21 @@ namespace PepperDash.Essentials.AppServer.Messengers
PostCallsList();
});
EISC.SetBoolSigAction(BCameraSupportsAutoMode, b =>
{
PostStatusMessage(new
{
cameraSupportsAutoMode = b
});
});
EISC.SetBoolSigAction(BCameraSupportsOffMode, b =>
{
PostStatusMessage(new
{
cameraSupportsOffMode = b
});
});
// Directory insanity
EISC.SetUShortSigAction(UDirectoryRowCount, u =>
{
@@ -455,6 +478,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
calls = GetCurrentCallList(),
cameraMode = GetCameraMode(),
cameraSelfView = EISC.GetBool(BCameraSelfView),
cameraSupportsAutoMode = EISC.GetBool(BCameraSupportsAutoMode),
cameraSupportsOffMode = EISC.GetBool(BCameraSupportsOffMode),
currentCallString = EISC.GetString(SCurrentCallNumber),
currentDialString = EISC.GetString(SCurrentDialString),
directoryContactSelected = new

View File

@@ -81,6 +81,7 @@ namespace PepperDash.Essentials.Room.Cotija
/// 72
/// </summary>
public const uint SourceHasChanged = 71;
/// <summary>
/// 261 - The start of the range of speed dial visibles
/// </summary>
@@ -98,9 +99,17 @@ namespace PepperDash.Essentials.Room.Cotija
/// </summary>
public const uint ShowCameraWhenNotInCall = 503;
/// <summary>
/// 504
/// </summary>
public const uint UseSourceEnabled = 504;
/// <summary>
/// 601
/// </summary>
public const uint SourceShareDisableStartJoin = 601;
public const uint SourceShareDisableJoinStart = 601;
/// <summary>
/// 621
/// </summary>
public const uint SourceIsEnabledJoinStart = 621;
}
@@ -121,7 +130,7 @@ namespace PepperDash.Essentials.Room.Cotija
/// <summary>
/// 101
/// </summary>
public const uint VolumeSliderCount = 101;
public const uint NumberOfAuxFaders = 101;
}
public class StringJoin
@@ -344,6 +353,10 @@ namespace PepperDash.Essentials.Room.Cotija
EISC.PulseBool(BoolJoin.MasterVolumeIsMuted)));
Parent.AddAction(@"/room/room1/volumes/master/privacyMuteToggle", new Action(() =>
EISC.PulseBool(BoolJoin.PrivacyMute)));
// /xyzxyz/volumes/master/muteToggle ---> BoolInput[1]
for (uint i = 2; i <= 7; i++)
{
var index = i;
@@ -410,6 +423,10 @@ namespace PepperDash.Essentials.Room.Cotija
}
}
}));
// map MasterVolumeIsMuted join -> status/volumes/master/muted
//
EISC.SetBoolSigAction(BoolJoin.MasterVolumeIsMuted, b =>
PostStatusMessage(new
{
@@ -464,6 +481,12 @@ namespace PepperDash.Essentials.Room.Cotija
});
}
EISC.SetUShortSigAction(UshortJoin.NumberOfAuxFaders, u =>
PostStatusMessage(new {
volumes = new {
numberOfAuxFaders = u,
}
}));
// shutdown things
EISC.SetSigTrueAction(BoolJoin.ShutdownCancel, new Action(() =>
@@ -558,7 +581,7 @@ namespace PepperDash.Essentials.Room.Cotija
rmProps.VideoCodecKey = "videoCodec";
// volume control names
var volCount = EISC.UShortOutput[UshortJoin.VolumeSliderCount].UShortValue;
var volCount = EISC.UShortOutput[UshortJoin.NumberOfAuxFaders].UShortValue;
//// use Volumes object or?
//rmProps.VolumeSliderNames = new List<string>();
@@ -604,12 +627,17 @@ namespace PepperDash.Essentials.Room.Cotija
for (uint i = 0; i <= 19; i++)
{
var name = EISC.StringOutput[StringJoin.SourceNameJoinStart + i].StringValue;
if(string.IsNullOrEmpty(name))
if (EISC.BooleanOutput[BoolJoin.UseSourceEnabled].BoolValue
&& !EISC.BooleanOutput[BoolJoin.SourceIsEnabledJoinStart + i].BoolValue)
{
continue;
}
else if(!EISC.BooleanOutput[BoolJoin.UseSourceEnabled].BoolValue && string.IsNullOrEmpty(name))
break;
var icon = EISC.StringOutput[StringJoin.SourceIconJoinStart + i].StringValue;
var key = EISC.StringOutput[StringJoin.SourceKeyJoinStart + i].StringValue;
var type = EISC.StringOutput[StringJoin.SourceTypeJoinStart + i].StringValue;
var disableShare = EISC.BooleanOutput[BoolJoin.SourceShareDisableStartJoin + i].BoolValue;
var disableShare = EISC.BooleanOutput[BoolJoin.SourceShareDisableJoinStart + i].BoolValue;
Debug.Console(0, this, "Adding source {0} '{1}'", key, name);
var newSLI = new SourceListItem{
@@ -745,7 +773,7 @@ namespace PepperDash.Essentials.Room.Cotija
{
if (ConfigIsLoaded)
{
var count = EISC.UShortOutput[101].UShortValue;
var count = EISC.UShortOutput[UshortJoin.NumberOfAuxFaders].UShortValue;
Debug.Console(1, this, "The Fader Count is : {0}", count);
@@ -776,6 +804,7 @@ namespace PepperDash.Essentials.Room.Cotija
volumes.Master.PrivacyMuted = EISC.BooleanOutput[BoolJoin.PrivacyMute].BoolValue;
volumes.AuxFaders = auxFaderDict;
volumes.NumberOfAuxFaders = EISC.UShortInput[UshortJoin.NumberOfAuxFaders].UShortValue;
PostStatusMessage(new
{
@@ -862,6 +891,7 @@ namespace PepperDash.Essentials.Room.Cotija
var d = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{
{ "laptop", "pc" },
{ "pc", "pc" },
{ "wireless", "genericsource" },
{ "iptv", "settopbox" }

View File

@@ -16,6 +16,9 @@ namespace PepperDash.Essentials.Room.Cotija
[JsonProperty("auxFaders")]
public Dictionary<string, Volume> AuxFaders { get; set; }
[JsonProperty("numberOfAuxFaders")]
public int NumberOfAuxFaders { get; set; }
public Volumes()
{
AuxFaders = new Dictionary<string, Volume>();

View File

@@ -9,25 +9,27 @@ using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.DM.AirMedia;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class AirMediaControllerApiExtensions
{
public static void LinkToApi(this AirMediaController airMedia, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as AirMediaControllerJoinMap;
AirMediaControllerJoinMap joinMap = new AirMediaControllerJoinMap();
if (joinMap == null)
{
joinMap = new AirMediaControllerJoinMap();
}
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<AirMediaControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Bridge Type {0}", airMedia.GetType().Name.ToString());
Debug.Console(0, "Linking to Airmedia: {0}", airMedia.Name);
trilist.StringInput[joinMap.Name].StringValue = airMedia.GetType().Name.ToString();
trilist.StringInput[joinMap.Name].StringValue = airMedia.Name;
var commMonitor = airMedia as ICommunicationMonitor;
if (commMonitor != null)
@@ -55,68 +57,5 @@ namespace PepperDash.Essentials.Bridges
airMedia.HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB]);
airMedia.SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback]);
}
}
public class AirMediaControllerJoinMap : JoinMapBase
{
// Digital
public uint IsOnline { get; set; }
public uint IsInSession { get; set; }
public uint HdmiVideoSync { get; set; }
public uint AutomaticInputRoutingEnabled { get; set; }
// Analog
public uint VideoOut { get; set; }
public uint ErrorFB { get; set; }
public uint NumberOfUsersConnectedFB { get; set; }
public uint LoginCode { get; set; }
// Serial
public uint Name { get; set; }
public uint ConnectionAddressFB { get; set; }
public uint HostnameFB { get; set; }
public uint SerialNumberFeedback { get; set; }
public AirMediaControllerJoinMap()
{
// Digital
IsOnline = 1;
IsInSession = 2;
HdmiVideoSync = 3;
AutomaticInputRoutingEnabled = 4;
// Analog
VideoOut = 1;
ErrorFB = 2;
NumberOfUsersConnectedFB = 3;
LoginCode = 4;
// Serial
Name = 1;
ConnectionAddressFB = 2;
HostnameFB = 3;
SerialNumberFeedback = 4;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
IsInSession = IsInSession + joinOffset;
HdmiVideoSync = HdmiVideoSync + joinOffset;
AutomaticInputRoutingEnabled = AutomaticInputRoutingEnabled + joinOffset;
VideoOut = VideoOut + joinOffset;
ErrorFB = ErrorFB + joinOffset;
NumberOfUsersConnectedFB = NumberOfUsersConnectedFB + joinOffset;
LoginCode = LoginCode + joinOffset;
Name = Name + joinOffset;
ConnectionAddressFB = ConnectionAddressFB + joinOffset;
HostnameFB = HostnameFB + joinOffset;
SerialNumberFeedback = SerialNumberFeedback + joinOffset;
}
}
}
}

View File

@@ -9,18 +9,20 @@ using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class AppleTvApiExtensions
{
public static void LinkToApi(this AppleTV appleTv, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as AppleTvJoinMap;
AppleTvJoinMap joinMap = new AppleTvJoinMap();
if (joinMap == null)
{
joinMap = new AppleTvJoinMap();
}
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if(!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<AppleTvJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
@@ -36,40 +38,4 @@ namespace PepperDash.Essentials.Bridges
trilist.SetBoolSigAction(joinMap.PlayPause, (b) => appleTv.Play(b));
}
}
public class AppleTvJoinMap : JoinMapBase
{
// Digital
public uint UpArrow { get; set; }
public uint DnArrow { get; set; }
public uint LeftArrow { get; set; }
public uint RightArrow { get; set; }
public uint Menu { get; set; }
public uint Select { get; set; }
public uint PlayPause { get; set; }
public AppleTvJoinMap()
{
UpArrow = 1;
DnArrow = 2;
LeftArrow = 3;
RightArrow = 4;
Menu = 5;
Select = 6;
PlayPause = 7;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
UpArrow = UpArrow + joinOffset;
DnArrow = DnArrow + joinOffset;
LeftArrow = LeftArrow + joinOffset;
RightArrow = RightArrow + joinOffset;
Menu = Menu + joinOffset;
Select = Select + joinOffset;
PlayPause = PlayPause + joinOffset;
}
}
}

View File

@@ -12,6 +12,7 @@ using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Lighting;
using PepperDash.Essentials.Core.Devices;
using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.Devices.Common.Cameras;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.CrestronIO;
using PepperDash.Essentials.DM;
@@ -77,7 +78,12 @@ namespace PepperDash.Essentials.Bridges
if (device != null)
{
if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController)
if (device is IBridge) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type.
{
(device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController)
{
(device as PepperDash.Essentials.Core.Monitoring.SystemMonitorController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
@@ -87,11 +93,11 @@ namespace PepperDash.Essentials.Bridges
(device as GenericComm).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
//else if (device is CameraBase)
//{
// (device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
// continue;
//}
else if (device is CameraBase)
{
(device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is PepperDash.Essentials.Core.DisplayBase)
{
(device as DisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
@@ -102,7 +108,16 @@ namespace PepperDash.Essentials.Bridges
(device as DmChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmpsRoutingController)
{
(device as DmpsRoutingController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmpsAudioOutputController)
{
(device as DmpsAudioOutputController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmTxControllerBase)
{
(device as DmTxControllerBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
@@ -127,22 +142,27 @@ namespace PepperDash.Essentials.Bridges
{
(device as AppleTV).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is IBridge)
}
else if (device is HdMdxxxCEController)
{
(device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
(device as HdMdxxxCEController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is LightingBase)
{
(device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DigitalLogger)
{
(device as DigitalLogger).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is PepperDash.Essentials.Devices.Common.Occupancy.GlsOccupancySensorBaseController)
{
(device as PepperDash.Essentials.Devices.Common.Occupancy.GlsOccupancySensorBaseController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
//else if (device is LightingBase)
//{
// (device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
// continue;
//}
//else if (device is DigitalLogger)
//{
// (device as DigitalLogger).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
// continue;
//}
}
}
@@ -217,16 +237,26 @@ namespace PepperDash.Essentials.Bridges
/// <param name="args"></param>
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
{
if (Debug.Level >= 1)
Debug.Console(1, this, "EiscApi change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
var uo = args.Sig.UserObject;
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
if (uo is Action<bool>)
(uo as Action<bool>)(args.Sig.BoolValue);
else if (uo is Action<ushort>)
(uo as Action<ushort>)(args.Sig.UShortValue);
else if (uo is Action<string>)
(uo as Action<string>)(args.Sig.StringValue);
try
{
if (Debug.Level >= 1)
Debug.Console(1, this, "EiscApi change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
var uo = args.Sig.UserObject;
if (uo != null)
{
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
if (uo is Action<bool>)
(uo as Action<bool>)(args.Sig.BoolValue);
else if (uo is Action<ushort>)
(uo as Action<ushort>)(args.Sig.UShortValue);
else if (uo is Action<string>)
(uo as Action<string>)(args.Sig.StringValue);
}
}
catch (Exception e)
{
Debug.Console(2, this, "Error in Eisc_SigChange handler: {0}", e);
}
}
}

View File

@@ -1,187 +1,137 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro.DeviceSupport;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
using PepperDash.Essentials.Devices.Common.Cameras;
//namespace PepperDash.Essentials.Bridges
//{
// public static class CameraControllerApiExtensions
// {
using Newtonsoft.Json;
// public static BasicTriList _TriList;
// public static CameraControllerJoinMap JoinMap;
// public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
// {
// JoinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as CameraControllerJoinMap;
// _TriList = trilist;
// if (JoinMap == null)
// {
// JoinMap = new CameraControllerJoinMap();
// }
// JoinMap.OffsetJoinNumbers(joinStart);
// Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
// Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
namespace PepperDash.Essentials.Bridges
{
public static class CameraControllerApiExtensions
{
// var commMonitor = cameraDevice as ICommunicationMonitor;
// commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]);
public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
{
CameraControllerJoinMap joinMap = new CameraControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
// trilist.SetBoolSigAction(JoinMap.Left, (b) =>
// {
// if (b)
// {
// cameraDevice.PanLeft();
// }
// else
// {
// cameraDevice.Stop();
// }
// });
// trilist.SetBoolSigAction(JoinMap.Right, (b) =>
// {
// if (b)
// {
// cameraDevice.PanRight();
// }
// else
// {
// cameraDevice.Stop();
// }
// });
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<CameraControllerJoinMap>(joinMapSerialized);
// trilist.SetBoolSigAction(JoinMap.Up, (b) =>
// {
// if (b)
// {
// cameraDevice.TiltUp();
// }
// else
// {
// cameraDevice.Stop();
// }
// });
// trilist.SetBoolSigAction(JoinMap.Down, (b) =>
// {
// if (b)
// {
// cameraDevice.TiltDown();
// }
// else
// {
// cameraDevice.Stop();
// }
// });
joinMap.OffsetJoinNumbers(joinStart);
// trilist.SetBoolSigAction(JoinMap.ZoomIn, (b) =>
// {
// if (b)
// {
// cameraDevice.ZoomIn();
// }
// else
// {
// cameraDevice.Stop();
// }
// });
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString());
// trilist.SetBoolSigAction(JoinMap.ZoomOut, (b) =>
// {
// if (b)
// {
// cameraDevice.ZoomOut();
// }
// else
// {
// cameraDevice.Stop();
// }
// });
var commMonitor = cameraDevice as ICommunicationMonitor;
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
var ptzCamera = cameraDevice as IHasCameraPtzControl;
// if (cameraDevice.GetType().Name.ToString().ToLower() == "cameravisca")
// {
// var viscaCamera = cameraDevice as PepperDash.Essentials.Devices.Common.Cameras.CameraVisca;
// trilist.SetSigTrueAction(JoinMap.PowerOn, () => viscaCamera.PowerOn());
// trilist.SetSigTrueAction(JoinMap.PowerOff, () => viscaCamera.PowerOff());
if (ptzCamera != null)
{
trilist.SetBoolSigAction(joinMap.Left, (b) =>
{
if (b)
{
ptzCamera.PanLeft();
}
else
{
ptzCamera.PanStop();
}
});
trilist.SetBoolSigAction(joinMap.Right, (b) =>
{
if (b)
{
ptzCamera.PanRight();
}
else
{
ptzCamera.PanStop();
}
});
// viscaCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.PowerOn]);
// viscaCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[JoinMap.PowerOff]);
trilist.SetBoolSigAction(joinMap.Up, (b) =>
{
if (b)
{
ptzCamera.TiltUp();
}
else
{
ptzCamera.TiltStop();
}
});
trilist.SetBoolSigAction(joinMap.Down, (b) =>
{
if (b)
{
ptzCamera.TiltDown();
}
else
{
ptzCamera.TiltStop();
}
});
// viscaCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]);
// for (int i = 0; i < JoinMap.NumberOfPresets; i++)
// {
// int tempNum = i;
// trilist.SetSigTrueAction((ushort)(JoinMap.PresetRecallOffset + tempNum), () =>
// {
// viscaCamera.RecallPreset(tempNum);
// });
// trilist.SetSigTrueAction((ushort)(JoinMap.PresetSaveOffset + tempNum), () =>
// {
// viscaCamera.SavePreset(tempNum);
// });
// }
// }
trilist.SetBoolSigAction(joinMap.ZoomIn, (b) =>
{
if (b)
{
ptzCamera.ZoomIn();
}
else
{
ptzCamera.ZoomStop();
}
});
// }
trilist.SetBoolSigAction(joinMap.ZoomOut, (b) =>
{
if (b)
{
ptzCamera.ZoomOut();
}
else
{
ptzCamera.ZoomStop();
}
});
}
if (cameraDevice.GetType().Name.ToString().ToLower() == "cameravisca")
{
var viscaCamera = cameraDevice as PepperDash.Essentials.Devices.Common.Cameras.CameraVisca;
trilist.SetSigTrueAction(joinMap.PowerOn, () => viscaCamera.PowerOn());
trilist.SetSigTrueAction(joinMap.PowerOff, () => viscaCamera.PowerOff());
// }
// public class CameraControllerJoinMap : JoinMapBase
// {
// public uint IsOnline { get; set; }
// public uint PowerOff { get; set; }
// public uint PowerOn { get; set; }
// public uint Up { get; set; }
// public uint Down { get; set; }
// public uint Left { get; set; }
// public uint Right { get; set; }
// public uint ZoomIn { get; set; }
// public uint ZoomOut { get; set; }
// public uint PresetRecallOffset { get; set; }
// public uint PresetSaveOffset { get; set; }
// public uint NumberOfPresets { get; set; }
viscaCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
viscaCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
// public CameraControllerJoinMap()
// {
// // Digital
// IsOnline = 9;
// PowerOff = 8;
// PowerOn = 7;
// Up = 1;
// Down = 2;
// Left = 3;
// Right = 4;
// ZoomIn = 5;
// ZoomOut = 6;
// PresetRecallOffset = 10;
// PresetSaveOffset = 30;
// NumberOfPresets = 5;
// // Analog
// }
viscaCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
for (int i = 0; i < joinMap.NumberOfPresets; i++)
{
int tempNum = i;
trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallOffset + tempNum), () =>
{
viscaCamera.RecallPreset(tempNum);
});
trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveOffset + tempNum), () =>
{
viscaCamera.SavePreset(tempNum);
});
}
}
}
}
// public override void OffsetJoinNumbers(uint joinStart)
// {
// var joinOffset = joinStart - 1;
// IsOnline = IsOnline + joinOffset;
// PowerOff = PowerOff + joinOffset;
// PowerOn = PowerOn + joinOffset;
// Up = Up + joinOffset;
// Down = Down + joinOffset;
// Left = Left + joinOffset;
// Right = Right + joinOffset;
// ZoomIn = ZoomIn + joinOffset;
// ZoomOut = ZoomOut + joinOffset;
// PresetRecallOffset = PresetRecallOffset + joinOffset;
// PresetSaveOffset = PresetSaveOffset + joinOffset;
// }
// }
//}
}

View File

@@ -1,77 +1,42 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro.DeviceSupport;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
//namespace PepperDash.Essentials.Bridges
//{
// public static class DigitalLoggerApiExtensions
// {
// public static void LinkToApi(this DigitalLogger DigitalLogger, BasicTriList trilist, uint joinStart, string joinMapKey)
// {
// var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DigitalLoggerJoinMap;
using Newtonsoft.Json;
// if (joinMap == null)
// joinMap = new DigitalLoggerJoinMap();
namespace PepperDash.Essentials.Bridges
{
public static class DigitalLoggerApiExtensions
{
public static void LinkToApi(this DigitalLogger DigitalLogger, BasicTriList trilist, uint joinStart, string joinMapKey)
{
DigitalLoggerJoinMap joinMap = new DigitalLoggerJoinMap();
// joinMap.OffsetJoinNumbers(joinStart);
// Debug.Console(1, DigitalLogger, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
// for (uint i = 1; i <= DigitalLogger.CircuitCount; i++)
// {
// var circuit = i;
// DigitalLogger.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
// DigitalLogger.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
// DigitalLogger.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
// trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => DigitalLogger.CycleCircuit(circuit - 1));
// trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => DigitalLogger.TurnOnCircuit(circuit - 1));
// trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => DigitalLogger.TurnOffCircuit(circuit - 1));
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
// }
// }
// }
// public class DigitalLoggerJoinMap : JoinMapBase
// {
// public uint IsOnline { get; set; }
// public uint CircuitNames { get; set; }
// public uint CircuitState { get; set; }
// public uint CircuitCycle { get; set; }
// public uint CircuitIsCritical { get; set; }
// public uint CircuitOnCmd { get; set; }
// public uint CircuitOffCmd { get; set; }
// public DigitalLoggerJoinMap()
// {
// // Digital
// IsOnline = 9;
// CircuitState = 0;
// CircuitCycle = 0;
// CircuitIsCritical = 10;
// CircuitOnCmd = 10;
// CircuitOffCmd = 20;
// // Serial
// CircuitNames = 0;
// // Analog
// }
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DigitalLoggerJoinMap>(joinMapSerialized);
// public override void OffsetJoinNumbers(uint joinStart)
// {
// var joinOffset = joinStart - 1;
joinMap.OffsetJoinNumbers(joinStart);
// IsOnline = IsOnline + joinOffset;
// CircuitNames = CircuitNames + joinOffset;
// CircuitState = CircuitState + joinOffset;
// CircuitCycle = CircuitCycle + joinOffset;
// CircuitIsCritical = CircuitIsCritical + joinOffset;
// CircuitOnCmd = CircuitOnCmd + joinOffset;
// CircuitOffCmd = CircuitOffCmd + joinOffset;
Debug.Console(1, DigitalLogger, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
for (uint i = 1; i <= DigitalLogger.CircuitCount; i++)
{
var circuit = i;
DigitalLogger.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
DigitalLogger.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
DigitalLogger.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => DigitalLogger.CycleCircuit(circuit - 1));
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => DigitalLogger.TurnOnCircuit(circuit - 1));
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => DigitalLogger.TurnOffCircuit(circuit - 1));
// }
// }
//}
}
}
}
}

View File

@@ -8,123 +8,139 @@ using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DisplayControllerApiExtensions
{
public static int InputNumber;
public static IntFeedback InputNumberFeedback;
public static List<string> InputKeys = new List<string>();
public static void LinkToApi(this PepperDash.Essentials.Core.DisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
{
int inputNumber = 0;
IntFeedback inputNumberFeedback;
List<string> inputKeys = new List<string>();
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap;
DisplayControllerJoinMap joinMap = new DisplayControllerJoinMap();
if (joinMap == null)
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if(!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DisplayControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, "Linking to Trilist '{0}'",trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Display: {0}", displayDevice.Name);
trilist.StringInput[joinMap.Name].StringValue = displayDevice.Name;
var commMonitor = displayDevice as ICommunicationMonitor;
if (commMonitor != null)
{
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
}
inputNumberFeedback = new IntFeedback(() => { return inputNumber; });
// Two way feedbacks
var twoWayDisplay = displayDevice as PepperDash.Essentials.Core.TwoWayDisplayBase;
if (twoWayDisplay != null)
{
trilist.SetBool(joinMap.IsTwoWayDisplay, true);
twoWayDisplay.CurrentInputFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(CurrentInputFeedback_OutputChange);
inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect]);
}
// Power Off
trilist.SetSigTrueAction(joinMap.PowerOff, () =>
{
joinMap = new DisplayControllerJoinMap();
}
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, "Linking to Trilist '{0}'",trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Bridge Type {0}", displayDevice.GetType().Name.ToString());
trilist.StringInput[joinMap.Name].StringValue = displayDevice.GetType().Name.ToString();
var commMonitor = displayDevice as ICommunicationMonitor;
if (commMonitor != null)
{
commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
}
InputNumberFeedback = new IntFeedback(() => { return InputNumber; });
// Two way feedbacks
var twoWayDisplay = displayDevice as PepperDash.Essentials.Core.TwoWayDisplayBase;
if (twoWayDisplay != null)
{
trilist.SetBool(joinMap.IsTwoWayDisplay, true);
twoWayDisplay.CurrentInputFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(CurrentInputFeedback_OutputChange);
InputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect]);
}
// Power Off
trilist.SetSigTrueAction(joinMap.PowerOff, () =>
{
InputNumber = 102;
InputNumberFeedback.FireUpdate();
displayDevice.PowerOff();
});
displayDevice.PowerIsOnFeedback.OutputChange += new EventHandler<FeedbackEventArgs>(PowerIsOnFeedback_OutputChange);
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
// PowerOn
trilist.SetSigTrueAction(joinMap.PowerOn, () =>
{
InputNumber = 0;
InputNumberFeedback.FireUpdate();
displayDevice.PowerOn();
});
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
int count = 1;
foreach (var input in displayDevice.InputPorts)
{
InputKeys.Add(input.Key.ToString());
var tempKey = InputKeys.ElementAt(count - 1);
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); });
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset + count, displayDevice.InputPorts[tempKey].Key.ToString());
trilist.StringInput[(ushort)(joinMap.InputNamesOffset + count)].StringValue = input.Key.ToString();
count++;
}
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect);
trilist.SetUShortSigAction(joinMap.InputSelect, (a) =>
{
if (a == 0)
{
displayDevice.PowerOff();
InputNumber = 0;
}
else if (a > 0 && a < displayDevice.InputPorts.Count && a != InputNumber)
{
displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector);
InputNumber = a;
}
else if (a == 102)
{
displayDevice.PowerToggle();
}
if (twoWayDisplay != null)
InputNumberFeedback.FireUpdate();
inputNumber = 102;
inputNumberFeedback.FireUpdate();
displayDevice.PowerOff();
});
var volumeDisplay = displayDevice as IBasicVolumeControls;
if (volumeDisplay != null)
displayDevice.PowerIsOnFeedback.OutputChange += new EventHandler<FeedbackEventArgs>( (o,a) => {
if (!a.BoolValue)
{
trilist.SetBoolSigAction(joinMap.VolumeUp, (b) => volumeDisplay.VolumeUp(b));
trilist.SetBoolSigAction(joinMap.VolumeDown, (b) => volumeDisplay.VolumeDown(b));
trilist.SetSigTrueAction(joinMap.VolumeMute, () => volumeDisplay.MuteToggle());
inputNumber = 102;
inputNumberFeedback.FireUpdate();
var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback;
if(volumeDisplayWithFeedback != null)
{
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevelFB]);
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute]);
}
}
else
{
inputNumber = 0;
inputNumberFeedback.FireUpdate();
}
});
displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]);
// PowerOn
trilist.SetSigTrueAction(joinMap.PowerOn, () =>
{
inputNumber = 0;
inputNumberFeedback.FireUpdate();
displayDevice.PowerOn();
});
displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]);
int count = 1;
foreach (var input in displayDevice.InputPorts)
{
inputKeys.Add(input.Key.ToString());
var tempKey = inputKeys.ElementAt(count - 1);
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); });
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset + count, displayDevice.InputPorts[tempKey].Key.ToString());
trilist.StringInput[(ushort)(joinMap.InputNamesOffset + count)].StringValue = input.Key.ToString();
count++;
}
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect);
trilist.SetUShortSigAction(joinMap.InputSelect, (a) =>
{
if (a == 0)
{
displayDevice.PowerOff();
inputNumber = 0;
}
else if (a > 0 && a < displayDevice.InputPorts.Count && a != inputNumber)
{
displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector);
inputNumber = a;
}
else if (a == 102)
{
displayDevice.PowerToggle();
}
if (twoWayDisplay != null)
inputNumberFeedback.FireUpdate();
});
var volumeDisplay = displayDevice as IBasicVolumeControls;
if (volumeDisplay != null)
{
trilist.SetBoolSigAction(joinMap.VolumeUp, (b) => volumeDisplay.VolumeUp(b));
trilist.SetBoolSigAction(joinMap.VolumeDown, (b) => volumeDisplay.VolumeDown(b));
trilist.SetSigTrueAction(joinMap.VolumeMute, () => volumeDisplay.MuteToggle());
var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback;
if(volumeDisplayWithFeedback != null)
{
trilist.SetUShortSigAction(joinMap.VolumeLevel, new Action<ushort>((u) => volumeDisplayWithFeedback.SetVolume(u)));
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel]);
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute]);
}
}
}
static void CurrentInputFeedback_OutputChange(object sender, FeedbackEventArgs e)
{
@@ -132,91 +148,6 @@ namespace PepperDash.Essentials.Bridges
}
static void PowerIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e)
{
// Debug.Console(0, "PowerIsOnFeedback_OutputChange {0}", e.BoolValue);
if (!e.BoolValue)
{
InputNumber = 102;
InputNumberFeedback.FireUpdate();
}
else
{
InputNumber = 0;
InputNumberFeedback.FireUpdate();
}
}
}
public class DisplayControllerJoinMap : JoinMapBase
{
// Digital
public uint PowerOff { get; set; }
public uint PowerOn { get; set; }
public uint IsTwoWayDisplay { get; set; }
public uint VolumeUp { get; set; }
public uint VolumeDown { get; set; }
public uint VolumeMute { get; set; }
public uint InputSelectOffset { get; set; }
public uint ButtonVisibilityOffset { get; set; }
public uint IsOnline { get; set; }
// Analog
public uint InputSelect { get; set; }
public uint VolumeLevelFB { get; set; }
// Serial
public uint Name { get; set; }
public uint InputNamesOffset { get; set; }
public DisplayControllerJoinMap()
{
// Digital
IsOnline = 50;
PowerOff = 1;
PowerOn = 2;
IsTwoWayDisplay = 3;
VolumeUp = 5;
VolumeDown = 6;
VolumeMute = 7;
ButtonVisibilityOffset = 40;
InputSelectOffset = 10;
// Analog
InputSelect = 11;
VolumeLevelFB = 5;
// Serial
Name = 1;
InputNamesOffset = 10;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
PowerOff = PowerOff + joinOffset;
PowerOn = PowerOn + joinOffset;
IsTwoWayDisplay = IsTwoWayDisplay + joinOffset;
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
Name = Name + joinOffset;
InputNamesOffset = InputNamesOffset + joinOffset;
InputSelectOffset = InputSelectOffset + joinOffset;
InputSelect = InputSelect + joinOffset;
VolumeUp = VolumeUp + joinOffset;
VolumeDown = VolumeDown + joinOffset;
VolumeMute = VolumeMute + joinOffset;
VolumeLevelFB = VolumeLevelFB + joinOffset;
}
}
}

View File

@@ -4,21 +4,29 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Endpoints;
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DmChassisControllerApiExtentions
public static class DmChassisControllerApiExtentions
{
public static void LinkToApi(this DmChassisController dmChassis, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmChassisControllerJoinMap;
DmChassisControllerJoinMap joinMap = new DmChassisControllerJoinMap();
if (joinMap == null)
joinMap = new DmChassisControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmChassisControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
@@ -26,105 +34,249 @@ namespace PepperDash.Essentials.Bridges
dmChassis.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
trilist.SetUShortSigAction(joinMap.SystemId, new Action<ushort>(o => dmChassis.Chassis.SystemId.UShortValue = o));
trilist.SetSigTrueAction(joinMap.SystemId, new Action(() => dmChassis.Chassis.ApplySystemId()));
dmChassis.SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId]);
dmChassis.SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId]);
// Link up outputs
for (uint i = 1; i <= dmChassis.Chassis.NumberOfOutputs - 1; i++)
for (uint i = 1; i <= dmChassis.Chassis.NumberOfOutputs; i++)
{
var ioSlot = i;
// Control
trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, new Action<ushort>(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video)));
trilist.SetUShortSigAction(joinMap.OutputAudio + ioSlot, new Action<ushort>(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio)));
if (dmChassis.TxDictionary.ContainsKey(ioSlot))
{
Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
var TxKey = dmChassis.TxDictionary[ioSlot];
var TxDevice = DeviceManager.GetDeviceForKey(TxKey) as DmTxControllerBase;
TxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
// TxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
// trilist.SetUShortSigAction((ApiMap.HdcpSupport[ioSlot]), u => TxDevice.SetHdcpSupportAll((ePdtHdcpSupport)(u)));
// TxDevice.HdcpSupportAllFeedback.LinkInputSig(trilist.UShortInput[joinMap. + ioSlot]);
// trilist.UShortInput[ApiMap.HdcpSupportCapability[ioSlot]].UShortValue = TxDevice.HdcpSupportCapability;
}
else
{
// dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[ApiMap.TxVideoSyncStatus[ioSlot]]);
}
if (dmChassis.RxDictionary.ContainsKey(ioSlot))
{
Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
var RxKey = dmChassis.RxDictionary[ioSlot];
var RxDevice = DeviceManager.GetDeviceForKey(RxKey) as DmRmcControllerBase;
RxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
}
trilist.SetUShortSigAction(joinMap.OutputUsb + ioSlot, new Action<ushort>(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbOutput)));
trilist.SetUShortSigAction(joinMap.InputUsb + ioSlot, new Action<ushort>(o => dmChassis.ExecuteSwitch(o, ioSlot, eRoutingSignalType.UsbInput)));
if (dmChassis.TxDictionary.ContainsKey(ioSlot))
{
Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
var txKey = dmChassis.TxDictionary[ioSlot];
var basicTxDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
var advancedTxDevice = basicTxDevice as DmTxControllerBase;
if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps
|| dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps
|| dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps)
{
dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
}
else
{
if (advancedTxDevice != null)
{
advancedTxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
}
else if (dmChassis.InputEndpointOnlineFeedbacks[ioSlot] != null)
{
Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
}
}
if (basicTxDevice != null && advancedTxDevice == null)
trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
if (advancedTxDevice != null)
{
advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
}
else if(advancedTxDevice == null || basicTxDevice != null)
{
Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
if (inputPort != null)
{
Debug.Console(1, "Port value for input card {0} is set", ioSlot);
var port = inputPort.Port;
if (port != null)
{
if (port is HdmiInputWithCEC)
{
Debug.Console(1, "Port is HdmiInputWithCec");
var hdmiInPortWCec = port as HdmiInputWithCEC;
if (hdmiInPortWCec.HdcpSupportedLevel != eHdcpSupportedLevel.Unknown)
{
SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
}
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
if(dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot];
else
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
}
}
}
else
{
inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)];
if(inputPort != null)
{
var port = inputPort.Port;
if (port is DMInputPortWithCec)
{
Debug.Console(1, "Port is DMInputPortWithCec");
var dmInPortWCec = port as DMInputPortWithCec;
if (dmInPortWCec != null)
{
SetHdcpStateAction(dmChassis.PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], dmInPortWCec, joinMap.HdcpSupportState + ioSlot, trilist);
}
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
if (dmChassis.InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = (ushort)dmChassis.InputCardHdcpCapabilityTypes[ioSlot];
else
trilist.UShortInput[joinMap.HdcpSupportCapability + ioSlot].UShortValue = 1;
}
}
}
}
}
else
{
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
if (inputPort != null)
{
var hdmiPort = inputPort.Port as EndpointHdmiInput;
if (hdmiPort != null)
{
SetHdcpStateAction(true, hdmiPort, joinMap.HdcpSupportState + ioSlot, trilist);
dmChassis.InputCardHdcpCapabilityFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportState + ioSlot]);
}
}
}
if (dmChassis.RxDictionary.ContainsKey(ioSlot))
{
Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
var rxKey = dmChassis.RxDictionary[ioSlot];
var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
if (dmChassis.Chassis is DmMd8x8Cpu3 || dmChassis.Chassis is DmMd8x8Cpu3rps
|| dmChassis.Chassis is DmMd16x16Cpu3 || dmChassis.Chassis is DmMd16x16Cpu3rps
|| dmChassis.Chassis is DmMd32x32Cpu3 || dmChassis.Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null)
{
dmChassis.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
}
else if (rxDevice != null)
{
rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
}
}
// Feedback
dmChassis.VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
dmChassis.AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio + ioSlot]);
dmChassis.UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb + ioSlot]);
dmChassis.UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb + ioSlot]);
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
dmChassis.OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
dmChassis.InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
dmChassis.OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
dmChassis.OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]);
// dmChassis.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
// dmChassis.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
}
}
public class DmChassisControllerJoinMap : JoinMapBase
static void SetHdcpStateAction(bool hdcpTypeSimple, HdmiInputWithCEC port, uint join, BasicTriList trilist)
{
public uint IsOnline { get; set; }
public uint OutputVideo { get; set; }
public uint OutputAudio { get; set; }
public uint VideoSyncStatus { get; set; }
public uint InputNames { get; set; }
public uint OutputNames { get; set; }
public uint OutputCurrentVideoInputNames { get; set; }
public uint OutputCurrentAudioInputNames { get; set; }
public uint InputCurrentResolution { get; set; }
public uint InputEndpointOnline { get; set; }
public uint OutputEndpointOnline { get; set; }
//public uint HdcpSupport { get; set; }
//public uint HdcpSupportCapability { get; set; }
public DmChassisControllerJoinMap()
if (hdcpTypeSimple)
{
IsOnline = 11;
OutputVideo = 100; //101-299
OutputAudio = 300; //301-499
VideoSyncStatus = 100; //101-299
InputNames = 100; //101-299
OutputNames = 300; //301-499
OutputCurrentVideoInputNames = 2000; //2001-2199
OutputCurrentAudioInputNames = 2200; //2201-2399
InputCurrentResolution = 2400; // 2401-2599
InputEndpointOnline = 500;
OutputEndpointOnline = 700;
//HdcpSupport = 1000; //1001-1199
//HdcpSupportCapability = 1200; //1201-1399
trilist.SetUShortSigAction(join,
new Action<ushort>(s =>
{
if (s == 0)
{
port.HdcpSupportOff();
}
else if (s > 0)
{
port.HdcpSupportOn();
}
}));
}
public override void OffsetJoinNumbers(uint joinStart)
else
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
OutputVideo = OutputVideo + joinOffset;
OutputAudio = OutputAudio + joinOffset;
VideoSyncStatus = VideoSyncStatus + joinOffset;
InputNames = InputNames + joinOffset;
OutputNames = OutputNames + joinOffset;
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset;
InputCurrentResolution = InputCurrentResolution + joinOffset;
InputEndpointOnline = InputEndpointOnline + joinOffset;
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
//HdcpSupport = HdcpSupport + joinOffset;
//HdcpSupportCapability = HdcpSupportCapability + joinOffset;
trilist.SetUShortSigAction(join,
new Action<ushort>(u =>
{
port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
}));
}
}
static void SetHdcpStateAction(bool hdcpTypeSimple, EndpointHdmiInput port, uint join, BasicTriList trilist)
{
if (hdcpTypeSimple)
{
trilist.SetUShortSigAction(join,
new Action<ushort>(s =>
{
if (s == 0)
{
port.HdcpSupportOff();
}
else if (s > 0)
{
port.HdcpSupportOn();
}
}));
}
else
{
trilist.SetUShortSigAction(join,
new Action<ushort>(u =>
{
port.HdcpCapability = (eHdcpCapabilityType)u;
}));
}
}
static void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist)
{
if (!supportsHdcp2)
{
trilist.SetUShortSigAction(join,
new Action<ushort>(s =>
{
if (s == 0)
{
port.HdcpSupportOff();
}
else if (s > 0)
{
port.HdcpSupportOn();
}
}));
}
else
{
trilist.SetUShortSigAction(join,
new Action<ushort>(u =>
{
port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
}));
}
}
}
}

View File

@@ -9,16 +9,20 @@ using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DmRmcControllerApiExtensions
{
public static void LinkToApi(this DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmRmcControllerJoinMap;
DmRmcControllerJoinMap joinMap = new DmRmcControllerJoinMap();
if (joinMap == null)
joinMap = new DmRmcControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmRmcControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
@@ -36,40 +40,5 @@ namespace PepperDash.Essentials.Bridges
if(rmc.EdidSerialNumberFeedback != null)
rmc.EdidSerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.EdidSerialNumber]);
}
public class DmRmcControllerJoinMap : JoinMapBase
{
public uint IsOnline { get; set; }
public uint CurrentOutputResolution { get; set; }
public uint EdidManufacturer { get; set; }
public uint EdidName { get; set; }
public uint EdidPrefferedTiming { get; set; }
public uint EdidSerialNumber { get; set; }
public DmRmcControllerJoinMap()
{
// Digital
IsOnline = 1;
// Serial
CurrentOutputResolution = 1;
EdidManufacturer = 2;
EdidName = 3;
EdidPrefferedTiming = 4;
EdidSerialNumber = 5;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
CurrentOutputResolution = CurrentOutputResolution + joinOffset;
EdidManufacturer = EdidManufacturer + joinOffset;
EdidName = EdidName + joinOffset;
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
EdidSerialNumber = EdidSerialNumber + joinOffset;
}
}
}
}

View File

@@ -12,16 +12,20 @@ using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DmTxControllerApiExtensions
{
public static void LinkToApi(this DmTxControllerBase tx, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmTxControllerJoinMap;
DmTxControllerJoinMap joinMap = new DmTxControllerJoinMap();
if (joinMap == null)
joinMap = new DmTxControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmTxControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
@@ -30,7 +34,7 @@ namespace PepperDash.Essentials.Bridges
tx.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
tx.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus]);
tx.AnyVideoInput.VideoStatus.VideoResolutionFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentInputResolution]);
//tx.HdcpSupportAllFeedback.LinkInputSig(trilist.UShortInput[joinMap.HdcpSupportCapability]);
trilist.UShortInput[joinMap.HdcpSupportCapability].UShortValue = (ushort)tx.HdcpSupportCapability;
bool hdcpTypeSimple;
@@ -128,46 +132,6 @@ namespace PepperDash.Essentials.Bridges
}
}
public class DmTxControllerJoinMap : JoinMapBase
{
public uint IsOnline { get; set; }
public uint VideoSyncStatus { get; set; }
public uint CurrentInputResolution { get; set; }
public uint HdcpSupportCapability { get; set; }
public uint VideoInput { get; set; }
public uint AudioInput { get; set; }
public uint Port1HdcpState { get; set; }
public uint Port2HdcpState { get; set; }
public DmTxControllerJoinMap()
{
// Digital
IsOnline = 1;
VideoSyncStatus = 2;
// Serial
CurrentInputResolution = 1;
// Analog
VideoInput = 1;
AudioInput = 2;
HdcpSupportCapability = 3;
Port1HdcpState = 4;
Port2HdcpState = 5;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
VideoSyncStatus = VideoSyncStatus + joinOffset;
CurrentInputResolution = CurrentInputResolution + joinOffset;
VideoInput = VideoInput + joinOffset;
AudioInput = AudioInput + joinOffset;
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
Port1HdcpState = Port1HdcpState + joinOffset;
Port2HdcpState = Port2HdcpState + joinOffset;
}
}
}
}

View File

@@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DmpsAudioOutputControllerApiExtensions
{
public static void LinkToApi(this DmpsAudioOutputController dmAudioOutputController, BasicTriList trilist, uint joinStart, string joinMapKey)
{
DmpsAudioOutputControllerJoinMap joinMap = new DmpsAudioOutputControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmpsAudioOutputControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, dmAudioOutputController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
if (dmAudioOutputController.MasterVolumeLevel != null)
{
SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.MasterVolumeLevel, joinMap.MasterVolume);
}
if (dmAudioOutputController.SourceVolumeLevel != null)
{
SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.SourceVolumeLevel, joinMap.SourceVolume);
}
if (dmAudioOutputController.Codec1VolumeLevel != null)
{
SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.Codec1VolumeLevel, joinMap.Codec1Volume);
}
if (dmAudioOutputController.Codec2VolumeLevel != null)
{
SetUpDmpsAudioOutputJoins(trilist, dmAudioOutputController.Codec2VolumeLevel, joinMap.Codec2Volume);
}
}
static void SetUpDmpsAudioOutputJoins(BasicTriList trilist, DmpsAudioOutput output, uint joinStart)
{
var volumeLevelJoin = joinStart;
var muteOnJoin = joinStart;
var muteOffJoin = joinStart + 1;
var volumeUpJoin = joinStart + 2;
var volumeDownJoin = joinStart + 3;
trilist.SetUShortSigAction(volumeLevelJoin, new Action<ushort>(o => output.SetVolume(o)));
output.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[volumeLevelJoin]);
trilist.SetSigTrueAction(muteOnJoin, new Action(output.MuteOn));
output.MuteFeedback.LinkInputSig(trilist.BooleanInput[muteOnJoin]);
trilist.SetSigTrueAction(muteOffJoin, new Action(output.MuteOff));
output.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[muteOffJoin]);
trilist.SetBoolSigAction(volumeUpJoin, new Action<bool>(b => output.VolumeUp(b)));
trilist.SetBoolSigAction(volumeDownJoin, new Action<bool>(b => output.VolumeDown(b)));
}
}
}

View File

@@ -0,0 +1,128 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DmpsRoutingControllerApiExtentions
{
public static void LinkToApi(this DmpsRoutingController dmpsRouter, BasicTriList trilist, uint joinStart, string joinMapKey)
{
DmpsRoutingControllerJoinMap joinMap = new DmpsRoutingControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<DmpsRoutingControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, dmpsRouter, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
// Link up outputs
for (uint i = 1; i <= dmpsRouter.Dmps.NumberOfSwitcherInputs; i++)
{
Debug.Console(2, dmpsRouter, "Linking Input Card {0}", i);
var ioSlot = i;
//if (dmpsRouter.TxDictionary.ContainsKey(ioSlot))
//{
// Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
// var TxKey = dmpsRouter.TxDictionary[ioSlot];
// var TxDevice = DeviceManager.GetDeviceForKey(TxKey) as DmTxControllerBase;
// //TxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
// // TxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
// // trilist.SetUShortSigAction((ApiMap.HdcpSupport[ioSlot]), u => TxDevice.SetHdcpSupportAll((ePdtHdcpSupport)(u)));
// // TxDevice.HdcpSupportAllFeedback.LinkInputSig(trilist.UShortInput[joinMap. + ioSlot]);
// // trilist.UShortInput[ApiMap.HdcpSupportCapability[ioSlot]].UShortValue = TxDevice.HdcpSupportCapability;
//}
//else
//{
// // dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[ApiMap.TxVideoSyncStatus[ioSlot]]);
//}
if(dmpsRouter.VideoInputSyncFeedbacks[ioSlot] != null)
dmpsRouter.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
if (dmpsRouter.InputNameFeedbacks[ioSlot] != null)
dmpsRouter.InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]);
trilist.SetStringSigAction(joinMap.InputNames + ioSlot, new Action<string>(s =>
{
var inputCard = dmpsRouter.Dmps.SwitcherInputs[ioSlot] as DMInput;
if (inputCard != null)
{
if (inputCard.NameFeedback != null && !string.IsNullOrEmpty(inputCard.NameFeedback.StringValue) && inputCard.NameFeedback.StringValue != s)
if(inputCard.Name != null)
inputCard.Name.StringValue = s;
}
}));
if(dmpsRouter.InputEndpointOnlineFeedbacks[ioSlot] != null)
dmpsRouter.InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]);
}
for (uint i = 1; i <= dmpsRouter.Dmps.NumberOfSwitcherOutputs; i++)
{
Debug.Console(2, dmpsRouter, "Linking Output Card {0}", i);
var ioSlot = i;
// Control
trilist.SetUShortSigAction(joinMap.OutputVideo + ioSlot, new Action<ushort>(o => dmpsRouter.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Video)));
trilist.SetUShortSigAction(joinMap.OutputAudio + ioSlot, new Action<ushort>(o => dmpsRouter.ExecuteSwitch(o, ioSlot, eRoutingSignalType.Audio)));
trilist.SetStringSigAction(joinMap.OutputNames + ioSlot, new Action<string>(s =>
{
var outputCard = dmpsRouter.Dmps.SwitcherOutputs[ioSlot] as DMOutput;
//Debug.Console(2, dmpsRouter, "Output Name String Sig Action for Output Card {0}", ioSlot);
if (outputCard != null)
{
//Debug.Console(2, dmpsRouter, "Card Type: {0}", outputCard.CardInputOutputType);
if (!(outputCard is Crestron.SimplSharpPro.DM.Cards.Card.Dmps3CodecOutput) && outputCard.NameFeedback != null)
{
if (!string.IsNullOrEmpty(outputCard.NameFeedback.StringValue))
{
//Debug.Console(2, dmpsRouter, "NameFeedabck: {0}", outputCard.NameFeedback.StringValue);
if (outputCard.NameFeedback.StringValue != s && outputCard.Name != null)
{
outputCard.Name.StringValue = s;
}
}
}
}
}));
// Feedback
if(dmpsRouter.VideoOutputFeedbacks[ioSlot] != null)
dmpsRouter.VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo + ioSlot]);
if (dmpsRouter.AudioOutputFeedbacks[ioSlot] != null)
dmpsRouter.AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio + ioSlot]);
if (dmpsRouter.OutputNameFeedbacks[ioSlot] != null)
dmpsRouter.OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]);
if (dmpsRouter.OutputVideoRouteNameFeedbacks[ioSlot] != null)
dmpsRouter.OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentVideoInputNames + ioSlot]);
if (dmpsRouter.OutputAudioRouteNameFeedbacks[ioSlot] != null)
dmpsRouter.OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputCurrentAudioInputNames + ioSlot]);
if (dmpsRouter.OutputEndpointOnlineFeedbacks[ioSlot] != null)
dmpsRouter.OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline + ioSlot]);
}
}
}
}

View File

@@ -1,103 +1,74 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro.DeviceSupport;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common;
//namespace PepperDash.Essentials.Bridges
//{
// public static class GenericLightingApiExtensions
// {
// public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
// {
// var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as GenericLightingJoinMap;
using Newtonsoft.Json;
// if (joinMap == null)
// joinMap = new GenericLightingJoinMap();
namespace PepperDash.Essentials.Bridges
{
public static class GenericLightingApiExtensions
{
public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey)
{
GenericLightingJoinMap joinMap = new GenericLightingJoinMap();
// joinMap.OffsetJoinNumbers(joinStart);
// Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<GenericLightingJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString());
// GenericLighitng Actions & FeedBack
trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
int sceneIndex = 1;
foreach (var scene in lightingDevice.LightingScenes)
{
var tempIndex = sceneIndex - 1;
trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
sceneIndex++;
}
if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea")
{
var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
}
//ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
/*
var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
for (uint i = 1; i <= lightingBase.CircuitCount; i++)
{
var circuit = i;
lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
// Debug.Console(0, "Linking to lighting Type {0}", lightingDevice.GetType().Name.ToString());
// // GenericLighitng Actions & FeedBack
// trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
// int sceneIndex = 1;
// foreach (var scene in lightingDevice.LightingScenes)
// {
// var tempIndex = sceneIndex - 1;
// trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex]));
// scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]);
// trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name;
// trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true;
// sceneIndex++;
// }
// if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea")
// {
// var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
// lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
// trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s);
// }
// //ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; });
// /*
// var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea;
// for (uint i = 1; i <= lightingBase.CircuitCount; i++)
// {
// var circuit = i;
// lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]);
// lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]);
// lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]);
// trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1));
// trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1));
// trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1));
// }
// */
// }
// }
// public class GenericLightingJoinMap : JoinMapBase
// {
// public uint IsOnline { get; set; }
// public uint SelectScene { get; set; }
// public uint LightingSceneOffset { get; set; }
// public uint ButtonVisibilityOffset { get; set; }
// public uint IntegrationIdSet { get; set; }
// public GenericLightingJoinMap()
// {
// // Digital
// IsOnline = 1;
// SelectScene = 1;
// IntegrationIdSet = 1;
// LightingSceneOffset = 10;
// ButtonVisibilityOffset = 40;
// // Analog
// }
// public override void OffsetJoinNumbers(uint joinStart)
// {
// var joinOffset = joinStart - 1;
// IsOnline = IsOnline + joinOffset;
// SelectScene = SelectScene + joinOffset;
// LightingSceneOffset = LightingSceneOffset + joinOffset;
// ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
// }
// }
//}
}
*/
}
}
}

View File

@@ -5,21 +5,24 @@ using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.CrestronIO;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class GenericRelayDeviceApiExtensions
{
public static void LinkToApi(this GenericRelayDevice relay, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as GenericRelayControllerJoinMap;
GenericRelayControllerJoinMap joinMap = new GenericRelayControllerJoinMap();
if (joinMap == null)
joinMap = new GenericRelayControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<GenericRelayControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
@@ -45,22 +48,4 @@ namespace PepperDash.Essentials.Bridges
}
}
public class GenericRelayControllerJoinMap : JoinMapBase
{
//Digital
public uint Relay { get; set; }
public GenericRelayControllerJoinMap()
{
Relay = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
Relay = Relay + joinOffset;
}
}
}

View File

@@ -0,0 +1,110 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Essentials.Devices.Common.Occupancy;
using PepperDash.Essentials.Core;
using PepperDash.Core;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class GlsOccupancySensorBaseControllerApiExtensions
{
public static void LinkToApi(this GlsOccupancySensorBaseController occController, BasicTriList trilist, uint joinStart, string joinMapKey)
{
GlsOccupancySensorBaseJoinMap joinMap = new GlsOccupancySensorBaseJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<GlsOccupancySensorBaseJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, occController, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
#region Single and Dual Sensor Stuff
occController.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
// Occupied status
trilist.SetSigTrueAction(joinMap.ForceOccupied, new Action(() => occController.ForceOccupied()));
trilist.SetSigTrueAction(joinMap.ForceVacant, new Action(() => occController.ForceVacant()));
occController.RoomIsOccupiedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RoomOccupiedFeedback]);
occController.RoomIsOccupiedFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.RoomVacantFeedback]);
occController.RawOccupancyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyFeedback]);
// Timouts
trilist.SetUShortSigAction(joinMap.Timeout, new Action<ushort>((u) => occController.SetRemoteTimeout(u)));
occController.CurrentTimeoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.Timeout]);
occController.LocalTimoutFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeoutLocalFeedback]);
// LED Flash
trilist.SetSigTrueAction(joinMap.EnableLedFlash, new Action(() => occController.SetLedFlashEnable(true)));
trilist.SetSigTrueAction(joinMap.DisableLedFlash, new Action(() => occController.SetLedFlashEnable(false)));
occController.LedFlashEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.EnableLedFlash]);
// Short Timeout
trilist.SetSigTrueAction(joinMap.EnableShortTimeout, new Action(() => occController.SetShortTimeoutState(true)));
trilist.SetSigTrueAction(joinMap.DisableShortTimeout, new Action(() => occController.SetShortTimeoutState(false)));
occController.ShortTimeoutEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableShortTimeout]);
// PIR Sensor
trilist.SetSigTrueAction(joinMap.EnablePir, new Action(() => occController.SetPirEnable(true)));
trilist.SetSigTrueAction(joinMap.DisablePir, new Action(() => occController.SetPirEnable(false)));
occController.PirSensorEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnablePir]);
// PIR Sensitivity in Occupied State
trilist.SetBoolSigAction(joinMap.IncrementPirInOccupiedState, new Action<bool>((b) => occController.IncrementPirSensitivityInOccupiedState(b)));
trilist.SetBoolSigAction(joinMap.DecrementPirInOccupiedState, new Action<bool>((b) => occController.DecrementPirSensitivityInOccupiedState(b)));
occController.PirSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInOccupiedState]);
// PIR Sensitivity in Vacant State
trilist.SetBoolSigAction(joinMap.IncrementPirInVacantState, new Action<bool>((b) => occController.IncrementPirSensitivityInVacantState(b)));
trilist.SetBoolSigAction(joinMap.DecrementPirInVacantState, new Action<bool>((b) => occController.DecrementPirSensitivityInVacantState(b)));
occController.PirSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.PirSensitivityInVacantState]);
#endregion
#region Dual Technology Sensor Stuff
var odtOccController = occController as GlsOdtOccupancySensorController;
if (odtOccController != null)
{
// OR When Vacated
trilist.SetBoolSigAction(joinMap.OrWhenVacated, new Action<bool>((b) => odtOccController.SetOrWhenVacatedState(b)));
odtOccController.OrWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.OrWhenVacated]);
// AND When Vacated
trilist.SetBoolSigAction(joinMap.AndWhenVacated, new Action<bool>((b) => odtOccController.SetAndWhenVacatedState(b)));
odtOccController.AndWhenVacatedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AndWhenVacated]);
// Ultrasonic A Sensor
trilist.SetSigTrueAction(joinMap.EnableUsA, new Action(() => odtOccController.SetUsAEnable(true)));
trilist.SetSigTrueAction(joinMap.DisableUsA, new Action(() => odtOccController.SetUsAEnable(false)));
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsA]);
// Ultrasonic B Sensor
trilist.SetSigTrueAction(joinMap.EnableUsB, new Action(() => odtOccController.SetUsBEnable(true)));
trilist.SetSigTrueAction(joinMap.DisableUsB, new Action(() => odtOccController.SetUsBEnable(false)));
odtOccController.UltrasonicAEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsB]);
// US Sensitivity in Occupied State
trilist.SetBoolSigAction(joinMap.IncrementUsInOccupiedState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInOccupiedState(b)));
trilist.SetBoolSigAction(joinMap.DecrementUsInOccupiedState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInOccupiedState(b)));
odtOccController.UltrasonicSensitivityInOccupiedStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInOccupiedState]);
// US Sensitivity in Vacant State
trilist.SetBoolSigAction(joinMap.IncrementUsInVacantState, new Action<bool>((b) => odtOccController.IncrementUsSensitivityInVacantState(b)));
trilist.SetBoolSigAction(joinMap.DecrementUsInVacantState, new Action<bool>((b) => odtOccController.DecrementUsSensitivityInVacantState(b)));
odtOccController.UltrasonicSensitivityInVacantStateFeedback.LinkInputSig(trilist.UShortInput[joinMap.UsSensitivityInVacantState]);
}
#endregion
}
}
}

View File

@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Endpoints;
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class HdMdxxxCEControllerApiExtensions
{
public static void LinkToApi(this HdMdxxxCEController hdMdPair, BasicTriList trilist, uint joinStart, string joinMapKey)
{
HdMdxxxCEControllerJoinMap joinMap = new HdMdxxxCEControllerJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<HdMdxxxCEControllerJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
Debug.Console(1, hdMdPair, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
hdMdPair.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
hdMdPair.RemoteEndDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RemoteEndDetected]);
trilist.SetSigTrueAction(joinMap.AutoRouteOn, new Action(() => hdMdPair.AutoRouteOn()));
hdMdPair.AutoRouteOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutoRouteOn]);
trilist.SetSigTrueAction(joinMap.AutoRouteOff, new Action(() => hdMdPair.AutoRouteOff()));
hdMdPair.AutoRouteOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.AutoRouteOff]);
trilist.SetSigTrueAction(joinMap.PriorityRoutingOn, new Action(() => hdMdPair.PriorityRouteOn()));
hdMdPair.PriorityRoutingOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOn]);
trilist.SetSigTrueAction(joinMap.PriorityRoutingOff, new Action(() => hdMdPair.PriorityRouteOff()));
hdMdPair.PriorityRoutingOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PriorityRoutingOff]);
trilist.SetSigTrueAction(joinMap.InputOnScreenDisplayEnabled, new Action(() => hdMdPair.OnScreenDisplayEnable()));
hdMdPair.InputOnScreenDisplayEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayEnabled]);
trilist.SetSigTrueAction(joinMap.AutoRouteOff, new Action(() => hdMdPair.OnScreenDisplayDisable()));
hdMdPair.InputOnScreenDisplayEnabledFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.InputOnScreenDisplayDisabled]);
trilist.SetUShortSigAction(joinMap.VideoSource, new Action<ushort>((i) => hdMdPair.ExecuteSwitch(i, null, eRoutingSignalType.Video | eRoutingSignalType.Audio)));
hdMdPair.VideoSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoSource]);
trilist.UShortInput[joinMap.SourceCount].UShortValue = (ushort)hdMdPair.InputPorts.Count;
foreach (var input in hdMdPair.InputPorts)
{
var number = Convert.ToUInt16(input.Selector);
hdMdPair.SyncDetectedFeedbacks[number].LinkInputSig(trilist.BooleanInput[joinMap.SyncDetected + number]);
trilist.StringInput[joinMap.SourceNames + number].StringValue = input.Key;
}
}
}
}

View File

@@ -8,17 +8,20 @@ using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class IBasicCommunicationApiExtensions
{
public static void LinkToApi(this GenericComm comm, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as IBasicCommunicationJoinMap;
IBasicCommunicationJoinMap joinMap = new IBasicCommunicationJoinMap();
if (joinMap == null)
joinMap = new IBasicCommunicationJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<IBasicCommunicationJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
if (comm.CommPort == null)
@@ -30,14 +33,14 @@ namespace PepperDash.Essentials.Bridges
Debug.Console(1, comm, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
// this is a permanent event handler. This cannot be -= from event
comm.CommPort.TextReceived += (s, a) =>
{
Debug.Console(2, comm, "RX: {0}", a.Text);
trilist.SetString(joinMap.TextReceived, a.Text);
};
comm.CommPort.TextReceived += (s, a) =>
{
Debug.Console(2, comm, "RX: {0}", a.Text);
trilist.SetString(joinMap.TextReceived, a.Text);
};
trilist.SetStringSigAction(joinMap.SendText, new Action<string>(s => comm.CommPort.SendText(s)));
trilist.SetStringSigAction(joinMap.SetPortConfig + 1, new Action<string>(s => comm.SetPortConfig(s)));
trilist.SetStringSigAction(joinMap.SetPortConfig, new Action<string>(s => comm.SetPortConfig(s)));
var sComm = comm.CommPort as ISocketStatus;
if (sComm != null)
@@ -62,46 +65,5 @@ namespace PepperDash.Essentials.Bridges
}));
}
}
public class IBasicCommunicationJoinMap : JoinMapBase
{
//Digital
public uint Connect { get; set; }
public uint Connected { get; set; }
//Analog
public uint Status { get; set; }
// Serial
public uint TextReceived { get; set; }
public uint SendText { get; set; }
public uint SetPortConfig { get; set; }
public IBasicCommunicationJoinMap()
{
TextReceived = 1;
SendText = 1;
SetPortConfig = 2;
Connect = 1;
Connected = 1;
Status = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
TextReceived = TextReceived + joinOffset;
SendText = SendText + joinOffset;
SetPortConfig = SetPortConfig + joinOffset;
Connect = Connect + joinOffset;
Connected = Connected + joinOffset;
Status = Status + joinOffset;
}
}
}
}

View File

@@ -6,18 +6,23 @@ using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.CrestronIO;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class IDigitalInputApiExtenstions
{
public static void LinkToApi(this IDigitalInput input, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as IDigitalInputApiJoinMap;
IDigitalInputJoinMap joinMap = new IDigitalInputJoinMap();
if (joinMap == null)
joinMap = new IDigitalInputApiJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if (!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<IDigitalInputJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
@@ -35,25 +40,5 @@ namespace PepperDash.Essentials.Bridges
return;
}
}
}
public class IDigitalInputApiJoinMap : JoinMapBase
{
//Digital
public uint InputState { get; set; }
public IDigitalInputApiJoinMap()
{
InputState = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
InputState = InputState + joinOffset;
}
}
}
}

View File

@@ -0,0 +1,110 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class AirMediaControllerJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// Indicates that the device is online when high
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// Indicates that the device is in session when high
/// </summary>
public uint IsInSession { get; set; }
/// <summary>
/// Indicates sync detected on HDMI input when high
/// </summary>
public uint HdmiVideoSync { get; set; }
/// <summary>
/// Set High to enable automatic input routing and low to disable. Feedback high when enabled
/// </summary>
public uint AutomaticInputRoutingEnabled { get; set; }
#endregion
#region Analogs
/// <summary>
/// Selects source and provides feedback
/// </summary>
public uint VideoOut { get; set; }
/// <summary>
/// Provided error feedback
/// </summary>
public uint ErrorFB { get; set; }
/// <summary>
/// Indicates the number of connected users as feedback
/// </summary>
public uint NumberOfUsersConnectedFB { get; set; }
/// <summary>
/// Sets the login code and provides the current code as feedback
/// </summary>
public uint LoginCode { get; set; }
#endregion
#region Serials
/// <summary>
/// Provides the name defined in config as feedback
/// </summary>
public uint Name { get; set; }
/// <summary>
/// Provides the connection address as feedback
/// </summary>
public uint ConnectionAddressFB { get; set; }
/// <summary>
/// Provides the hostname as feedback
/// </summary>
public uint HostnameFB { get; set; }
/// <summary>
/// Provides the serial number as feedback
/// </summary>
public uint SerialNumberFeedback { get; set; }
#endregion
public AirMediaControllerJoinMap()
{
// Digital
IsOnline = 1;
IsInSession = 2;
HdmiVideoSync = 3;
AutomaticInputRoutingEnabled = 4;
// Analog
VideoOut = 1;
ErrorFB = 2;
NumberOfUsersConnectedFB = 3;
LoginCode = 4;
// Serial
Name = 1;
ConnectionAddressFB = 2;
HostnameFB = 3;
SerialNumberFeedback = 4;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
IsInSession = IsInSession + joinOffset;
HdmiVideoSync = HdmiVideoSync + joinOffset;
AutomaticInputRoutingEnabled = AutomaticInputRoutingEnabled + joinOffset;
VideoOut = VideoOut + joinOffset;
ErrorFB = ErrorFB + joinOffset;
NumberOfUsersConnectedFB = NumberOfUsersConnectedFB + joinOffset;
LoginCode = LoginCode + joinOffset;
Name = Name + joinOffset;
ConnectionAddressFB = ConnectionAddressFB + joinOffset;
HostnameFB = HostnameFB + joinOffset;
SerialNumberFeedback = SerialNumberFeedback + joinOffset;
}
}
}

View File

@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class AppleTvJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// Sends up arrow command while high
/// </summary>
public uint UpArrow { get; set; }
/// <summary>
/// Sends down arrow command while high
/// </summary>
public uint DnArrow { get; set; }
/// <summary>
/// Sends left arrow command while high
/// </summary>
public uint LeftArrow { get; set; }
/// <summary>
/// Sends right arrow command while high
/// </summary>
public uint RightArrow { get; set; }
/// <summary>
/// Sends menu command
/// </summary>
public uint Menu { get; set; }
/// <summary>
/// Sends select command
/// </summary>
public uint Select { get; set; }
/// <summary>
/// Sends play/pause command
/// </summary>
public uint PlayPause { get; set; }
#endregion
public AppleTvJoinMap()
{
UpArrow = 1;
DnArrow = 2;
LeftArrow = 3;
RightArrow = 4;
Menu = 5;
Select = 6;
PlayPause = 7;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
UpArrow = UpArrow + joinOffset;
DnArrow = DnArrow + joinOffset;
LeftArrow = LeftArrow + joinOffset;
RightArrow = RightArrow + joinOffset;
Menu = Menu + joinOffset;
Select = Select + joinOffset;
PlayPause = PlayPause + joinOffset;
}
}
}

View File

@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class CameraControllerJoinMap : JoinMapBase
{
public uint IsOnline { get; set; }
public uint PowerOff { get; set; }
public uint PowerOn { get; set; }
public uint Up { get; set; }
public uint Down { get; set; }
public uint Left { get; set; }
public uint Right { get; set; }
public uint ZoomIn { get; set; }
public uint ZoomOut { get; set; }
public uint PresetRecallOffset { get; set; }
public uint PresetSaveOffset { get; set; }
public uint NumberOfPresets { get; set; }
public CameraControllerJoinMap()
{
// Digital
IsOnline = 9;
PowerOff = 8;
PowerOn = 7;
Up = 1;
Down = 2;
Left = 3;
Right = 4;
ZoomIn = 5;
ZoomOut = 6;
PresetRecallOffset = 10;
PresetSaveOffset = 30;
NumberOfPresets = 5;
// Analog
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
PowerOff = PowerOff + joinOffset;
PowerOn = PowerOn + joinOffset;
Up = Up + joinOffset;
Down = Down + joinOffset;
Left = Left + joinOffset;
Right = Right + joinOffset;
ZoomIn = ZoomIn + joinOffset;
ZoomOut = ZoomOut + joinOffset;
PresetRecallOffset = PresetRecallOffset + joinOffset;
PresetSaveOffset = PresetSaveOffset + joinOffset;
}
}
}

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class DigitalLoggerJoinMap : JoinMapBase
{
public uint IsOnline { get; set; }
public uint CircuitNames { get; set; }
public uint CircuitState { get; set; }
public uint CircuitCycle { get; set; }
public uint CircuitIsCritical { get; set; }
public uint CircuitOnCmd { get; set; }
public uint CircuitOffCmd { get; set; }
public DigitalLoggerJoinMap()
{
// Digital
IsOnline = 9;
CircuitState = 0;
CircuitCycle = 0;
CircuitIsCritical = 10;
CircuitOnCmd = 10;
CircuitOffCmd = 20;
// Serial
CircuitNames = 0;
// Analog
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
CircuitNames = CircuitNames + joinOffset;
CircuitState = CircuitState + joinOffset;
CircuitCycle = CircuitCycle + joinOffset;
CircuitIsCritical = CircuitIsCritical + joinOffset;
CircuitOnCmd = CircuitOnCmd + joinOffset;
CircuitOffCmd = CircuitOffCmd + joinOffset;
}
}
}

View File

@@ -0,0 +1,117 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class DisplayControllerJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// Turns the display off and reports power off feedback
/// </summary>
public uint PowerOff { get; set; }
/// <summary>
/// Turns the display on and repots power on feedback
/// </summary>
public uint PowerOn { get; set; }
/// <summary>
/// Indicates that the display device supports two way communication when high
/// </summary>
public uint IsTwoWayDisplay { get; set; }
/// <summary>
/// Increments the volume while high
/// </summary>
public uint VolumeUp { get; set; }
/// <summary>
/// Decrements teh volume while high
/// </summary>
public uint VolumeDown { get; set; }
/// <summary>
/// Toggles the mute state. Feedback is high when volume is muted
/// </summary>
public uint VolumeMute { get; set; }
/// <summary>
/// Range of digital joins to select inputs and report current input as feedback
/// </summary>
public uint InputSelectOffset { get; set; }
/// <summary>
/// Range of digital joins to report visibility for input buttons
/// </summary>
public uint ButtonVisibilityOffset { get; set; }
/// <summary>
/// High if the device is online
/// </summary>
public uint IsOnline { get; set; }
#endregion
#region Analogs
/// <summary>
/// Analog join to set the input and report current input as feedback
/// </summary>
public uint InputSelect { get; set; }
/// <summary>
/// Sets the volume level and reports the current level as feedback
/// </summary>
public uint VolumeLevel { get; set; }
#endregion
#region Serials
/// <summary>
/// Reports the name of the display as defined in config as feedback
/// </summary>
public uint Name { get; set; }
/// <summary>
/// Range of serial joins that reports the names of the inputs as feedback
/// </summary>
public uint InputNamesOffset { get; set; }
#endregion
public DisplayControllerJoinMap()
{
// Digital
IsOnline = 50;
PowerOff = 1;
PowerOn = 2;
IsTwoWayDisplay = 3;
VolumeUp = 5;
VolumeDown = 6;
VolumeMute = 7;
ButtonVisibilityOffset = 40;
InputSelectOffset = 10;
// Analog
InputSelect = 11;
VolumeLevel = 5;
// Serial
Name = 1;
InputNamesOffset = 10;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
PowerOff = PowerOff + joinOffset;
PowerOn = PowerOn + joinOffset;
IsTwoWayDisplay = IsTwoWayDisplay + joinOffset;
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
Name = Name + joinOffset;
InputNamesOffset = InputNamesOffset + joinOffset;
InputSelectOffset = InputSelectOffset + joinOffset;
InputSelect = InputSelect + joinOffset;
VolumeUp = VolumeUp + joinOffset;
VolumeDown = VolumeDown + joinOffset;
VolumeMute = VolumeMute + joinOffset;
VolumeLevel = VolumeLevel + joinOffset;
}
}
}

View File

@@ -0,0 +1,144 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class DmChassisControllerJoinMap : JoinMapBase
{
#region Digital/Analogs
/// <summary>
/// Analog input sets System ID, output reports current ID as feedback.
/// Digital input applies System ID, output is high when applying busy.
/// </summary>
public uint SystemId { get; set; }
#endregion
#region Digitals
/// <summary>
/// High when device is online
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// Range reports video sync feedback for each input
/// </summary>
public uint VideoSyncStatus { get; set; }
/// <summary>
/// Range reports high if corresponding input's endpoint is online
/// </summary>
public uint InputEndpointOnline { get; set; }
/// <summary>
/// Range reports high if corresponding output's endpoint is online
/// </summary>
public uint OutputEndpointOnline { get; set; }
/// <summary>
/// Range reports high if corresponding input's transmitter supports bridging as a separate device for detailed AV switching, HDCP control, etc.
/// </summary>
public uint TxAdvancedIsPresent { get; set; } // indicates that there is an attached transmitter that should be bridged to be interacted with
#endregion
#region Analogs
/// <summary>
/// Range sets and reports the current video source for the corresponding output
/// </summary>
public uint OutputVideo { get; set; }
/// <summary>
/// Range sets and reports the current audio source for the corresponding output
/// </summary>
public uint OutputAudio { get; set; }
/// <summary>
/// Range sets and reports the current Usb source for the corresponding output
/// </summary>
public uint OutputUsb { get; set; }
/// <summary>
/// Range sets and reports the current Usb source for the corresponding input
/// </summary>
public uint InputUsb { get; set; }
/// <summary>
/// Range sets and reports the current HDCP state for the corresponding input card
/// </summary>
public uint HdcpSupportState { get; set; }
/// <summary>
/// Range reports the highest supported HDCP state level for the corresponding input card
/// </summary>
public uint HdcpSupportCapability { get; set; }
#endregion
#region Serials
/// <summary>
/// Range sets and reports the name for the corresponding input card
/// </summary>
public uint InputNames { get; set; }
/// <summary>
/// Range sets and reports the name for the corresponding output card
/// </summary>
public uint OutputNames { get; set; }
/// <summary>
/// Range reports the name of the current video source for the corresponding output card
/// </summary>
public uint OutputCurrentVideoInputNames { get; set; }
/// <summary>
/// Range reports the name of the current audio source for the corresponding output card
/// </summary>
public uint OutputCurrentAudioInputNames { get; set; }
/// <summary>
/// Range reports the current input resolution for each corresponding input card
/// </summary>
public uint InputCurrentResolution { get; set; }
#endregion
public DmChassisControllerJoinMap()
{
//Digital/Analog
SystemId = 10; // Analog sets/gets SystemId, digital input applies and provides feedback of ID change busy
//Digital
IsOnline = 11;
VideoSyncStatus = 100; //101-299
InputEndpointOnline = 500; //501-699
OutputEndpointOnline = 700; //701-899
TxAdvancedIsPresent = 1000; //1001-1199
//Analog
OutputVideo = 100; //101-299
OutputAudio = 300; //301-499
OutputUsb = 500; //501-699
InputUsb = 700; //701-899
HdcpSupportState = 1000; //1001-1199
HdcpSupportCapability = 1200; //1201-1399
//Serial
InputNames = 100; //101-299
OutputNames = 300; //301-499
OutputCurrentVideoInputNames = 2000; //2001-2199
OutputCurrentAudioInputNames = 2200; //2201-2399
InputCurrentResolution = 2400; // 2401-2599
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
SystemId = SystemId + joinOffset;
IsOnline = IsOnline + joinOffset;
OutputVideo = OutputVideo + joinOffset;
OutputAudio = OutputAudio + joinOffset;
OutputUsb = OutputUsb + joinOffset;
InputUsb = InputUsb + joinOffset;
VideoSyncStatus = VideoSyncStatus + joinOffset;
InputNames = InputNames + joinOffset;
OutputNames = OutputNames + joinOffset;
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset;
InputCurrentResolution = InputCurrentResolution + joinOffset;
InputEndpointOnline = InputEndpointOnline + joinOffset;
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
HdcpSupportState = HdcpSupportState + joinOffset;
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
}
}
}

View File

@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class DmRmcControllerJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card
/// </summary>
public uint IsOnline { get; set; }
#endregion
#region Serials
/// <summary>
/// Reports the current output resolution
/// </summary>
public uint CurrentOutputResolution { get; set; }
/// <summary>
/// Reports the EDID manufacturer value
/// </summary>
public uint EdidManufacturer { get; set; }
/// <summary>
/// Reports the EDID Name value
/// </summary>
public uint EdidName { get; set; }
/// <summary>
/// Reports the EDID preffered timing value
/// </summary>
public uint EdidPrefferedTiming { get; set; }
/// <summary>
/// Reports the EDID serial number value
/// </summary>
public uint EdidSerialNumber { get; set; }
#endregion
public DmRmcControllerJoinMap()
{
// Digital
IsOnline = 1;
// Serial
CurrentOutputResolution = 1;
EdidManufacturer = 2;
EdidName = 3;
EdidPrefferedTiming = 4;
EdidSerialNumber = 5;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
CurrentOutputResolution = CurrentOutputResolution + joinOffset;
EdidManufacturer = EdidManufacturer + joinOffset;
EdidName = EdidName + joinOffset;
EdidPrefferedTiming = EdidPrefferedTiming + joinOffset;
EdidSerialNumber = EdidSerialNumber + joinOffset;
}
}
}

View File

@@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class DmTxControllerJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// High when device is online (if not attached to a DMP3 or DM chassis with a CPU3 card
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// High when video sync is detected
/// </summary>
public uint VideoSyncStatus { get; set; }
#endregion
#region Analogs
/// <summary>
/// Sets and reports the video source
/// </summary>
public uint VideoInput { get; set; }
/// <summary>
/// Sets and reports the audio source
/// </summary>
public uint AudioInput { get; set; }
/// <summary>
/// Reports the highest supported HDCP state level for the corresponding input card
/// </summary>
public uint HdcpSupportCapability { get; set; }
/// <summary>
/// Sets and reports the current HDCP state for the corresponding input port
/// </summary>
public uint Port1HdcpState { get; set; }
/// <summary>
/// Sets and reports the current HDCP state for the corresponding input port
/// </summary>
public uint Port2HdcpState { get; set; }
#endregion
#region Serials
/// <summary>
/// Reports the current input resolution
/// </summary>
public uint CurrentInputResolution { get; set; }
#endregion
public DmTxControllerJoinMap()
{
// Digital
IsOnline = 1;
VideoSyncStatus = 2;
// Serial
CurrentInputResolution = 1;
// Analog
VideoInput = 1;
AudioInput = 2;
HdcpSupportCapability = 3;
Port1HdcpState = 4;
Port2HdcpState = 5;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
VideoSyncStatus = VideoSyncStatus + joinOffset;
CurrentInputResolution = CurrentInputResolution + joinOffset;
VideoInput = VideoInput + joinOffset;
AudioInput = AudioInput + joinOffset;
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
Port1HdcpState = Port1HdcpState + joinOffset;
Port2HdcpState = Port2HdcpState + joinOffset;
}
}
}

View File

@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class DmpsAudioOutputControllerJoinMap : JoinMapBase
{
#region Digital/Analog
/// <summary>
/// Range of joins for Master Volume
/// Analog join 1 is volume level and feedback
/// Digital join 1 is Mute on and feedback
/// Digital join 2 is Mute off and feedback
/// Digital join 3 is volume up
/// Digital join 4 is volume down
/// </summary>
public uint MasterVolume { get; set; }
/// <summary>
/// Range of joins for Source Volume
/// Analog join 11 is volume level and feedback
/// Digital join 11 is Mute on and feedback
/// Digital join 12 is Mute off and feedback
/// Digital join 13 is volume up
/// Digital join 14 is volume down
/// </summary>
public uint SourceVolume { get; set; }
/// <summary>
/// Range of joins for Codec1 Volume (if applicable)
/// Analog join 21 is volume level and feedback
/// Digital join 21 is Mute on and feedback
/// Digital join 22 is Mute off and feedback
/// Digital join 23 is volume up
/// Digital join 24 is volume down
/// </summary>
public uint Codec1Volume { get; set; }
/// <summary>
/// Range of joins for Codec2 Volume (if applicable)
/// Analog join 31 is volume level and feedback
/// Digital join 31 is Mute on and feedback
/// Digital join 32 is Mute off and feedback
/// Digital join 33 is volume up
/// Digital join 34 is volume down
/// </summary>
public uint Codec2Volume { get; set; }
#endregion
public DmpsAudioOutputControllerJoinMap()
{
MasterVolume = 1; // 1-10
SourceVolume = 11; // 11-20
Codec1Volume = 21; // 21-30
Codec2Volume = 31; // 31-40
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart;
MasterVolume = MasterVolume + joinOffset;
SourceVolume = SourceVolume + joinOffset;
Codec1Volume = Codec1Volume + joinOffset;
Codec2Volume = Codec2Volume + joinOffset;
}
}
}

View File

@@ -0,0 +1,127 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class DmpsRoutingControllerJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// Range reports video sync feedback for each input
/// </summary>
public uint VideoSyncStatus { get; set; }
/// <summary>
/// Range reports high if corresponding input's endpoint is online
/// </summary>
public uint InputEndpointOnline { get; set; }
/// <summary>
/// Range reports high if corresponding output's endpoint is online
/// </summary>
public uint OutputEndpointOnline { get; set; }
#endregion
#region Analogs
/// <summary>
/// Range sets and reports the current video source for the corresponding output
/// </summary>
public uint OutputVideo { get; set; }
/// <summary>
/// Range sets and reports the current audio source for the corresponding output
/// </summary>
public uint OutputAudio { get; set; }
/// <summary>
/// Range sets and reports the current Usb source for the corresponding output
/// </summary>
//public uint OutputUsb { get; set; }
///// <summary>
///// Range sets and reports the current Usb source for the corresponding input
///// </summary>
//public uint InputUsb { get; set; }
///// <summary>
///// Range sets and reports the current HDCP state for the corresponding input card
///// </summary>
//public uint HdcpSupportState { get; set; }
///// <summary>
///// Range reports the highest supported HDCP state level for the corresponding input card
///// </summary>
//public uint HdcpSupportCapability { get; set; }
#endregion
#region Serials
/// <summary>
/// Range sets and reports the name for the corresponding input card
/// </summary>
public uint InputNames { get; set; }
/// <summary>
/// Range sets and reports the name for the corresponding output card
/// </summary>
public uint OutputNames { get; set; }
/// <summary>
/// Range reports the name of the current video source for the corresponding output card
/// </summary>
public uint OutputCurrentVideoInputNames { get; set; }
/// <summary>
/// Range reports the name of the current audio source for the corresponding output card
/// </summary>
public uint OutputCurrentAudioInputNames { get; set; }
/// <summary>
/// Range reports the current input resolution for each corresponding input card
/// </summary>
public uint InputCurrentResolution { get; set; }
#endregion
public DmpsRoutingControllerJoinMap()
{
//Digital
VideoSyncStatus = 100; //101-299
InputEndpointOnline = 500; //501-699
OutputEndpointOnline = 700; //701-899
//Analog
OutputVideo = 100; //101-299
OutputAudio = 300; //301-499
//OutputUsb = 500; //501-699
//InputUsb = 700; //701-899
VideoSyncStatus = 100; //101-299
//HdcpSupportState = 1000; //1001-1199
//HdcpSupportCapability = 1200; //1201-1399
//Serial
InputNames = 100; //101-299
OutputNames = 300; //301-499
OutputCurrentVideoInputNames = 2000; //2001-2199
OutputCurrentAudioInputNames = 2200; //2201-2399
InputCurrentResolution = 2400; // 2401-2599
InputEndpointOnline = 500; //501-699
OutputEndpointOnline = 700; //701-899
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
OutputVideo = OutputVideo + joinOffset;
OutputAudio = OutputAudio + joinOffset;
//OutputUsb = OutputUsb + joinOffset;
//InputUsb = InputUsb + joinOffset;
VideoSyncStatus = VideoSyncStatus + joinOffset;
InputNames = InputNames + joinOffset;
OutputNames = OutputNames + joinOffset;
OutputCurrentVideoInputNames = OutputCurrentVideoInputNames + joinOffset;
OutputCurrentAudioInputNames = OutputCurrentAudioInputNames + joinOffset;
InputCurrentResolution = InputCurrentResolution + joinOffset;
InputEndpointOnline = InputEndpointOnline + joinOffset;
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
//HdcpSupportState = HdcpSupportState + joinOffset;
//HdcpSupportCapability = HdcpSupportCapability + joinOffset;
}
}
}

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class GenericLightingJoinMap : JoinMapBase
{
public uint IsOnline { get; set; }
public uint SelectScene { get; set; }
public uint LightingSceneOffset { get; set; }
public uint ButtonVisibilityOffset { get; set; }
public uint IntegrationIdSet { get; set; }
public GenericLightingJoinMap()
{
// Digital
IsOnline = 1;
SelectScene = 1;
IntegrationIdSet = 1;
LightingSceneOffset = 10;
ButtonVisibilityOffset = 40;
// Analog
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
SelectScene = SelectScene + joinOffset;
LightingSceneOffset = LightingSceneOffset + joinOffset;
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
}
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class GenericRelayControllerJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// Sets and reports the state of the relay (High = closed, Low = Open)
/// </summary>
public uint Relay { get; set; }
#endregion
public GenericRelayControllerJoinMap()
{
Relay = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
Relay = Relay + joinOffset;
}
}
}

View File

@@ -0,0 +1,219 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class GlsOccupancySensorBaseJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// High when device is online
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// Forces the device to report occupied status
/// </summary>
public uint ForceOccupied { get; set; }
/// <summary>
/// Forces the device to report vacant status
/// </summary>
public uint ForceVacant { get; set; }
/// <summary>
/// Enables raw status reporting
/// </summary>
public uint EnableRawStates { get; set; }
/// <summary>
/// High when raw occupancy is detected
/// </summary>
public uint RawOccupancyFeedback { get; set; }
/// <summary>
/// High when occupancy is detected
/// </summary>
public uint RoomOccupiedFeedback { get; set; }
/// <summary>
/// Hich when occupancy is detected in the grace period
/// </summary>
public uint GraceOccupancyDetectedFeedback { get; set; }
/// <summary>
/// High when vacancy is detected
/// </summary>
public uint RoomVacantFeedback { get; set; }
/// <summary>
/// Enables the LED Flash when set high
/// </summary>
public uint EnableLedFlash { get; set; }
/// <summary>
/// Disables the LED flash when set high
/// </summary>
public uint DisableLedFlash { get; set; }
/// <summary>
/// Enables the Short Timeout
/// </summary>
public uint EnableShortTimeout { get; set; }
/// <summary>
/// Disables the Short Timout
/// </summary>
public uint DisableShortTimeout { get; set; }
/// <summary>
/// Set high to enable one technology to trigger occupancy
/// </summary>
public uint OrWhenVacated { get; set; }
/// <summary>
/// Set high to require both technologies to trigger occupancy
/// </summary>
public uint AndWhenVacated { get; set; }
/// <summary>
/// Enables Ultrasonic Sensor A
/// </summary>
public uint EnableUsA { get; set; }
/// <summary>
/// Disables Ultrasonic Sensor A
/// </summary>
public uint DisableUsA { get; set; }
/// <summary>
/// Enables Ultrasonic Sensor B
/// </summary>
public uint EnableUsB { get; set; }
/// <summary>
/// Disables Ultrasonic Sensor B
/// </summary>
public uint DisableUsB { get; set; }
/// <summary>
/// Enables Pir
/// </summary>
public uint EnablePir { get; set; }
/// <summary>
/// Disables Pir
/// </summary>
public uint DisablePir { get; set; }
public uint IncrementUsInOccupiedState { get; set; }
public uint DecrementUsInOccupiedState { get; set; }
public uint IncrementUsInVacantState { get; set; }
public uint DecrementUsInVacantState { get; set; }
public uint IncrementPirInOccupiedState { get; set; }
public uint DecrementPirInOccupiedState { get; set; }
public uint IncrementPirInVacantState { get; set; }
public uint DecrementPirInVacantState { get; set; }
#endregion
#region Analogs
/// <summary>
/// Sets adn reports the remote timeout value
/// </summary>
public uint Timeout { get; set; }
/// <summary>
/// Reports the local timeout value
/// </summary>
public uint TimeoutLocalFeedback { get; set; }
/// <summary>
/// Sets the minimum internal photo sensor value and reports the current level
/// </summary>
public uint InternalPhotoSensorValue { get; set; }
/// <summary>
/// Sets the minimum external photo sensor value and reports the current level
/// </summary>
public uint ExternalPhotoSensorValue { get; set; }
public uint UsSensitivityInOccupiedState { get; set; }
public uint UsSensitivityInVacantState { get; set; }
public uint PirSensitivityInOccupiedState { get; set; }
public uint PirSensitivityInVacantState { get; set; }
#endregion
public GlsOccupancySensorBaseJoinMap()
{
IsOnline = 1;
ForceOccupied = 2;
ForceVacant = 3;
EnableRawStates = 4;
RoomOccupiedFeedback = 2;
GraceOccupancyDetectedFeedback = 3;
RoomVacantFeedback = 4;
RawOccupancyFeedback = 5;
EnableLedFlash = 11;
DisableLedFlash = 12;
EnableShortTimeout = 13;
DisableShortTimeout = 14;
OrWhenVacated = 15;
AndWhenVacated = 16;
EnableUsA = 17;
DisableUsA = 18;
EnableUsB = 19;
DisableUsB = 20;
EnablePir = 21;
DisablePir = 22;
DisablePir = 23;
IncrementUsInOccupiedState = 24;
DecrementUsInOccupiedState = 25;
IncrementUsInVacantState = 26;
DecrementUsInVacantState = 27;
IncrementPirInOccupiedState = 28;
DecrementPirInOccupiedState = 29;
IncrementPirInVacantState = 30;
DecrementPirInVacantState = 31;
Timeout = 1;
TimeoutLocalFeedback = 2;
InternalPhotoSensorValue = 3;
ExternalPhotoSensorValue = 4;
UsSensitivityInOccupiedState = 5;
UsSensitivityInVacantState = 6;
PirSensitivityInOccupiedState = 7;
PirSensitivityInVacantState = 8;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
ForceOccupied = ForceOccupied + joinOffset;
ForceVacant = ForceVacant + joinOffset;
EnableRawStates = EnableRawStates + joinOffset;
RoomOccupiedFeedback = RoomOccupiedFeedback + joinOffset;
GraceOccupancyDetectedFeedback = GraceOccupancyDetectedFeedback + joinOffset;
RoomVacantFeedback = RoomVacantFeedback + joinOffset;
RawOccupancyFeedback = RawOccupancyFeedback + joinOffset;
EnableLedFlash = EnableLedFlash + joinOffset;
DisableLedFlash = DisableLedFlash + joinOffset;
EnableShortTimeout = EnableShortTimeout + joinOffset;
DisableShortTimeout = DisableShortTimeout + joinOffset;
OrWhenVacated = OrWhenVacated + joinOffset;
AndWhenVacated = AndWhenVacated + joinOffset;
EnableUsA = EnableUsA + joinOffset;
DisableUsA = DisableUsA + joinOffset;
EnableUsB = EnableUsB + joinOffset;
DisableUsB = DisableUsB + joinOffset;
EnablePir = EnablePir + joinOffset;
DisablePir = DisablePir + joinOffset;
DisablePir = DisablePir + joinOffset;
IncrementUsInOccupiedState = IncrementUsInOccupiedState + joinOffset;
DecrementUsInOccupiedState = DecrementUsInOccupiedState + joinOffset;
IncrementUsInVacantState = IncrementUsInVacantState + joinOffset;
DecrementUsInVacantState = DecrementUsInVacantState + joinOffset;
IncrementPirInOccupiedState = IncrementPirInOccupiedState + joinOffset;
DecrementPirInOccupiedState = DecrementPirInOccupiedState + joinOffset;
IncrementPirInVacantState = IncrementPirInVacantState + joinOffset;
DecrementPirInVacantState = DecrementPirInVacantState + joinOffset;
Timeout = Timeout + joinOffset;
TimeoutLocalFeedback = TimeoutLocalFeedback + joinOffset;
InternalPhotoSensorValue = InternalPhotoSensorValue + joinOffset;
ExternalPhotoSensorValue = ExternalPhotoSensorValue + joinOffset;
UsSensitivityInOccupiedState = UsSensitivityInOccupiedState + joinOffset;
UsSensitivityInVacantState = UsSensitivityInVacantState + joinOffset;
PirSensitivityInOccupiedState = PirSensitivityInOccupiedState + joinOffset;
PirSensitivityInVacantState = PirSensitivityInVacantState + joinOffset;
}
}
}

View File

@@ -0,0 +1,119 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class HdMdxxxCEControllerJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// High when the pair is online
/// </summary>
public uint IsOnline { get; set; }
/// <summary>
/// High when the remote end device is online
/// </summary>
public uint RemoteEndDetected { get; set; }
/// <summary>
/// Sets Auto Route On and provides feedback
/// </summary>
public uint AutoRouteOn { get; set; }
/// <summary>
/// Sets Auto Route Off and provides feedback
/// </summary>
public uint AutoRouteOff { get; set; }
/// <summary>
/// Sets Priority Routing On and provides feedback
/// </summary>
public uint PriorityRoutingOn { get; set; }
/// <summary>
/// Sets Priority Routing Off and provides feedback
/// </summary>
public uint PriorityRoutingOff { get; set; }
/// <summary>
/// Enables OSD and provides feedback
/// </summary>
public uint InputOnScreenDisplayEnabled { get; set; }
/// <summary>
/// Disables OSD and provides feedback
/// </summary>
public uint InputOnScreenDisplayDisabled { get; set; }
/// <summary>
/// Provides Video Sync Detected feedback for each input
/// </summary>
public uint SyncDetected { get; set; }
#endregion
#region Analogs
/// <summary>
/// Sets the video source for the receiver's HDMI out and provides feedback
/// </summary>
public uint VideoSource { get; set; }
/// <summary>
/// Indicates the number of sources supported by the Tx/Rx pair
/// </summary>
public uint SourceCount { get; set; }
#endregion
#region Serials
/// <summary>
/// Indicates the name of each input port
/// </summary>
public uint SourceNames { get; set; }
#endregion
public HdMdxxxCEControllerJoinMap()
{
//Digital
IsOnline = 1;
RemoteEndDetected = 2;
AutoRouteOn = 3;
AutoRouteOff = 4;
PriorityRoutingOn = 5;
PriorityRoutingOff = 6;
InputOnScreenDisplayEnabled = 7;
InputOnScreenDisplayDisabled = 8;
SyncDetected = 10; // 11-15
//Analog
VideoSource = 1;
SourceCount = 2;
//Serials
SourceNames = 10; // 11-15
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
IsOnline = IsOnline + joinOffset;
RemoteEndDetected = RemoteEndDetected + joinOffset;
AutoRouteOn = AutoRouteOn + joinOffset;
AutoRouteOff = AutoRouteOff + joinOffset;
PriorityRoutingOn = PriorityRoutingOn + joinOffset;
PriorityRoutingOff = PriorityRoutingOff + joinOffset;
InputOnScreenDisplayEnabled = InputOnScreenDisplayEnabled + joinOffset;
InputOnScreenDisplayDisabled = InputOnScreenDisplayDisabled + joinOffset;
SyncDetected = SyncDetected + joinOffset;
VideoSource = VideoSource + joinOffset;
SourceCount = SourceCount + joinOffset;
SourceNames = SourceNames + joinOffset;
}
}
}

View File

@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class IBasicCommunicationJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// Set High to connect, Low to disconnect
/// </summary>
public uint Connect { get; set; }
/// <summary>
/// Reports Connected State (High = Connected)
/// </summary>
public uint Connected { get; set; }
#endregion
#region Analogs
/// <summary>
/// Reports the connections status value
/// </summary>
public uint Status { get; set; }
#endregion
#region Serials
/// <summary>
/// Data back from port
/// </summary>
public uint TextReceived { get; set; }
/// <summary>
/// Sends data to the port
/// </summary>
public uint SendText { get; set; }
/// <summary>
/// Takes a JSON serialized string that sets a COM port's parameters
/// </summary>
public uint SetPortConfig { get; set; }
#endregion
public IBasicCommunicationJoinMap()
{
TextReceived = 1;
SendText = 1;
SetPortConfig = 2;
Connect = 1;
Connected = 1;
Status = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
TextReceived = TextReceived + joinOffset;
SendText = SendText + joinOffset;
SetPortConfig = SetPortConfig + joinOffset;
Connect = Connect + joinOffset;
Connected = Connected + joinOffset;
Status = Status + joinOffset;
}
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class IDigitalInputJoinMap : JoinMapBase
{
#region Digitals
/// <summary>
/// Reports the state of the digital input
/// </summary>
public uint InputState { get; set; }
#endregion
public IDigitalInputJoinMap()
{
InputState = 1;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
InputState = InputState + joinOffset;
}
}
}

View File

@@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{
public class SystemMonitorJoinMap : JoinMapBase
{
/// <summary>
/// Offset to indicate where the range of iterated program joins will start
/// </summary>
public uint ProgramStartJoin { get; set; }
/// <summary>
/// Offset between each program join set
/// </summary>
public uint ProgramOffsetJoin { get; set; }
#region Digitals
/// <summary>
/// Range Sets and reports whether the corresponding program slot is started
/// </summary>
public uint ProgramStart { get; set; }
/// <summary>
/// Range Sets and reports whether the corresponding program slot is stopped
/// </summary>
public uint ProgramStop { get; set; }
/// <summary>
/// Range Sets and reports whether the corresponding program is registered
/// </summary>
public uint ProgramRegister { get; set; }
/// <summary>
/// Range Sets and reports whether the corresponding program is unregistered
/// </summary>
public uint ProgramUnregister { get; set; }
#endregion
#region Analogs
/// <summary>
/// Sets and reports the time zone
/// </summary>
public uint TimeZone { get; set; }
#endregion
#region Serials
/// <summary>
/// Reports the time zone name
/// </summary>
public uint TimeZoneName { get; set; }
/// <summary>
/// Reports the IO Controller Version
/// </summary>
public uint IOControllerVersion { get; set; }
/// <summary>
/// Reports the SNMP App Version
/// </summary>
public uint SnmpAppVersion { get; set; }
/// <summary>
/// Reports the BACnet App Version
/// </summary>
public uint BACnetAppVersion { get; set; }
/// <summary>
/// Reports the firmware version
/// </summary>
public uint ControllerVersion { get; set; }
/// <summary>
/// Reports the name of the corresponding program
/// </summary>
public uint ProgramName { get; set; }
/// <summary>
/// Reports the compile time of the corresponding program
/// </summary>
public uint ProgramCompiledTime { get; set; }
/// <summary>
/// Reports the Crestron Database version of the corresponding program
/// </summary>
public uint ProgramCrestronDatabaseVersion { get; set; }
/// <summary>
/// Reports the Environment Version of the corresponding program
/// </summary>
public uint ProgramEnvironmentVersion { get; set; }
/// <summary>
/// Serialized JSON output that aggregates the program info of the corresponding program
/// </summary>
public uint AggregatedProgramInfo { get; set; }
#endregion
public SystemMonitorJoinMap()
{
TimeZone = 1;
TimeZoneName = 1;
IOControllerVersion = 2;
SnmpAppVersion = 3;
BACnetAppVersion = 4;
ControllerVersion = 5;
ProgramStartJoin = 10;
ProgramOffsetJoin = 5;
// Offset in groups of 5 joins
ProgramStart = 1;
ProgramStop = 2;
ProgramRegister = 3;
ProgramUnregister = 4;
ProgramName = 1;
ProgramCompiledTime = 2;
ProgramCrestronDatabaseVersion = 3;
ProgramEnvironmentVersion = 4;
AggregatedProgramInfo = 5;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
TimeZone = TimeZone + joinOffset;
TimeZoneName = TimeZoneName + joinOffset;
IOControllerVersion = IOControllerVersion + joinOffset;
SnmpAppVersion = SnmpAppVersion + joinOffset;
BACnetAppVersion = BACnetAppVersion + joinOffset;
ControllerVersion = ControllerVersion + joinOffset;
// Sets the initial join value where the iterated program joins will begin
ProgramStartJoin = ProgramStartJoin + joinOffset;
}
}
}

View File

@@ -9,20 +9,25 @@ using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Monitoring;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class SystemMonitorBridge
{
public static void LinkToApi(this SystemMonitorController systemMonitorController, BasicTriList trilist, uint joinStart, string joinMapKey)
{
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as SystemMonitorJoinMap;
SystemMonitorJoinMap joinMap = new SystemMonitorJoinMap();
if (joinMap == null)
joinMap = new SystemMonitorJoinMap();
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
if(!string.IsNullOrEmpty(joinMapSerialized))
joinMap = JsonConvert.DeserializeObject<SystemMonitorJoinMap>(joinMapSerialized);
joinMap.OffsetJoinNumbers(joinStart);
//Debug.Console(1, systemMonitorController, "Linking API starting at join: {0}", joinStart);
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(2, systemMonitorController, "Linking API starting at join: {0}", joinStart);
systemMonitorController.TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]);
//trilist.SetUShortSigAction(joinMap.TimeZone, new Action<ushort>(u => systemMonitorController.SetTimeZone(u)));
@@ -33,18 +38,13 @@ namespace PepperDash.Essentials.Bridges
systemMonitorController.BACnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion]);
systemMonitorController.ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion]);
// iterate the program status feedback collection and map all the joins
var programSlotJoinStart = joinMap.ProgramStartJoin;
foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection)
{
// TODO: link feedbacks for each program slot
var programNumber = p.Value.Program.Number;
//Debug.Console(1, systemMonitorController, "Linking API for Program Slot: {0} starting at join: {1}", programNumber, programSlotJoinStart);
trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart, new Action<bool>
(b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start));
p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart]);
@@ -63,88 +63,6 @@ namespace PepperDash.Essentials.Bridges
programSlotJoinStart = programSlotJoinStart + joinMap.ProgramOffsetJoin;
}
}
}
public class SystemMonitorJoinMap : JoinMapBase
{
/// <summary>
/// Offset to indicate where the range of iterated program joins will start
/// </summary>
public uint ProgramStartJoin { get; set; }
/// <summary>
/// Offset between each program join set
/// </summary>
public uint ProgramOffsetJoin { get; set; }
//Digital
public uint ProgramStart { get; set; }
public uint ProgramStop { get; set; }
public uint ProgramRegister { get; set; }
public uint ProgramUnregister { get; set; }
//Analog
public uint TimeZone { get; set; }
//Serial
public uint TimeZoneName { get; set; }
public uint IOControllerVersion { get; set; }
public uint SnmpAppVersion { get; set; }
public uint BACnetAppVersion { get; set; }
public uint ControllerVersion { get; set; }
public uint ProgramName { get; set; }
public uint ProgramCompiledTime { get; set; }
public uint ProgramCrestronDatabaseVersion { get; set; }
public uint ProgramEnvironmentVersion { get; set; }
public uint AggregatedProgramInfo { get; set; }
public SystemMonitorJoinMap()
{
TimeZone = 1;
TimeZoneName = 1;
IOControllerVersion = 2;
SnmpAppVersion = 3;
BACnetAppVersion = 4;
ControllerVersion = 5;
ProgramStartJoin = 10;
ProgramOffsetJoin = 5;
// Offset in groups of 5 joins
ProgramStart = 1;
ProgramStop = 2;
ProgramRegister = 3;
ProgramUnregister = 4;
ProgramName = 1;
ProgramCompiledTime = 2;
ProgramCrestronDatabaseVersion = 3;
ProgramEnvironmentVersion = 4;
AggregatedProgramInfo = 5;
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
TimeZone = TimeZone + joinOffset;
TimeZoneName = TimeZoneName + joinOffset;
IOControllerVersion = IOControllerVersion + joinOffset;
SnmpAppVersion = SnmpAppVersion + joinOffset;
BACnetAppVersion = BACnetAppVersion + joinOffset;
ControllerVersion = ControllerVersion + joinOffset;
// Sets the initial join value where the iterated program joins will begin
ProgramStartJoin = ProgramStartJoin + joinOffset;
}
}
}

View File

@@ -356,8 +356,25 @@ namespace PepperDash.Essentials
public void LoadDevices()
{
// Build the processor wrapper class
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
// Check if the processor is a DMPS model
if (this.ControllerPrompt.IndexOf("dmps", StringComparison.OrdinalIgnoreCase) > -1)
{
Debug.Console(2, "Adding DmpsRoutingController for {0} to Device Manager.", this.ControllerPrompt);
var dmpsRoutingController = DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, new DM.Config.DmpsRoutingPropertiesConfig());
DeviceManager.AddDevice(dmpsRoutingController);
}
else
{
Debug.Console(2, "************Processor is not DMPS type***************");
}
// Add global System Monitor device
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor"));
@@ -373,7 +390,7 @@ namespace PepperDash.Essentials
if (devConf.Type.ToLower() != Global.ControlSystem.ControllerPrompt.ToLower())
Debug.Console(0,
"WARNING: Config file defines processor type as '{0}' but actual processor is '{1}'! Some ports may not be available",
devConf.Type.ToUpper(), Global.ControlSystem.ControllerPrompt.ToUpper());
devConf.Type.ToUpper(), Global.ControlSystem.ControllerPrompt.ToUpper());
continue;
}

View File

@@ -71,9 +71,9 @@
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.3.27452, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\essentials-framework\references\PepperDash_Core.dll</HintPath>
<HintPath>..\essentials-framework\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="PepperDash_Essentials_DM, Version=1.0.0.19343, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -121,17 +121,37 @@
<Compile Include="Bridges\BridgeFactory.cs" />
<Compile Include="Bridges\CameraControllerBridge.cs" />
<Compile Include="Bridges\AirMediaControllerBridge.cs" />
<Compile Include="Bridges\DmpsAudioOutputControllerBridge.cs" />
<Compile Include="Bridges\DmpsRoutingControllerBridge.cs" />
<Compile Include="Bridges\DisplayControllerBridge.cs" />
<Compile Include="Bridges\DigitalLoggerBridge.cs" />
<Compile Include="Bridges\DmChassisControllerBridge.cs" />
<Compile Include="Bridges\DmTxControllerBridge.cs" />
<Compile Include="Bridges\GenericLightingBridge.cs" />
<Compile Include="Bridges\GenericRelayDeviceBridge.cs" />
<Compile Include="Bridges\GlsOccupancySensorBaseControllerBridge.cs" />
<Compile Include="Bridges\HdMdxxxCEControllerBridge.cs" />
<Compile Include="Bridges\IBasicCommunicationBridge.cs" />
<Compile Include="Bridges\DmRmcControllerBridge.cs" />
<Compile Include="Bridges\IBridge.cs" />
<Compile Include="Bridges\IDigitalInputBridge.cs" />
<Compile Include="Bridges\JoinMapBase.cs" />
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\CameraControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DigitalLoggerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DisplayControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmRmcControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GenericLightingJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\IBasicCommunicationJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\IDigitalInputJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
<Compile Include="Bridges\SystemMonitorBridge.cs" />
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
@@ -163,6 +183,7 @@
<Compile Include="HttpApiHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
<Compile Include="Room\Config\DDVC01RoomPropertiesConfig.cs" />
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
<Compile Include="Room\Config\EssentialsHuddleRoomPropertiesConfig.cs" />
@@ -186,6 +207,7 @@
<Compile Include="AppServer\Volumes.cs" />
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
<Compile Include="Room\Types\EssentialsPresentationRoom.cs" />
<Compile Include="Room\Types\EssentialsRoomBase.cs" />
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
@@ -231,9 +253,15 @@
<Compile Include="UI\SubpageReferenceListSourceItem.cs" />
<None Include="app.config" />
<None Include="Properties\ControlSystem.cfg" />
<EmbeddedResource Include="SGD\PepperDash Essentials iPad.sgd" />
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-560.sgd" />
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-760.sgd" />
<EmbeddedResource Include="SGD\PepperDash Essentials iPad.sgd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-560.sgd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="SGD\PepperDash Essentials TSW-760.sgd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">

View File

@@ -4,5 +4,5 @@
[assembly: AssemblyCompany("PepperDash Technology Corp")]
[assembly: AssemblyProduct("PepperDashEssentials")]
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2018")]
[assembly: AssemblyVersion("1.4.12.*")]
[assembly: AssemblyVersion("1.4.0.*")]

View File

@@ -0,0 +1,35 @@
function Update-SourceVersion
{
Param ([string]$Version)
$NewVersion = AssemblyVersion(" + $Version + .*");
foreach ($o in $input)
{
Write-output $o.FullName
$TmpFile = $o.FullName + .tmp
get-content $o.FullName |
%{$_ -replace AssemblyVersion\("(\d+\.\d+\.\d+)\.\*"\), $NewVersion } > $TmpFile
move-item $TmpFile $o.FullName -force
}
}
function Update-AllAssemblyInfoFiles ( $version )
{
foreach ($file in AssemblyInfo.cs, AssemblyInfo.vb )
{
get-childitem -recurse |? {$_.Name -eq $file} | Update-SourceVersion $version ;
}
}
# validate arguments
$r= [System.Text.RegularExpressions.Regex]::Match($args[0], "^\d+\.\d+\.\d+$");
if ($r.Success)
{
Update-AllAssemblyInfoFiles $args[0];
}
else
{
echo ;
echo Error: Input version does not match x.y.z format!
echo ;
echo "Unable to apply version to AssemblyInfo.cs files";
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Room.Config
{
/// <summary>
///
/// </summary>
public class EssentialsNDisplayRoomPropertiesConfig : EssentialsRoomPropertiesConfig
{
public string DefaultAudioBehavior { get; set; }
public string DefaultAudioKey { get; set; }
public string DefaultVideoBehavior { get; set; }
public Dictionary<string, string> Displays { get; set; }
public string SourceListKey { get; set; }
public EssentialsNDisplayRoomPropertiesConfig()
{
Displays = new Dictionary<string, string>();
}
}
}

View File

@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Devices;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Room.Config;
namespace PepperDash.Essentials.Room.Types
{
/// <summary>
/// Base class for rooms with more than a single display
/// </summary>
public abstract class EssentialsNDisplayRoomBase : EssentialsRoomBase
{
public event SourceInfoChangeHandler CurrentSingleSourceChange;
public Dictionary<string, IRoutingSinkWithSwitching> Displays { get; protected set; }
protected override Func<bool> IsWarmingFeedbackFunc { get { return () => false; ; } }
protected override Func<bool> IsCoolingFeedbackFunc { get { return () => false; } }
public EssentialsNDisplayRoomBase(DeviceConfig config)
: base (config)
{
Displays = new Dictionary<string, IRoutingSinkWithSwitching>();
var propertiesConfig = JsonConvert.DeserializeObject<EssentialsNDisplayRoomPropertiesConfig>(config.Properties.ToString());
foreach (var display in propertiesConfig.Displays)
{
var displayDevice = DeviceManager.GetDeviceForKey(display.Value) as IRoutingSinkWithSwitching;
if (displayDevice != null)
Displays.Add(display.Key, displayDevice);
}
}
}
}

View File

@@ -33,7 +33,7 @@
// public Dictionary<uint, IRoutingSinkNoSwitching> Displays { get; private set; }
// public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; }
// public IBasicVolumeControls DefaultVolumeControls { get; private set; }
// public IBasicVolumeControls DefaultVolumeControls { get; private set; }C:\Working Directories\PD\essentials\PepperDashEssentials\Room\Types\EssentialsPresentationRoom.cs
// /// <summary>
// /// The config name of the source list

View File

@@ -1,16 +1,13 @@
# Pepperdash Essentials
## RELEASE PROCESS CONTROLLED BY JENKINS CI PROCESS
#### How to merge
## Essentials Framework
- If any external references have changed (like PepperDash.Core), make not of them in the commit in Framework
- Make changes
- Build
- Test on your system
- Commit and push to framework
- Commit and push to essentials
- Curse a whole lot when you try to figure out how to then get developments all synced up

View File

@@ -38,4 +38,6 @@ devjson:2 {"deviceKey":"codec-comms-ssh", "methodName":"Connect", "params": []}
devjson:1 {"deviceKey":"commBridge", "methodName":"ExecuteJoinAction", "params":[ 301, "digital", true ]}
devjson:2 {"deviceKey":"display01Comm-com", "methodName":"SendText", "params": [ "I'M GETTING TIRED OF THIS" ]}
devjson:2 {"deviceKey":"display01Comm-com", "methodName":"SendText", "params": [ "I'M GETTING TIRED OF THIS" ]}
devjson:10 {"deviceKey":"dmLink-ssh", "methodName":"Connect", "params": []}

View File

@@ -26,6 +26,9 @@ namespace PepperDash.Essentials.Core.Config
[JsonProperty("tieLines")]
public List<TieLineConfig> TieLines { get; set; }
[JsonProperty("joinMaps")]
public Dictionary<string, string> JoinMaps { get; set; }
/// <summary>
/// Checks SourceLists for a given list and returns it if found. Otherwise, returns null
/// </summary>

View File

@@ -50,19 +50,19 @@ namespace PepperDash.Essentials.Core
InputPorts.AddRange(new RoutingPortCollection<RoutingInputPort>
{
new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo,
new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(Hdmi1), this, false),
new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo,
new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(Hdmi2), this, false),
new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo,
new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(Hdmi3), this, false),
new RoutingInputPort(RoutingPortNames.HdmiIn4, eRoutingSignalType.AudioVideo,
new RoutingInputPort(RoutingPortNames.HdmiIn4, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(Hdmi4), this, false),
new RoutingInputPort(RoutingPortNames.ComponentIn, eRoutingSignalType.AudioVideo,
new RoutingInputPort(RoutingPortNames.ComponentIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(Component1), this, false),
new RoutingInputPort(RoutingPortNames.CompositeIn, eRoutingSignalType.AudioVideo,
new RoutingInputPort(RoutingPortNames.CompositeIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(Video1), this, false),
new RoutingInputPort(RoutingPortNames.AntennaIn, eRoutingSignalType.AudioVideo,
new RoutingInputPort(RoutingPortNames.AntennaIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(Antenna), this, false),
});
}

View File

@@ -43,11 +43,11 @@ namespace PepperDash.Essentials.Core
public MockDisplay(string key, string name)
: base(key, name)
{
HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo,
HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo,
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
HdmiIn3 = new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo,
HdmiIn3 = new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
ComponentIn1 = new RoutingInputPort(RoutingPortNames.ComponentIn, eRoutingSignalType.Video,
eRoutingPortConnectionType.Component, null, this);

View File

@@ -4,23 +4,30 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Bridges
using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Core
{
public static class JoinMapHelper
{
/// <summary>
/// Attempts to get the join map from config
/// Attempts to get the serialized join map from config
/// </summary>
/// <param name="joinMapKey"></param>
/// <returns></returns>
public static JoinMapBase GetJoinMapForDevice(string joinMapKey)
public static string GetJoinMapForDevice(string joinMapKey)
{
if (!string.IsNullOrEmpty(joinMapKey))
if (string.IsNullOrEmpty(joinMapKey))
return null;
// FUTURE TODO: Get the join map from the ConfigReader.ConfigObject
var joinMap = ConfigReader.ConfigObject.JoinMaps[joinMapKey];
return null;
if (joinMap != null)
{
return joinMap;
}
else
return null;
}
}

View File

@@ -1,265 +1,266 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PepperDash.Essentials.Core</RootNamespace>
<AssemblyName>PepperDash_Essentials_Core</AssemblyName>
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
<OSVersion>5.0</OSVersion>
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<NativePlatformName>Windows CE</NativePlatformName>
<FormFactorID>
</FormFactorID>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.EthernetCommunications, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.Fusion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.Remotes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.1.26313, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\references\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
</Reference>
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
</Reference>
<Reference Include="SimplSharpTimerEventInterface, Version=1.0.6197.20052, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="Comm and IR\CecPortController.cs" />
<Compile Include="Comm and IR\GenericComm.cs" />
<Compile Include="Config\Essentials\ConfigUpdater.cs" />
<Compile Include="Config\Essentials\ConfigReader.cs" />
<Compile Include="Config\Essentials\ConfigWriter.cs" />
<Compile Include="Config\Essentials\EssentialsConfig.cs" />
<Compile Include="Config\SourceDevicePropertiesConfigBase.cs" />
<Compile Include="Crestron IO\Inputs\GenericDigitalInputDevice.cs" />
<Compile Include="Crestron IO\Inputs\GenericVersiportInputDevice.cs" />
<Compile Include="Crestron IO\Inputs\IDigitalInput.cs" />
<Compile Include="Crestron IO\IOPortConfig.cs" />
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
<Compile Include="Devices\CodecInterfaces.cs" />
<Compile Include="Devices\CrestronProcessor.cs" />
<Compile Include="Devices\DeviceApiBase.cs" />
<Compile Include="Devices\ReconfigurableDevice.cs" />
<Compile Include="Devices\VolumeDeviceChangeEventArgs.cs" />
<Compile Include="Factory\DeviceFactory.cs" />
<Compile Include="Feedbacks\BoolFeedback.cs" />
<Compile Include="Feedbacks\FeedbackCollection.cs" />
<Compile Include="Feedbacks\FeedbackEventArgs.cs" />
<Compile Include="Feedbacks\IntFeedback.cs" />
<Compile Include="Feedbacks\SerialFeedback.cs" />
<Compile Include="Feedbacks\StringFeedback.cs" />
<Compile Include="Global\JobTimer.cs" />
<Compile Include="Global\Scheduler.cs" />
<Compile Include="Lighting\Lighting Interfaces.cs" />
<Compile Include="Lighting\LightingBase.cs" />
<Compile Include="Monitoring\SystemMonitorController.cs" />
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
<Compile Include="Comm and IR\CommFactory.cs" />
<Compile Include="Comm and IR\CommunicationExtras.cs" />
<Compile Include="Comm and IR\ComSpecJsonConverter.cs" />
<Compile Include="Comm and IR\ConsoleCommMockDevice.cs" />
<Compile Include="Comm and IR\IRPortHelper.cs" />
<Compile Include="Config\BasicConfig.cs" />
<Compile Include="Config\ConfigPropertiesHelpers.cs" />
<Compile Include="Config\InfoConfig.cs" />
<Compile Include="Config\DeviceConfig.cs" />
<Compile Include="Constants\CommonCues.cs" />
<Compile Include="Devices\DisplayUiConstants.cs" />
<Compile Include="Devices\IUsageTracking.cs" />
<Compile Include="Devices\DeviceJsonApi.cs" />
<Compile Include="Devices\SourceListItem.cs" />
<Compile Include="DeviceTypeInterfaces\IDisplayBasic.cs" />
<Compile Include="DeviceTypeInterfaces\IDumbSource.cs" />
<Compile Include="DeviceTypeInterfaces\IWarmingCooling.cs" />
<Compile Include="DeviceTypeInterfaces\IDiscPlayerControls.cs" />
<Compile Include="DeviceTypeInterfaces\IPower.cs" />
<Compile Include="DeviceTypeInterfaces\IUiDisplayInfo.cs" />
<Compile Include="DeviceTypeInterfaces\ISetTopBoxControls.cs" />
<Compile Include="DeviceTypeInterfaces\IChannel.cs" />
<Compile Include="DeviceTypeInterfaces\IColorFunctions.cs" />
<Compile Include="DeviceTypeInterfaces\IDPad.cs" />
<Compile Include="DeviceTypeInterfaces\IDvr.cs" />
<Compile Include="DeviceTypeInterfaces\Template.cs" />
<Compile Include="DeviceTypeInterfaces\ITransport.cs" />
<Compile Include="Devices\GenericMonitoredTcpDevice.cs" />
<Compile Include="DeviceTypeInterfaces\INumeric.cs" />
<Compile Include="Devices\IVolumeAndAudioInterfaces.cs" />
<Compile Include="Display\BasicIrDisplay.cs" />
<Compile Include="Feedbacks\BoolFeedbackOneShot.cs" />
<Compile Include="Ramps and Increments\NumericalHelpers.cs" />
<Compile Include="Ramps and Increments\UshortSigIncrementer.cs" />
<Compile Include="Routing\DummyRoutingInputsDevice.cs" />
<Compile Include="Routing\ICardPortsDevice.cs" />
<Compile Include="InUseTracking\IInUseTracking.cs" />
<Compile Include="InUseTracking\InUseTracking.cs" />
<Compile Include="Routing\IRoutingInputsExtensions.cs" />
<Compile Include="Monitoring\StatusMonitorCollection.cs" />
<Compile Include="Monitoring\CrestronGenericBaseCommunicationMonitor.cs" />
<Compile Include="Monitoring\StatusMonitorBase.cs" />
<Compile Include="Monitoring\Interfaces and things.cs" />
<Compile Include="Monitoring\GenericCommunicationMonitor.cs" />
<Compile Include="Devices\NewInterfaces.cs" />
<Compile Include="Devices\IAttachVideoStatusExtensions.cs" />
<Compile Include="Devices\IHasFeedbacks.cs" />
<Compile Include="Devices\SmartObjectBaseTypes.cs" />
<Compile Include="Devices\PresentationDeviceType.cs" />
<Compile Include="Display\DELETE IRDisplayBase.cs" />
<Compile Include="Display\MockDisplay.cs" />
<Compile Include="Ethernet\EthernetStatistics.cs" />
<Compile Include="Fusion\MOVED FusionSystemController.cs" />
<Compile Include="Global\Global.cs" />
<Compile Include="License\EssentialsLicenseManager.cs" />
<Compile Include="Feedbacks\BoolOutputLogicals.cs" />
<Compile Include="Presets\Interfaces.cs" />
<Compile Include="Presets\PresetsListSubpageReferenceListItem.cs" />
<Compile Include="Presets\DevicePresetsView.cs" />
<Compile Include="Presets\PresetChannel.cs" />
<Compile Include="Presets\DevicePresets.cs" />
<Compile Include="Routing\RoutingInterfaces.cs" />
<Compile Include="Routing\RoutingPort.cs" />
<Compile Include="Routing\RoutingPortCollection.cs" />
<Compile Include="Feedbacks\BoolFeedbackPulseExtender.cs" />
<Compile Include="Routing\RoutingPortNames.cs" />
<Compile Include="Routing\TieLineConfig.cs" />
<Compile Include="Shades\Shade Interfaces.cs" />
<Compile Include="Shades\ShadeBase.cs" />
<Compile Include="Shades\ShadeController.cs" />
<Compile Include="SmartObjects\SmartObjectNumeric.cs" />
<Compile Include="SmartObjects\SmartObjectDynamicList.cs" />
<Compile Include="SmartObjects\SmartObjectDPad.cs" />
<Compile Include="SmartObjects\SmartObjectHelper.cs" />
<Compile Include="SmartObjects\SmartObjectHelperBase.cs" />
<Compile Include="Routing\TieLine.cs" />
<Compile Include="Timers\CountdownTimer.cs" />
<Compile Include="Touchpanels\CrestronTouchpanelPropertiesConfig.cs" />
<Compile Include="Touchpanels\Keyboards\HabaneroKeyboardController.cs" />
<Compile Include="Touchpanels\MOVED LargeTouchpanelControllerBase.cs" />
<Compile Include="Touchpanels\TriListExtensions.cs" />
<Compile Include="Touchpanels\MOVED UIControllers\DevicePageControllerBase.cs" />
<Compile Include="UI PageManagers\BlurayPageManager.cs" />
<Compile Include="UI PageManagers\SetTopBoxThreePanelPageManager.cs" />
<Compile Include="UI PageManagers\SinglePageManager.cs" />
<Compile Include="UI PageManagers\PageManager.cs" />
<Compile Include="UI PageManagers\SetTopBoxTwoPanelPageManager.cs" />
<Compile Include="VideoStatus\VideoStatusOutputs.cs" />
<Compile Include="VideoStatus\VideoStatusCues.cs" />
<Compile Include="Cues and DevAction\Cues.cs" />
<Compile Include="Comm and IR\ComPortController.cs" />
<Compile Include="Crestron\CrestronGenericBaseDevice.cs" />
<Compile Include="DeviceControlsParentInterfaces\IPresentationSource.cs" />
<Compile Include="Devices\DeviceManager.cs" />
<Compile Include="Devices\IrOutputPortController.cs" />
<Compile Include="Display\DisplayBase.cs" />
<Compile Include="Feedbacks\FeedbackBase.cs" />
<Compile Include="Room\Room.cs" />
<Compile Include="Room\RoomCues.cs" />
<Compile Include="Room\MOVED RoomEventArgs.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SourceListSubpageReferenceList.cs" />
<Compile Include="Touchpanels\ModalDialog.cs" />
<Compile Include="Touchpanels\SmartGraphicsTouchpanelControllerBase.cs" />
<Compile Include="TriListBridges\HandlerBridge.cs" />
<Compile Include="Devices\FIND HOMES Interfaces.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SigHelper.cs" />
<Compile Include="REMOVE SigId.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SubpageReferenceList.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SubpageReferenceListItem.cs" />
<None Include="app.config" />
<None Include="Properties\ControlSystem.cfg" />
</ItemGroup>
<ItemGroup>
<Folder Include="bin\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
</PropertyGroup>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PepperDash.Essentials.Core</RootNamespace>
<AssemblyName>PepperDash_Essentials_Core</AssemblyName>
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
<OSVersion>5.0</OSVersion>
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<NativePlatformName>Windows CE</NativePlatformName>
<FormFactorID>
</FormFactorID>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.EthernetCommunications, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.Fusion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.Remotes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
</Reference>
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
</Reference>
<Reference Include="SimplSharpTimerEventInterface, Version=1.0.6197.20052, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="Comm and IR\CecPortController.cs" />
<Compile Include="Comm and IR\GenericComm.cs" />
<Compile Include="Config\Essentials\ConfigUpdater.cs" />
<Compile Include="Config\Essentials\ConfigReader.cs" />
<Compile Include="Config\Essentials\ConfigWriter.cs" />
<Compile Include="Config\Essentials\EssentialsConfig.cs" />
<Compile Include="Config\SourceDevicePropertiesConfigBase.cs" />
<Compile Include="Crestron IO\Inputs\GenericDigitalInputDevice.cs" />
<Compile Include="Crestron IO\Inputs\GenericVersiportInputDevice.cs" />
<Compile Include="Crestron IO\Inputs\IDigitalInput.cs" />
<Compile Include="Crestron IO\IOPortConfig.cs" />
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
<Compile Include="Devices\CodecInterfaces.cs" />
<Compile Include="Devices\CrestronProcessor.cs" />
<Compile Include="Devices\DeviceApiBase.cs" />
<Compile Include="Devices\ReconfigurableDevice.cs" />
<Compile Include="Devices\VolumeDeviceChangeEventArgs.cs" />
<Compile Include="Factory\DeviceFactory.cs" />
<Compile Include="Feedbacks\BoolFeedback.cs" />
<Compile Include="Feedbacks\FeedbackCollection.cs" />
<Compile Include="Feedbacks\FeedbackEventArgs.cs" />
<Compile Include="Feedbacks\IntFeedback.cs" />
<Compile Include="Feedbacks\SerialFeedback.cs" />
<Compile Include="Feedbacks\StringFeedback.cs" />
<Compile Include="Global\JobTimer.cs" />
<Compile Include="Global\Scheduler.cs" />
<Compile Include="JoinMaps\JoinMapBase.cs" />
<Compile Include="Lighting\Lighting Interfaces.cs" />
<Compile Include="Lighting\LightingBase.cs" />
<Compile Include="Monitoring\SystemMonitorController.cs" />
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
<Compile Include="Comm and IR\CommFactory.cs" />
<Compile Include="Comm and IR\CommunicationExtras.cs" />
<Compile Include="Comm and IR\ComSpecJsonConverter.cs" />
<Compile Include="Comm and IR\ConsoleCommMockDevice.cs" />
<Compile Include="Comm and IR\IRPortHelper.cs" />
<Compile Include="Config\BasicConfig.cs" />
<Compile Include="Config\ConfigPropertiesHelpers.cs" />
<Compile Include="Config\InfoConfig.cs" />
<Compile Include="Config\DeviceConfig.cs" />
<Compile Include="Constants\CommonCues.cs" />
<Compile Include="Devices\DisplayUiConstants.cs" />
<Compile Include="Devices\IUsageTracking.cs" />
<Compile Include="Devices\DeviceJsonApi.cs" />
<Compile Include="Devices\SourceListItem.cs" />
<Compile Include="DeviceTypeInterfaces\IDisplayBasic.cs" />
<Compile Include="DeviceTypeInterfaces\IDumbSource.cs" />
<Compile Include="DeviceTypeInterfaces\IWarmingCooling.cs" />
<Compile Include="DeviceTypeInterfaces\IDiscPlayerControls.cs" />
<Compile Include="DeviceTypeInterfaces\IPower.cs" />
<Compile Include="DeviceTypeInterfaces\IUiDisplayInfo.cs" />
<Compile Include="DeviceTypeInterfaces\ISetTopBoxControls.cs" />
<Compile Include="DeviceTypeInterfaces\IChannel.cs" />
<Compile Include="DeviceTypeInterfaces\IColorFunctions.cs" />
<Compile Include="DeviceTypeInterfaces\IDPad.cs" />
<Compile Include="DeviceTypeInterfaces\IDvr.cs" />
<Compile Include="DeviceTypeInterfaces\Template.cs" />
<Compile Include="DeviceTypeInterfaces\ITransport.cs" />
<Compile Include="Devices\GenericMonitoredTcpDevice.cs" />
<Compile Include="DeviceTypeInterfaces\INumeric.cs" />
<Compile Include="Devices\IVolumeAndAudioInterfaces.cs" />
<Compile Include="Display\BasicIrDisplay.cs" />
<Compile Include="Feedbacks\BoolFeedbackOneShot.cs" />
<Compile Include="Ramps and Increments\NumericalHelpers.cs" />
<Compile Include="Ramps and Increments\UshortSigIncrementer.cs" />
<Compile Include="Routing\DummyRoutingInputsDevice.cs" />
<Compile Include="Routing\ICardPortsDevice.cs" />
<Compile Include="InUseTracking\IInUseTracking.cs" />
<Compile Include="InUseTracking\InUseTracking.cs" />
<Compile Include="Routing\IRoutingInputsExtensions.cs" />
<Compile Include="Monitoring\StatusMonitorCollection.cs" />
<Compile Include="Monitoring\CrestronGenericBaseCommunicationMonitor.cs" />
<Compile Include="Monitoring\StatusMonitorBase.cs" />
<Compile Include="Monitoring\Interfaces and things.cs" />
<Compile Include="Monitoring\GenericCommunicationMonitor.cs" />
<Compile Include="Devices\NewInterfaces.cs" />
<Compile Include="Devices\IAttachVideoStatusExtensions.cs" />
<Compile Include="Devices\IHasFeedbacks.cs" />
<Compile Include="Devices\SmartObjectBaseTypes.cs" />
<Compile Include="Devices\PresentationDeviceType.cs" />
<Compile Include="Display\DELETE IRDisplayBase.cs" />
<Compile Include="Display\MockDisplay.cs" />
<Compile Include="Ethernet\EthernetStatistics.cs" />
<Compile Include="Fusion\MOVED FusionSystemController.cs" />
<Compile Include="Global\Global.cs" />
<Compile Include="License\EssentialsLicenseManager.cs" />
<Compile Include="Feedbacks\BoolOutputLogicals.cs" />
<Compile Include="Presets\Interfaces.cs" />
<Compile Include="Presets\PresetsListSubpageReferenceListItem.cs" />
<Compile Include="Presets\DevicePresetsView.cs" />
<Compile Include="Presets\PresetChannel.cs" />
<Compile Include="Presets\DevicePresets.cs" />
<Compile Include="Routing\RoutingInterfaces.cs" />
<Compile Include="Routing\RoutingPort.cs" />
<Compile Include="Routing\RoutingPortCollection.cs" />
<Compile Include="Feedbacks\BoolFeedbackPulseExtender.cs" />
<Compile Include="Routing\RoutingPortNames.cs" />
<Compile Include="Routing\TieLineConfig.cs" />
<Compile Include="Shades\Shade Interfaces.cs" />
<Compile Include="Shades\ShadeBase.cs" />
<Compile Include="Shades\ShadeController.cs" />
<Compile Include="SmartObjects\SmartObjectNumeric.cs" />
<Compile Include="SmartObjects\SmartObjectDynamicList.cs" />
<Compile Include="SmartObjects\SmartObjectDPad.cs" />
<Compile Include="SmartObjects\SmartObjectHelper.cs" />
<Compile Include="SmartObjects\SmartObjectHelperBase.cs" />
<Compile Include="Routing\TieLine.cs" />
<Compile Include="Timers\CountdownTimer.cs" />
<Compile Include="Touchpanels\CrestronTouchpanelPropertiesConfig.cs" />
<Compile Include="Touchpanels\Keyboards\HabaneroKeyboardController.cs" />
<Compile Include="Touchpanels\MOVED LargeTouchpanelControllerBase.cs" />
<Compile Include="Touchpanels\TriListExtensions.cs" />
<Compile Include="Touchpanels\MOVED UIControllers\DevicePageControllerBase.cs" />
<Compile Include="UI PageManagers\BlurayPageManager.cs" />
<Compile Include="UI PageManagers\SetTopBoxThreePanelPageManager.cs" />
<Compile Include="UI PageManagers\SinglePageManager.cs" />
<Compile Include="UI PageManagers\PageManager.cs" />
<Compile Include="UI PageManagers\SetTopBoxTwoPanelPageManager.cs" />
<Compile Include="VideoStatus\VideoStatusOutputs.cs" />
<Compile Include="VideoStatus\VideoStatusCues.cs" />
<Compile Include="Cues and DevAction\Cues.cs" />
<Compile Include="Comm and IR\ComPortController.cs" />
<Compile Include="Crestron\CrestronGenericBaseDevice.cs" />
<Compile Include="DeviceControlsParentInterfaces\IPresentationSource.cs" />
<Compile Include="Devices\DeviceManager.cs" />
<Compile Include="Devices\IrOutputPortController.cs" />
<Compile Include="Display\DisplayBase.cs" />
<Compile Include="Feedbacks\FeedbackBase.cs" />
<Compile Include="Room\Room.cs" />
<Compile Include="Room\RoomCues.cs" />
<Compile Include="Room\MOVED RoomEventArgs.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SourceListSubpageReferenceList.cs" />
<Compile Include="Touchpanels\ModalDialog.cs" />
<Compile Include="Touchpanels\SmartGraphicsTouchpanelControllerBase.cs" />
<Compile Include="TriListBridges\HandlerBridge.cs" />
<Compile Include="Devices\FIND HOMES Interfaces.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SigHelper.cs" />
<Compile Include="REMOVE SigId.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SubpageReferenceList.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SubpageReferenceListItem.cs" />
<None Include="app.config" />
<None Include="Properties\ControlSystem.cfg" />
</ItemGroup>
<ItemGroup>
<Folder Include="bin\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -29,7 +29,7 @@ namespace PepperDash.Essentials.Core.Routing
/// <param name="key">key for special device</param>
public DummyRoutingInputsDevice(string key) : base(key)
{
AudioVideoOutputPort = new RoutingOutputPort("internal", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.BackplaneOnly,
AudioVideoOutputPort = new RoutingOutputPort("internal", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.BackplaneOnly,
null, this, true);
}
}

View File

@@ -60,7 +60,7 @@ namespace PepperDash.Essentials.Core
{
var routeDescr = new RouteDescriptor(source, destination, signalType);
// if it's a single signal type, find the route
if (signalType != eRoutingSignalType.AudioVideo)
if ((signalType & (eRoutingSignalType.Audio & eRoutingSignalType.Video)) == (eRoutingSignalType.Audio & eRoutingSignalType.Video))
{
Debug.Console(1, destination, "Attempting to build source route from {0}", source.Key);
if (!destination.GetRouteToSource(source, null, null, signalType, 0, routeDescr))
@@ -106,7 +106,7 @@ namespace PepperDash.Essentials.Core
RoutingInputPort goodInputPort = null;
var destDevInputTies = TieLineCollection.Default.Where(t =>
t.DestinationPort.ParentDevice == destination && (t.Type == signalType || t.Type == eRoutingSignalType.AudioVideo));
t.DestinationPort.ParentDevice == destination && (t.Type == signalType || (t.Type & (eRoutingSignalType.Audio | eRoutingSignalType.Video)) == (eRoutingSignalType.Audio | eRoutingSignalType.Video)));
// find a direct tie
var directTie = destDevInputTies.FirstOrDefault(

View File

@@ -32,8 +32,10 @@ namespace PepperDash.Essentials.Core
public enum eRoutingSignalType
{
Audio = 1,
Video = 2,
AudioVideo = 3
Video = 2,
//AudioVideo = 4,
UsbOutput = 4,
UsbInput = 8
}
public enum eRoutingPortConnectionType

View File

@@ -46,13 +46,13 @@ namespace PepperDash.Essentials.DM.AirMedia
PropertiesConfig = props;
InputPorts.Add(new RoutingInputPort(DmPortName.Osd, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(DmPortName.Osd, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.None, new Action(SelectPinPointUxLandingPage), this));
InputPorts.Add(new RoutingInputPort(DmPortName.AirMediaIn, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(DmPortName.AirMediaIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Streaming, new Action(SelectAirMedia), this));
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(SelectHdmiIn), this));
InputPorts.Add(new RoutingInputPort(DmPortName.AirBoardIn, eRoutingSignalType.Video,
@@ -60,7 +60,7 @@ namespace PepperDash.Essentials.DM.AirMedia
if (AirMedia is Am300)
{
InputPorts.Add(new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, new Action(SelectDmIn), this));
}

View File

@@ -30,11 +30,11 @@ namespace PepperDash.Essentials.DM.Cards
: base(key, slot)
{
Card = card;
//DmOut1 = new RoutingOutputPort(DmPortName.DmOut1, eRoutingSignalType.AudioVideo,
//DmOut1 = new RoutingOutputPort(DmPortName.DmOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.DmCat, null, this);
//DmOut2 = new RoutingOutputPort(DmPortName.DmOut2, eRoutingSignalType.AudioVideo,
//DmOut2 = new RoutingOutputPort(DmPortName.DmOut2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.DmCat, null, this);
//HdmiOut1 = new RoutingOutputPort(DmPortName.HdmiOut1, eRoutingSignalType.AudioVideo,
//HdmiOut1 = new RoutingOutputPort(DmPortName.HdmiOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.Hdmi, null, this);
//OutputPorts.AddRange(new[] { DmOut1, DmOut2, HdmiOut1 });

View File

@@ -35,9 +35,9 @@
// // eRoutingPortConnectionType.LineAudio, null, this);
// //AudioOut2 = new RoutingOutputPort(DmPortName.BalancedAudioOut2, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.LineAudio, null, this);
// //HdmiOut1 = new RoutingOutputPort(DmPortName.HdmiOut1, eRoutingSignalType.AudioVideo,
// //HdmiOut1 = new RoutingOutputPort(DmPortName.HdmiOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //HdmiOut2 = new RoutingOutputPort(DmPortName.HdmiOut2, eRoutingSignalType.AudioVideo,
// //HdmiOut2 = new RoutingOutputPort(DmPortName.HdmiOut2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //OutputPorts.AddRange(new[] { AudioOut1, AudioOut2, HdmiOut1, HdmiOut2 });

View File

@@ -29,11 +29,11 @@
// : base(key, slot)
// {
// Card = card;
// //DmIn = new RoutingInputPortWithVideoStatuses(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
// //DmIn = new RoutingInputPortWithVideoStatuses(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.DmCat, null, this,
// // VideoStatusHelper.GetDmInputStatusFuncs(Card.DmInput));
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.AudioVideo,
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.Hdmi, null, this);
@@ -59,11 +59,11 @@
// : base(key, slot)
// {
// Card = card;
// //DmIn = new RoutingInputPortWithVideoStatuses(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
// //DmIn = new RoutingInputPortWithVideoStatuses(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.DmCat, null, this,
// // VideoStatusHelper.GetDmInputStatusFuncs(Card.DmInput));
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.AudioVideo,
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.Hdmi, null, this);

View File

@@ -32,11 +32,11 @@
// : base(key, slot)
// {
// Card = card;
// HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.AudioVideo,
// HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.Hdmi, null, this,
// VideoStatusHelper.GetHdmiInputStatusFuncs(Card.HdmiInput));
// HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.AudioVideo,
// HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.Hdmi, null, this);
// AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio,
// eRoutingPortConnectionType.Hdmi, null, this);
@@ -65,11 +65,11 @@
// : base(key, slot)
// {
// Card = card;
// //HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.AudioVideo,
// //HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this,
// // VideoStatusHelper.GetHdmiInputStatusFuncs(Card.HdmiInput));
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.AudioVideo,
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.Hdmi, null, this);

View File

@@ -21,8 +21,10 @@ namespace PepperDash.Essentials.DM
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
///
/// </summary>
public class DmChassisController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting, IHasFeedback//, ICardPortsDevice
{
public class DmChassisController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting, IHasFeedback
{
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
public DmMDMnxn Chassis { get; private set; }
// Feedbacks for EssentialDM
@@ -35,6 +37,16 @@ namespace PepperDash.Essentials.DM
public Dictionary<uint, StringFeedback> OutputNameFeedbacks { get; private set; }
public Dictionary<uint, StringFeedback> OutputVideoRouteNameFeedbacks { get; private set; }
public Dictionary<uint, StringFeedback> OutputAudioRouteNameFeedbacks { get; private set; }
public Dictionary<uint, IntFeedback> UsbOutputRoutedToFeebacks { get; private set; }
public Dictionary<uint, IntFeedback> UsbInputRoutedToFeebacks { get; private set; }
public IntFeedback SystemIdFeebdack { get; private set; }
public BoolFeedback SystemIdBusyFeedback { get; private set; }
public Dictionary<uint, IntFeedback> InputCardHdcpCapabilityFeedbacks { get; private set; }
public Dictionary<uint, eHdcpCapabilityType> InputCardHdcpCapabilityTypes { get; private set; }
// Need a couple Lists of generic Backplane ports
@@ -81,10 +93,10 @@ namespace PepperDash.Essentials.DM
else if (type == "dmmd32x32cpu3") { chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem); }
else if (type == "dmmd32x32cpu3rps") { chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem); }
if (chassis == null)
{
return null;
}
if (chassis == null)
{
return null;
}
var controller = new DmChassisController(key, name, chassis);
// add the cards and port names
@@ -116,83 +128,8 @@ namespace PepperDash.Essentials.DM
controller.InputNames = properties.InputNames;
controller.OutputNames = properties.OutputNames;
controller.PropertiesConfig = properties;
return controller;
//DmChassisController controller = null;
//if (type == "dmmd8x8")
//{
// controller = new DmChassisController(key, name, new DmMd8x8(ipid, Global.ControlSystem));
// // add the cards and port names
// foreach (var kvp in properties.InputSlots)
// controller.AddInputCard(kvp.Value, kvp.Key);
// foreach (var kvp in properties.OutputSlots)
// {
// controller.AddOutputCard(kvp.Value, kvp.Key);
// }
// foreach (var kvp in properties.VolumeControls)
// {
// // get the card
// // check it for an audio-compatible type
// // make a something-something that will make it work
// // retire to mountain village
// var outNum = kvp.Key;
// var card = controller.Chassis.Outputs[outNum].Card;
// Audio.Output audio = null;
// if (card is DmcHdo)
// audio = (card as DmcHdo).Audio;
// else if (card is Dmc4kHdo)
// audio = (card as Dmc4kHdo).Audio;
// if (audio == null)
// continue;
// // wire up the audio to something here...
// controller.AddVolumeControl(outNum, audio);
// }
// controller.InputNames = properties.InputNames;
// controller.OutputNames = properties.OutputNames;
// return controller;
//}
//else if (type == "dmmd16x16")
//{
// controller = new DmChassisController(key, name, new DmMd16x16(ipid, Global.ControlSystem));
// // add the cards and port names
// foreach (var kvp in properties.InputSlots)
// controller.AddInputCard(kvp.Value, kvp.Key);
// foreach (var kvp in properties.OutputSlots)
// {
// controller.AddOutputCard(kvp.Value, kvp.Key);
// }
// foreach (var kvp in properties.VolumeControls)
// {
// // get the card
// // check it for an audio-compatible type
// // make a something-something that will make it work
// // retire to mountain village
// var outNum = kvp.Key;
// var card = controller.Chassis.Outputs[outNum].Card;
// Audio.Output audio = null;
// if (card is DmcHdo)
// audio = (card as DmcHdo).Audio;
// else if (card is Dmc4kHdo)
// audio = (card as Dmc4kHdo).Audio;
// if (audio == null)
// continue;
// // wire up the audio to something here...
// controller.AddVolumeControl(outNum, audio);
// }
// controller.InputNames = properties.InputNames;
// controller.OutputNames = properties.OutputNames;
// return controller;
//}
}
catch (System.Exception e)
{
@@ -218,12 +155,13 @@ namespace PepperDash.Essentials.DM
TxDictionary = new Dictionary<uint, string>();
RxDictionary = new Dictionary<uint, string>();
IsOnline.OutputChange += new EventHandler<FeedbackEventArgs>(IsOnline_OutputChange);
//IsOnline.OutputChange += new EventHandler<EventArgs>(this.IsOnline_OutputChange);
Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
//Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange);
Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange);
Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
AudioOutputFeedbacks = new Dictionary<uint, IntFeedback>();
UsbOutputRoutedToFeebacks = new Dictionary<uint, IntFeedback>();
UsbInputRoutedToFeebacks = new Dictionary<uint, IntFeedback>();
VideoInputSyncFeedbacks = new Dictionary<uint, BoolFeedback>();
InputNameFeedbacks = new Dictionary<uint, StringFeedback>();
OutputNameFeedbacks = new Dictionary<uint, StringFeedback>();
@@ -232,68 +170,164 @@ namespace PepperDash.Essentials.DM
InputEndpointOnlineFeedbacks = new Dictionary<uint, BoolFeedback>();
OutputEndpointOnlineFeedbacks = new Dictionary<uint, BoolFeedback>();
SystemIdFeebdack = new IntFeedback(() => { return Chassis.SystemIdFeedback.UShortValue; });
SystemIdBusyFeedback = new BoolFeedback(() => { return Chassis.SystemIdBusy.BoolValue; });
InputCardHdcpCapabilityFeedbacks = new Dictionary<uint, IntFeedback>();
InputCardHdcpCapabilityTypes = new Dictionary<uint, eHdcpCapabilityType>();
for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
{
var tempX = x;
VideoOutputFeedbacks[tempX] = new IntFeedback(() => {
if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;}
else { return 0; };
});
AudioOutputFeedbacks[tempX] = new IntFeedback(() => {
if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; }
else { return 0; };
});
VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
});
InputNameFeedbacks[tempX] = new StringFeedback(() => {
if (Chassis.Inputs[tempX].NameFeedback.StringValue != null)
{
return Chassis.Inputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputNameFeedbacks[tempX] = new StringFeedback(() => {
if (Chassis.Outputs[tempX].NameFeedback.StringValue != null)
{
return Chassis.Outputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].VideoOutFeedback != null)
{
return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() =>
if (Chassis.Outputs[tempX] != null)
{
VideoOutputFeedbacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null)
if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number; }
else { return 0; };
});
AudioOutputFeedbacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; }
else { return 0; };
});
UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Outputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number; }
else { return 0; };
});
OutputNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].NameFeedback != null)
{
return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
return Chassis.Outputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; });
OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].VideoOutFeedback != null)
{
return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null)
{
return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
}
else
{
return "";
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Outputs[tempX].EndpointOnlineFeedback; });
}
});
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{
return Chassis.Outputs[tempX].EndpointOnlineFeedback;
});
}
if (Chassis.Inputs[tempX] != null)
{
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
else { return 0; };
});
VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() =>
{
if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
else
return false;
});
InputNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Inputs[tempX].NameFeedback != null)
{
return Chassis.Inputs[tempX].NameFeedback.StringValue;
}
else
{
return "";
}
});
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{
return Chassis.Inputs[tempX].EndpointOnlineFeedback;
});
InputCardHdcpCapabilityFeedbacks[tempX] = new IntFeedback(() =>
{
var inputCard = Chassis.Inputs[tempX];
if (inputCard.Card is DmcHd)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else if (inputCard.Card is DmcHdDsp)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else if (inputCard.Card is Dmc4kHdBase)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability;
}
else if (inputCard.Card is Dmc4kCBase)
{
if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability;
}
else if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else if (inputCard.Card is Dmc4kCDspBase)
{
if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability;
}
else if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
}
else
return 0;
});
}
}
}
@@ -306,149 +340,157 @@ namespace PepperDash.Essentials.DM
{
Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number);
if (type == "dmcHd")
type = type.ToLower();
if (type == "dmchd")
{
var inputCard = new DmcHd(number, this.Chassis);
var cecPort = inputCard.HdmiInput as ICec;
AddHdmiInCardPorts(number, cecPort);
}
else if (type == "dmcHdDsp")
else if (type == "dmchddsp")
{
var inputCard = new DmcHdDsp(number, this.Chassis);
var cecPort = inputCard.HdmiInput as ICec;
AddHdmiInCardPorts(number, cecPort);
}
else if (type == "dmc4kHd")
else if (type == "dmc4khd")
{
var inputCard = new Dmc4kHd(number, this.Chassis);
var cecPort = inputCard.HdmiInput as ICec;
AddHdmiInCardPorts(number, cecPort);
}
else if (type == "dmc4kHdDsp")
else if (type == "dmc4khddsp")
{
var inputCard = new Dmc4kHdDsp(number, this.Chassis);
var cecPort = inputCard.HdmiInput as ICec;
AddHdmiInCardPorts(number, cecPort);
}
else if (type == "dmc4kzHd")
else if (type == "dmc4kzhd")
{
var inputCard = new Dmc4kzHd(number, this.Chassis);
var cecPort = inputCard.HdmiInput as ICec;
AddHdmiInCardPorts(number, cecPort);
}
else if (type == "dmc4kzHdDsp")
else if (type == "dmc4kzhddsp")
{
var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
var cecPort = inputCard.HdmiInput as ICec;
AddHdmiInCardPorts(number, cecPort);
}
else if (type == "dmcC")
else if (type == "dmcc")
{
new DmcC(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new DmcC(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmcCDsp")
else if (type == "dmccdsp")
{
new DmcCDsp(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new DmcCDsp(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmc4kC")
else if (type == "dmc4kc")
{
new Dmc4kC(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new Dmc4kC(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmc4kCDsp")
else if (type == "dmc4kcdsp")
{
new Dmc4kCDsp(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new Dmc4kCDsp(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmc4kzC")
else if (type == "dmc4kzc")
{
new Dmc4kzC(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new Dmc4kzC(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmc4kzCDsp")
else if (type == "dmc4kzcdsp")
{
new Dmc4kzCDsp(number, this.Chassis);
AddDmInCardPorts(number);
var inputCard = new Dmc4kzCDsp(number, this.Chassis);
var cecPort = inputCard.DmInput as ICec;
AddDmInCardPorts(number, cecPort);
}
else if (type == "dmcCat")
else if (type == "dmccat")
{
new DmcCat(number, this.Chassis);
AddDmInCardPorts(number);
}
else if (type == "dmcCatDsp")
else if (type == "dmccatdsp")
{
new DmcCatDsp(number, this.Chassis);
AddDmInCardPorts(number);
}
else if (type == "dmcS")
else if (type == "dmcs")
{
new DmcS(number, Chassis);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmMmFiber);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
AddInCardHdmiAndAudioLoopPorts(number);
}
else if (type == "dmcSDsp")
else if (type == "dmcsdsp")
{
new DmcSDsp(number, Chassis);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmMmFiber);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
AddInCardHdmiAndAudioLoopPorts(number);
}
else if (type == "dmcS2")
else if (type == "dmcs2")
{
new DmcS2(number, Chassis);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmSmFiber);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
AddInCardHdmiAndAudioLoopPorts(number);
}
else if (type == "dmcS2Dsp")
else if (type == "dmcs2dsp")
{
new DmcS2Dsp(number, Chassis);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmSmFiber);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
AddInCardHdmiAndAudioLoopPorts(number);
}
else if (type == "dmcSdi")
else if (type == "dmcsdi")
{
new DmcSdi(number, Chassis);
AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Sdi);
AddOutputPortWithDebug(number, "sdiOut", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Sdi, null);
AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi, null);
AddInCardHdmiAndAudioLoopPorts(number);
}
else if (type == "dmcDvi")
else if (type == "dmcdvi")
{
new DmcDvi(number, Chassis);
AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Dvi);
AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi);
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
AddInCardHdmiLoopPort(number);
}
else if (type == "dmcVga")
else if (type == "dmcvga")
{
new DmcVga(number, Chassis);
AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga);
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
AddInCardHdmiLoopPort(number);
}
else if (type == "dmcVidBnc")
else if (type == "dmcvidbnc")
{
new DmcVidBnc(number, Chassis);
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
AddInCardHdmiLoopPort(number);
}
else if (type == "dmcVidRcaA")
else if (type == "dmcvidrcaa")
{
new DmcVidRcaA(number, Chassis);
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
AddInCardHdmiLoopPort(number);
}
else if (type == "dmcVidRcaD")
else if (type == "dmcvidrcad")
{
new DmcVidRcaD(number, Chassis);
AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio);
AddInCardHdmiLoopPort(number);
}
else if (type == "dmcVid4")
else if (type == "dmcvid4")
{
new DmcVid4(number, Chassis);
AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
@@ -457,35 +499,40 @@ namespace PepperDash.Essentials.DM
AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
AddInCardHdmiLoopPort(number);
}
else if (type == "dmcStr")
else if (type == "dmcstr")
{
new DmcStr(number, Chassis);
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Streaming);
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
AddInCardHdmiAndAudioLoopPorts(number);
}
}
void AddDmInCardPorts(uint number)
{
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat);
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
AddInCardHdmiAndAudioLoopPorts(number);
}
void AddDmInCardPorts(uint number, ICec cecPort)
{
AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
AddInCardHdmiAndAudioLoopPorts(number);
}
void AddHdmiInCardPorts(uint number, ICec cecPort)
{
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, cecPort);
AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
AddInCardHdmiAndAudioLoopPorts(number);
}
void AddInCardHdmiAndAudioLoopPorts(uint number)
{
AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null);
AddOutputPortWithDebug(number, "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null);
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null);
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null);
}
void AddInCardHdmiLoopPort(uint number)
{
AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null);
AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null);
}
/// <summary>
@@ -495,66 +542,68 @@ namespace PepperDash.Essentials.DM
/// <param name="number"></param>
public void AddOutputCard(string type, uint number)
{
type = type.ToLower();
Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number);
if (type == "dmc4kHdo")
if (type == "dmc4khdo")
{
var outputCard = new Dmc4kHdoSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
var cecPort2 = outputCard.Card2.HdmiOutput;
AddDmcHdoPorts(number, cecPort1, cecPort2);
}
else if (type == "dmcHdo")
else if (type == "dmchdo")
{
var outputCard = new DmcHdoSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
var cecPort2 = outputCard.Card2.HdmiOutput;
AddDmcHdoPorts(number, cecPort1, cecPort2);
}
else if (type == "dmc4kCoHd")
else if (type == "dmc4kcohd")
{
var outputCard = new Dmc4kCoHdSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
AddDmcCoPorts(number, cecPort1);
}
else if (type == "dmc4kzCoHd")
else if (type == "dmc4kzcohd")
{
var outputCard = new Dmc4kzCoHdSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
AddDmcCoPorts(number, cecPort1);
}
else if (type == "dmcCoHd")
else if (type == "dmccohd")
{
var outputCard = new DmcCoHdSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
AddDmcCoPorts(number, cecPort1);
}
else if (type == "dmCatoHd")
else if (type == "dmccatohd")
{
var outputCard = new DmcCatoHdSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
AddDmcCoPorts(number, cecPort1);
}
else if (type == "dmcSoHd")
else if (type == "dmcsohd")
{
var outputCard = new DmcSoHdSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 1);
AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2);
}
else if (type == "dmcS2oHd")
else if (type == "dmcs2ohd")
{
var outputCard = new DmcS2oHdSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 1);
AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2);
}
else if (type == "dmcStro")
else if (type == "dmcstro")
{
var outputCard = new DmcStroSingle(number, Chassis);
AddOutputPortWithDebug(number, "streamOut", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1);
}
else
@@ -563,17 +612,17 @@ namespace PepperDash.Essentials.DM
void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2)
{
AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(number, "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 1);
AddOutputPortWithDebug(number, "hdmiOut2", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 2, cecPort2);
AddOutputPortWithDebug(number, "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 2);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 2, cecPort2);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 2);
}
void AddDmcCoPorts(uint number, ICec cecPort1)
{
AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 1);
AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 2);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 2);
}
@@ -598,18 +647,23 @@ namespace PepperDash.Essentials.DM
Debug.Console(2, this, "Adding input port '{0}'", portKey);
var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
if (cecPort != null)
inputPort.Port = cecPort;
if (inputPort != null)
{
if (cecPort != null)
inputPort.Port = cecPort;
InputPorts.Add(inputPort);
InputPorts.Add(inputPort);
}
else
Debug.Console(2, this, "inputPort is null");
}
/// <summary>
/// Adds OutputPort
/// </summary>
void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector)
void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector)
{
var portKey = string.Format("outputCard{0}--{1}", cardNum, portName);
var portKey = string.Format("{0}--{1}", cardName, portName);
Debug.Console(2, this, "Adding output port '{0}'", portKey);
OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this));
}
@@ -617,9 +671,9 @@ namespace PepperDash.Essentials.DM
/// <summary>
/// Adds OutputPort and sets Port as ICec object
/// </summary>
void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort)
void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort)
{
var portKey = string.Format("outputCard{0}--{1}", cardNum, portName);
var portKey = string.Format("{0}--{1}", cardName, portName);
Debug.Console(2, this, "Adding output port '{0}'", portKey);
var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this);
@@ -643,30 +697,72 @@ namespace PepperDash.Essentials.DM
//}
void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args) {
void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args)
{
switch (args.EventId)
{
case DMSystemEventIds.SystemIdEventId:
{
Debug.Console(2, this, "SystemIdEvent Value: {0}", Chassis.SystemIdFeedback.UShortValue);
SystemIdFeebdack.FireUpdate();
break;
}
case DMSystemEventIds.SystemIdBusyEventId:
{
Debug.Console(2, this, "SystemIdBusyEvent State: {0}", Chassis.SystemIdBusy.BoolValue);
SystemIdBusyFeedback.FireUpdate();
break;
}
}
}
}
void Chassis_DMInputChange(Switch device, DMInputEventArgs args) {
//Debug.Console(2, this, "DMSwitch:{0} Input:{1} Event:{2}'", this.Name, args.Number, args.EventId.ToString());
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
{
switch (args.EventId) {
case (DMInputEventIds.OnlineFeedbackEventId): {
Debug.Console(2, this, "DMINput OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
break;
}
case (DMInputEventIds.VideoDetectedEventId): {
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
VideoInputSyncFeedbacks[args.Number].FireUpdate();
break;
}
case (DMInputEventIds.InputNameEventId): {
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
InputNameFeedbacks[args.Number].FireUpdate();
break;
}
}
}
switch (args.EventId) {
case DMInputEventIds.EndpointOnlineEventId:
{
Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
break;
}
case DMInputEventIds.OnlineFeedbackEventId:
{
Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
break;
}
case DMInputEventIds.VideoDetectedEventId:
{
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
VideoInputSyncFeedbacks[args.Number].FireUpdate();
break;
}
case DMInputEventIds.InputNameEventId:
{
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
InputNameFeedbacks[args.Number].FireUpdate();
break;
}
case DMInputEventIds.UsbRoutedToEventId:
{
Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number);
UsbInputRoutedToFeebacks[args.Number].FireUpdate();
break;
}
case DMInputEventIds.HdcpCapabilityFeedbackEventId:
{
Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate();
break;
}
default:
{
Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
break;
}
}
}
///
/// </summary>
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
@@ -674,46 +770,75 @@ namespace PepperDash.Essentials.DM
//This should be a switch case JTA 2018-07-02
var output = args.Number;
if (args.EventId == DMOutputEventIds.VolumeEventId &&
VolumeControls.ContainsKey(output))
{
VolumeControls[args.Number].VolumeEventFromChassis();
}
else if (args.EventId == DMOutputEventIds.OnlineFeedbackEventId)
{
OutputEndpointOnlineFeedbacks[output].FireUpdate();
}
else if (args.EventId == DMOutputEventIds.VideoOutEventId)
{
if (Chassis.Outputs[output].VideoOutFeedback != null)
{
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].VideoOutFeedback.Number, output);
}
if (VideoOutputFeedbacks.ContainsKey(output))
{
VideoOutputFeedbacks[output].FireUpdate();
}
if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
{
OutputVideoRouteNameFeedbacks[output].FireUpdate();
}
}
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
switch (args.EventId)
{
if (Chassis.Outputs[output].AudioOutFeedback != null)
case DMOutputEventIds.VolumeEventId:
{
if (VolumeControls.ContainsKey(output))
{
VolumeControls[args.Number].VolumeEventFromChassis();
}
break;
}
case DMOutputEventIds.EndpointOnlineEventId:
{
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].AudioOutFeedback.Number, output);
Debug.Console(2, this, "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. State: {1}", args.Number, Chassis.Outputs[output].EndpointOnlineFeedback);
OutputEndpointOnlineFeedbacks[output].FireUpdate();
break;
}
if (AudioOutputFeedbacks.ContainsKey(output))
case DMOutputEventIds.OnlineFeedbackEventId:
{
AudioOutputFeedbacks[output].FireUpdate();
Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", args.Number, Chassis.Outputs[output].EndpointOnlineFeedback);
OutputEndpointOnlineFeedbacks[output].FireUpdate();
break;
}
case DMOutputEventIds.VideoOutEventId:
{
if (Chassis.Outputs[output].VideoOutFeedback != null)
{
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].VideoOutFeedback.Number, output);
}
if (VideoOutputFeedbacks.ContainsKey(output))
{
VideoOutputFeedbacks[output].FireUpdate();
}
if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
{
OutputVideoRouteNameFeedbacks[output].FireUpdate();
}
break;
}
case DMOutputEventIds.AudioOutEventId:
{
if (Chassis.Outputs[output].AudioOutFeedback != null)
{
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].AudioOutFeedback.Number, output);
}
if (AudioOutputFeedbacks.ContainsKey(output))
{
AudioOutputFeedbacks[output].FireUpdate();
}
break;
}
case DMOutputEventIds.OutputNameEventId:
{
Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
OutputNameFeedbacks[output].FireUpdate();
break;
}
case DMOutputEventIds.UsbRoutedToEventId:
{
Debug.Console(2, this, "DM Output {0} UsbRoutedToEventId", args.Number);
UsbOutputRoutedToFeebacks[args.Number].FireUpdate();
break;
}
default:
{
Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId);
break;
}
}
else if (args.EventId == DMOutputEventIds.OutputNameEventId)
{
Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
OutputNameFeedbacks[output].FireUpdate();
}
}
@@ -739,7 +864,7 @@ namespace PepperDash.Essentials.DM
if (IsOnline.BoolValue)
{
Chassis.EnableAudioBreakaway.BoolValue = true;
//Chassis.EnableUSBBreakaway.BoolValue = true;
Chassis.EnableUSBBreakaway.BoolValue = true;
if (InputNames != null)
foreach (var kvp in InputNames)
@@ -775,19 +900,34 @@ namespace PepperDash.Essentials.DM
}
Card.DMICard inCard = input == 0 ? null : Chassis.Inputs[input];
Card.DMOCard outCard = input == 0 ? null : Chassis.Outputs[output];
// NOTE THAT THESE ARE NOTS - TO CATCH THE AudioVideo TYPE
if (sigType != eRoutingSignalType.Audio)
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
if ((sigType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
{
Chassis.VideoEnter.BoolValue = true;
Chassis.Outputs[output].VideoOut = inCard;
}
if (sigType != eRoutingSignalType.Video)
if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
{
Chassis.AudioEnter.BoolValue = true;
Chassis.Outputs[output].AudioOut = inCard;
}
if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
{
Chassis.USBEnter.BoolValue = true;
if (Chassis.Outputs[output] != null)
Chassis.Outputs[output].USBRoutedTo = inCard;
}
if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
{
Chassis.USBEnter.BoolValue = true;
if(Chassis.Inputs[input] != null)
Chassis.Inputs[input].USBRoutedTo = outCard;
}
}
#endregion

View File

@@ -0,0 +1,285 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Cards;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM.Config;
namespace PepperDash.Essentials.DM
{
/// <summary>
/// Exposes the volume levels for Program, Aux1 or Aux2 outputs on a DMPS3 chassis
/// </summary>
public class DmpsAudioOutputController : Device
{
Card.Dmps3OutputBase OutputCard;
public DmpsAudioOutput MasterVolumeLevel { get; private set; }
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
: base(key, name)
{
OutputCard = card;
OutputCard.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);
MasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Master);
SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);
if (card is Card.Dmps3ProgramOutput)
{
//(card as Card.Dmps3ProgramOutput).OutputMixer.MicLevel
//TODO: Hook up mic levels and mutes
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
}
else if (card is Card.Dmps3Aux1Output)
{
Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
}
else if (card is Card.Dmps3Aux2Output)
{
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
}
}
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
{
switch (args.EventId)
{
case DMOutputEventIds.MasterVolumeFeedBackEventId:
{
MasterVolumeLevel.VolumeLevelFeedback.FireUpdate();
break;
}
case DMOutputEventIds.MasterMuteOnFeedBackEventId:
{
MasterVolumeLevel.MuteFeedback.FireUpdate();
break;
}
case DMOutputEventIds.SourceLevelFeedBackEventId:
{
SourceVolumeLevel.VolumeLevelFeedback.FireUpdate();
break;
}
case DMOutputEventIds.Codec1LevelFeedBackEventId:
{
if(Codec1VolumeLevel != null)
Codec1VolumeLevel.VolumeLevelFeedback.FireUpdate();
break;
}
case DMOutputEventIds.Codec1MuteOnFeedBackEventId:
{
if (Codec1VolumeLevel != null)
Codec1VolumeLevel.MuteFeedback.FireUpdate();
break;
}
case DMOutputEventIds.Codec2LevelFeedBackEventId:
{
if (Codec2VolumeLevel != null)
Codec2VolumeLevel.VolumeLevelFeedback.FireUpdate();
break;
}
case DMOutputEventIds.Codec2MuteOnFeedBackEventId:
{
if (Codec2VolumeLevel != null)
Codec2VolumeLevel.MuteFeedback.FireUpdate();
break;
}
}
}
}
public class DmpsAudioOutput : IBasicVolumeWithFeedback
{
Card.Dmps3OutputBase Output;
UShortInputSig Level;
eDmpsLevelType Type;
public BoolFeedback MuteFeedback { get; private set; }
public IntFeedback VolumeLevelFeedback { get; private set; }
Action MuteOnAction;
Action MuteOffAction;
Action<bool> VolumeUpAction;
Action<bool> VolumeDownAction;
public DmpsAudioOutput(Card.Dmps3OutputBase output, eDmpsLevelType type)
{
Output = output;
Type = type;
switch (type)
{
case eDmpsLevelType.Master:
{
Level = output.MasterVolume;
MuteFeedback = new BoolFeedback( new Func<bool> (() => Output.MasterMuteOnFeedBack.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MasterVolumeFeedBack.UShortValue));
MuteOnAction = new Action(Output.MasterMuteOn);
MuteOffAction = new Action(Output.MasterMuteOff);
VolumeUpAction = new Action<bool>((b) => Output.MasterVolumeUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => Output.MasterVolumeDown.BoolValue = b);
break;
}
case eDmpsLevelType.MicsMaster:
{
Level = output.MicMasterLevel;
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.MicMasterMuteOnFeedBack.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.MicMasterLevelFeedBack.UShortValue));
MuteOnAction = new Action(Output.MicMasterMuteOn);
MuteOffAction = new Action(Output.MicMasterMuteOff);
VolumeUpAction = new Action<bool>((b) => Output.MicMasterLevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => Output.MicMasterLevelDown.BoolValue = b);
break;
}
case eDmpsLevelType.Source:
{
Level = output.SourceLevel;
MuteFeedback = new BoolFeedback(new Func<bool>(() => Output.SourceMuteOnFeedBack.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => Output.SourceLevelFeedBack.UShortValue));
MuteOnAction = new Action(Output.SourceMuteOn);
MuteOffAction = new Action(Output.SourceMuteOff);
VolumeUpAction = new Action<bool>((b) => Output.SourceLevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => Output.SourceLevelDown.BoolValue = b);
break;
}
case eDmpsLevelType.Codec1:
{
var programOutput = output as Card.Dmps3ProgramOutput;
if (programOutput != null)
{
Level = programOutput.Codec1Level;
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec1LevelFeedback.UShortValue));
MuteOnAction = new Action(programOutput.Codec1MuteOn);
MuteOffAction = new Action(programOutput.Codec1MuteOff);
VolumeUpAction = new Action<bool>((b) => programOutput.Codec1LevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => programOutput.Codec1LevelDown.BoolValue = b);
}
else
{
var auxOutput = output as Card.Dmps3Aux2Output;
Level = auxOutput.Codec1Level;
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute1OnFeedback.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec1LevelFeedback.UShortValue));
MuteOnAction = new Action(auxOutput.Codec1MuteOn);
MuteOffAction = new Action(auxOutput.Codec1MuteOff);
VolumeUpAction = new Action<bool>((b) => auxOutput.Codec1LevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => auxOutput.Codec1LevelDown.BoolValue = b);
}
break;
}
case eDmpsLevelType.Codec2:
{
var programOutput = output as Card.Dmps3ProgramOutput;
if (programOutput != null)
{
Level = programOutput.Codec2Level;
MuteFeedback = new BoolFeedback(new Func<bool>(() => programOutput.CodecMute1OnFeedback.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => programOutput.Codec2LevelFeedback.UShortValue));
MuteOnAction = new Action(programOutput.Codec2MuteOn);
MuteOffAction = new Action(programOutput.Codec2MuteOff);
VolumeUpAction = new Action<bool>((b) => programOutput.Codec2LevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => programOutput.Codec2LevelDown.BoolValue = b);
}
else
{
var auxOutput = output as Card.Dmps3Aux1Output;
Level = auxOutput.Codec2Level;
MuteFeedback = new BoolFeedback(new Func<bool>(() => auxOutput.CodecMute2OnFeedback.BoolValue));
VolumeLevelFeedback = new IntFeedback(new Func<int>(() => auxOutput.Codec2LevelFeedback.UShortValue));
MuteOnAction = new Action(auxOutput.Codec2MuteOn);
MuteOffAction = new Action(auxOutput.Codec2MuteOff);
VolumeUpAction = new Action<bool>((b) => auxOutput.Codec2LevelUp.BoolValue = b);
VolumeDownAction = new Action<bool>((b) => auxOutput.Codec2LevelDown.BoolValue = b);
}
break;
}
}
}
#region IBasicVolumeWithFeedback Members
public void SetVolume(ushort level)
{
Level.UShortValue = level;
}
public void MuteOn()
{
MuteOnAction();
}
public void MuteOff()
{
MuteOffAction();
}
#endregion
#region IBasicVolumeControls Members
public void VolumeUp(bool pressRelease)
{
VolumeUpAction(pressRelease);
}
public void VolumeDown(bool pressRelease)
{
VolumeDownAction(pressRelease);
}
public void MuteToggle()
{
if (MuteFeedback.BoolValue)
MuteOff();
else
MuteOn();
}
#endregion
}
public enum eDmpsLevelType
{
Master,
Source,
MicsMaster,
Codec1,
Codec2,
Mic
}
}

View File

@@ -0,0 +1,451 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Cards;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.DM
{
/// <summary>
///
/// </summary>
public class DmpsInternalVirtualHdmiVgaInputController : Device, ITxRouting, IHasFeedback
{
public Card.Dmps3HdmiVgaInput InputCard { get; protected set; }
public eHdcpCapabilityType HdcpSupportCapability { get; protected set; }
public StringFeedback ActiveVideoInputFeedback { get; protected set; }
public RoutingInputPortWithVideoStatuses HdmiIn { get; protected set; }
public RoutingInputPortWithVideoStatuses VgaIn { get; protected set; }
public RoutingInputPort AudioIn { get; protected set; }
public RoutingInputPortWithVideoStatuses AnyVideoInput { get; protected set; }
public RoutingOutputPort VirtualDmOut { get; protected set; }
public IntFeedback VideoSourceNumericFeedback { get; protected set; }
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
/// <summary>
/// Returns a list containing the Outputs that we want to expose.
/// </summary>
public FeedbackCollection<Feedback> Feedbacks { get; private set; }
public void SetPortHdcpCapability(eHdcpCapabilityType hdcpMode, uint port) { }
/// <summary>
/// Helps get the "real" inputs, including when in Auto
/// </summary>
public eDmps3InputVideoSource ActualVideoInput
{
get
{
if (InputCard.VideoSourceFeedback != eDmps3InputVideoSource.Auto)
return InputCard.VideoSourceFeedback;
else // auto
{
if (InputCard.HdmiInputPort.SyncDetectedFeedback.BoolValue)
return eDmps3InputVideoSource.Hdmi;
else if (InputCard.VgaInputPort.SyncDetectedFeedback.BoolValue)
return eDmps3InputVideoSource.Vga;
else
return eDmps3InputVideoSource.Bnc;
}
}
}
public virtual RoutingPortCollection<RoutingInputPort> InputPorts
{
get
{
return new RoutingPortCollection<RoutingInputPort>
{
HdmiIn,
VgaIn,
AudioIn,
AnyVideoInput
};
}
}
public RoutingPortCollection<RoutingOutputPort> OutputPorts
{
get
{
return new RoutingPortCollection<RoutingOutputPort> { VirtualDmOut };
}
}
public DmpsInternalVirtualHdmiVgaInputController(string key, string name, DMInput inputCard)
: base(key, name)
{
Feedbacks = new FeedbackCollection<Feedback>();
if (inputCard is Card.Dmps3HdmiVgaInput)
{
InputCard = inputCard as Card.Dmps3HdmiVgaInput;
HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi,
eDmps3InputVideoSource.Hdmi, this, VideoStatusHelper.GetHdmiInputStatusFuncs(InputCard.HdmiInputPort));
VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eDmps3InputVideoSource.Vga, this,
VideoStatusHelper.GetVgaInputStatusFuncs(InputCard.VgaInputPort));
AudioIn = new RoutingInputPort(DmPortName.AudioIn, eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
eDmps3InputAudioSource.Analog, this);
if (InputCard.HdmiInputPort.HdcpSupportedLevelFeedback == eHdcpSupportedLevel.Hdcp2xSupport)
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
else if (InputCard.HdmiInputPort.HdcpSupportedLevelFeedback == eHdcpSupportedLevel.Hdcp1xSupport)
HdcpSupportCapability = eHdcpCapabilityType.Hdcp1xSupport;
var combinedFuncs = new VideoStatusFuncsWrapper
{
HdcpActiveFeedbackFunc = () =>
(ActualVideoInput == eDmps3InputVideoSource.Hdmi
&& InputCard.HdmiInputPort.VideoAttributes.HdcpActiveFeedback.BoolValue),
HdcpStateFeedbackFunc = () =>
{
if (ActualVideoInput == eDmps3InputVideoSource.Hdmi)
return InputCard.HdmiInputPort.VideoAttributes.HdcpStateFeedback.ToString();
return "";
},
VideoResolutionFeedbackFunc = () =>
{
if (ActualVideoInput == eDmps3InputVideoSource.Hdmi)
return InputCard.HdmiInputPort.VideoAttributes.GetVideoResolutionString();
if (ActualVideoInput == eDmps3InputVideoSource.Vga)
return InputCard.VgaInputPort.VideoAttributes.GetVideoResolutionString();
return "";
},
VideoSyncFeedbackFunc = () =>
(ActualVideoInput == eDmps3InputVideoSource.Hdmi
&& InputCard.HdmiInputPort.SyncDetectedFeedback.BoolValue)
|| (ActualVideoInput == eDmps3InputVideoSource.Vga
&& InputCard.VgaInputPort.SyncDetectedFeedback.BoolValue),
HasVideoStatusFunc = () =>
(ActualVideoInput == eDmps3InputVideoSource.Hdmi
&& HdmiIn.VideoStatus.HasVideoStatusFeedback.BoolValue)
|| (ActualVideoInput == eDmps3InputVideoSource.Vga
&& VgaIn.VideoStatus.HasVideoStatusFeedback.BoolValue)
};
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, eDmps3InputVideoSource.Auto, this, combinedFuncs);
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", () => ActualVideoInput.ToString());
VideoSourceNumericFeedback = new IntFeedback(() =>
{
return (int)InputCard.VideoSourceFeedback;
});
AudioSourceNumericFeedback = new IntFeedback(() =>
{
return (int)InputCard.AudioSourceFeedback;
});
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
{
if (InputCard.HdmiInputPort.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
});
// Set Ports for CEC
HdmiIn.Port = InputCard.HdmiInputPort;
VirtualDmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.None, null, this);
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback);
//AddPostActivationAction(() =>
//{
// Link up all of these damned events to the various RoutingPorts via a helper handler
InputCard.HdmiInputPort.InputOutput.BaseDevice.BaseEvent += (o, a) => FowardInputStreamChange(HdmiIn, a.EventId);
InputCard.HdmiInputPort.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn, a.EventId);
InputCard.VgaInputPort.InputOutput.BaseDevice.BaseEvent += (o, a) => FowardInputStreamChange(VgaIn, a.EventId);
InputCard.VgaInputPort.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(VgaIn, a.EventId);
//});
}
}
/// <summary>
/// Relays the input stream change to the appropriate RoutingInputPort.
/// </summary>
protected void FowardInputStreamChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
{
if (eventId == Crestron.SimplSharpPro.DM.DMInputEventIds.SourceSyncEventId)
{
inputPort.VideoStatus.VideoSyncFeedback.FireUpdate();
AnyVideoInput.VideoStatus.VideoSyncFeedback.FireUpdate();
}
}
/// <summary>
/// Relays the VideoAttributes change to a RoutingInputPort
/// </summary>
protected void ForwardVideoAttributeChange(RoutingInputPortWithVideoStatuses inputPort, int eventId)
{
switch (eventId)
{
case VideoAttributeEventIds.HdcpActiveFeedbackEventId:
inputPort.VideoStatus.HdcpActiveFeedback.FireUpdate();
AnyVideoInput.VideoStatus.HdcpActiveFeedback.FireUpdate();
break;
case VideoAttributeEventIds.HdcpStateFeedbackEventId:
inputPort.VideoStatus.HdcpStateFeedback.FireUpdate();
AnyVideoInput.VideoStatus.HdcpStateFeedback.FireUpdate();
break;
case VideoAttributeEventIds.HorizontalResolutionFeedbackEventId:
case VideoAttributeEventIds.VerticalResolutionFeedbackEventId:
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
break;
case VideoAttributeEventIds.FramesPerSecondFeedbackEventId:
inputPort.VideoStatus.VideoResolutionFeedback.FireUpdate();
AnyVideoInput.VideoStatus.VideoResolutionFeedback.FireUpdate();
break;
}
}
/// <summary>
/// Adds feedback(s) to the list
/// </summary>
/// <param name="newFbs"></param>
public void AddToFeedbackList(params Feedback[] newFbs)
{
foreach (var f in newFbs)
{
if (f != null)
{
if (!Feedbacks.Contains(f))
{
Feedbacks.Add(f);
}
}
}
}
#region ITxRouting Members
public virtual void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
{
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
switch (input)
{
case 0:
{
ExecuteSwitch(eDmps3InputVideoSource.Auto, null, type);
break;
}
case 1:
{
ExecuteSwitch(HdmiIn.Selector, null, type);
break;
}
case 2:
{
ExecuteSwitch(VgaIn.Selector, null, type);
break;
}
}
}
#endregion
#region IRouting Members
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
{
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
InputCard.VideoSource = (eDmps3InputVideoSource)inputSelector;
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
InputCard.AudioSource = (eDmps3InputAudioSource)inputSelector;
}
#endregion
}
/// <summary>
///
/// </summary>
public class DmpsInternalVirtualHdmiVgaBncInputController : DmpsInternalVirtualHdmiVgaInputController
{
public new Card.Dmps3HdmiVgaBncInput InputCard { get; private set; }
public RoutingInputPortWithVideoStatuses BncIn { get; private set; }
public RoutingInputPort SpdifIn { get; private set; }
public override RoutingPortCollection<RoutingInputPort> InputPorts
{
get
{
return new RoutingPortCollection<RoutingInputPort>
{
HdmiIn,
VgaIn,
BncIn,
SpdifIn,
AnyVideoInput
};
}
}
public DmpsInternalVirtualHdmiVgaBncInputController(string key, string name, Card.Dmps3HdmiVgaBncInput inputCard)
: base(key, name, inputCard)
{
InputCard = inputCard;
HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi,
eDmps3InputVideoSource.Hdmi, this, VideoStatusHelper.GetHdmiInputStatusFuncs(InputCard.HdmiInputPort));
VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eDmps3InputVideoSource.Vga, this,
VideoStatusHelper.GetVgaInputStatusFuncs(InputCard.VgaInputPort));
BncIn = new RoutingInputPortWithVideoStatuses(DmPortName.BncIn, eRoutingSignalType.Video, eRoutingPortConnectionType.Component,
eDmps3InputVideoSource.Bnc, this, VideoStatusHelper.GetBncInputStatusFuncs(InputCard.BncInputPort));
SpdifIn = new RoutingInputPort(DmPortName.SpdifIn, eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio,
eDmps3InputAudioSource.Spdif, this);
if (InputCard.HdmiInputPort.HdcpSupportedLevelFeedback == eHdcpSupportedLevel.Hdcp2xSupport)
HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support;
else if (InputCard.HdmiInputPort.HdcpSupportedLevelFeedback == eHdcpSupportedLevel.Hdcp1xSupport)
HdcpSupportCapability = eHdcpCapabilityType.Hdcp1xSupport;
var combinedFuncs = new VideoStatusFuncsWrapper
{
HdcpActiveFeedbackFunc = () =>
(ActualVideoInput == eDmps3InputVideoSource.Hdmi
&& InputCard.HdmiInputPort.VideoAttributes.HdcpActiveFeedback.BoolValue),
HdcpStateFeedbackFunc = () =>
{
if (ActualVideoInput == eDmps3InputVideoSource.Hdmi)
return InputCard.HdmiInputPort.VideoAttributes.HdcpStateFeedback.ToString();
return "";
},
VideoResolutionFeedbackFunc = () =>
{
if (ActualVideoInput == eDmps3InputVideoSource.Hdmi)
return InputCard.HdmiInputPort.VideoAttributes.GetVideoResolutionString();
if (ActualVideoInput == eDmps3InputVideoSource.Vga)
return InputCard.VgaInputPort.VideoAttributes.GetVideoResolutionString();
if (ActualVideoInput == eDmps3InputVideoSource.Bnc)
return InputCard.BncInputPort.VideoAttributes.GetVideoResolutionString();
return "";
},
VideoSyncFeedbackFunc = () =>
(ActualVideoInput == eDmps3InputVideoSource.Hdmi
&& InputCard.HdmiInputPort.SyncDetectedFeedback.BoolValue)
|| (ActualVideoInput == eDmps3InputVideoSource.Vga
&& InputCard.VgaInputPort.SyncDetectedFeedback.BoolValue)
|| (ActualVideoInput == eDmps3InputVideoSource.Bnc
&& InputCard.BncInputPort.VideoDetectedFeedback.BoolValue),
HasVideoStatusFunc = () =>
(ActualVideoInput == eDmps3InputVideoSource.Hdmi
&& HdmiIn.VideoStatus.HasVideoStatusFeedback.BoolValue)
|| (ActualVideoInput == eDmps3InputVideoSource.Vga
&& VgaIn.VideoStatus.HasVideoStatusFeedback.BoolValue)
|| (ActualVideoInput == eDmps3InputVideoSource.Bnc
&&BncIn.VideoStatus.HasVideoStatusFeedback.BoolValue)
};
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput", () => ActualVideoInput.ToString());
VideoSourceNumericFeedback = new IntFeedback(() =>
{
return (int)InputCard.VideoSourceFeedback;
});
AudioSourceNumericFeedback = new IntFeedback(() =>
{
return (int)InputCard.AudioSourceFeedback;
});
HdmiInHdcpCapabilityFeedback = new IntFeedback("HdmiInHdcpCapability", () =>
{
if (InputCard.HdmiInputPort.HdcpSupportOnFeedback.BoolValue)
return 1;
else
return 0;
});
// Set Ports for CEC
HdmiIn.Port = InputCard.HdmiInputPort;
VirtualDmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.None, null, this);
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,
AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback,
AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback);
//AddPostActivationAction(() =>
//{
// Link up all of these damned events to the various RoutingPorts via a helper handler
InputCard.HdmiInputPort.InputOutput.BaseDevice.BaseEvent += (o, a) => FowardInputStreamChange(HdmiIn, a.EventId);
InputCard.HdmiInputPort.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn, a.EventId);
InputCard.VgaInputPort.InputOutput.BaseDevice.BaseEvent += (o, a) => FowardInputStreamChange(VgaIn, a.EventId);
InputCard.VgaInputPort.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(VgaIn, a.EventId);
InputCard.BncInputPort.InputOutput.BaseDevice.BaseEvent += (o, a) => FowardInputStreamChange(HdmiIn, a.EventId);
InputCard.BncInputPort.VideoAttributes.AttributeChange += (o, a) => ForwardVideoAttributeChange(HdmiIn, a.EventId);
//});
}
public override void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
{
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
switch (input)
{
case 0:
{
ExecuteSwitch(eDmps3InputVideoSource.Auto, null, type);
break;
}
case 1:
{
ExecuteSwitch(HdmiIn.Selector, null, type);
break;
}
case 2:
{
ExecuteSwitch(VgaIn.Selector, null, type);
break;
}
case 3:
{
ExecuteSwitch(BncIn.Selector, null, type);
break;
}
}
}
}
}

View File

@@ -0,0 +1,683 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Cards;
using Crestron.SimplSharpPro.DM.Endpoints;
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM.Config;
namespace PepperDash.Essentials.DM
{
public class DmpsRoutingController : Device, IRoutingInputsOutputs, IRouting, IHasFeedback
{
public CrestronControlSystem Dmps { get; set; }
public ISystemControl SystemControl { get; private set; }
// Feedbacks for EssentialDM
public Dictionary<uint, IntFeedback> VideoOutputFeedbacks { get; private set; }
public Dictionary<uint, IntFeedback> AudioOutputFeedbacks { get; private set; }
public Dictionary<uint, BoolFeedback> VideoInputSyncFeedbacks { get; private set; }
public Dictionary<uint, BoolFeedback> InputEndpointOnlineFeedbacks { get; private set; }
public Dictionary<uint, BoolFeedback> OutputEndpointOnlineFeedbacks { get; private set; }
public Dictionary<uint, StringFeedback> InputNameFeedbacks { get; private set; }
public Dictionary<uint, StringFeedback> OutputNameFeedbacks { get; private set; }
public Dictionary<uint, StringFeedback> OutputVideoRouteNameFeedbacks { get; private set; }
public Dictionary<uint, StringFeedback> OutputAudioRouteNameFeedbacks { get; private set; }
public FeedbackCollection<Feedback> Feedbacks { get; private set; }
// Need a couple Lists of generic Backplane ports
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
public Dictionary<uint, string> TxDictionary { get; set; }
public Dictionary<uint, string> RxDictionary { get; set; }
public Dictionary<uint, string> InputNames { get; set; }
public Dictionary<uint, string> OutputNames { get; set; }
public Dictionary<uint, DmCardAudioOutputController> VolumeControls { get; private set; }
public const int RouteOffTime = 500;
Dictionary<PortNumberType, CTimer> RouteOffTimers = new Dictionary<PortNumberType, CTimer>();
public static DmpsRoutingController GetDmpsRoutingController(string key, string name,
DmpsRoutingPropertiesConfig properties)
{
try
{
ISystemControl systemControl = null;
systemControl = Global.ControlSystem.SystemControl as ISystemControl;
if (systemControl == null)
{
return null;
}
var controller = new DmpsRoutingController(key, name, systemControl);
controller.InputNames = properties.InputNames;
controller.OutputNames = properties.OutputNames;
return controller;
}
catch (System.Exception e)
{
Debug.Console(0, "Error getting DMPS Controller:\r{0}", e);
}
return null;
}
/// <summary>
///
/// </summary>
/// <param name="key"></param>
/// <param name="name"></param>
/// <param name="chassis"></param>
public DmpsRoutingController(string key, string name, ISystemControl systemControl)
: base(key, name)
{
Dmps = Global.ControlSystem;
SystemControl = systemControl;
InputPorts = new RoutingPortCollection<RoutingInputPort>();
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
VolumeControls = new Dictionary<uint, DmCardAudioOutputController>();
TxDictionary = new Dictionary<uint, string>();
RxDictionary = new Dictionary<uint, string>();
VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
AudioOutputFeedbacks = new Dictionary<uint, IntFeedback>();
VideoInputSyncFeedbacks = new Dictionary<uint, BoolFeedback>();
InputNameFeedbacks = new Dictionary<uint, StringFeedback>();
OutputNameFeedbacks = new Dictionary<uint, StringFeedback>();
OutputVideoRouteNameFeedbacks = new Dictionary<uint, StringFeedback>();
OutputAudioRouteNameFeedbacks = new Dictionary<uint, StringFeedback>();
InputEndpointOnlineFeedbacks = new Dictionary<uint, BoolFeedback>();
OutputEndpointOnlineFeedbacks = new Dictionary<uint, BoolFeedback>();
Debug.Console(1, this, "{0} Switcher Inputs Present.", Dmps.SwitcherInputs.Count);
Debug.Console(1, this, "{0} Switcher Outputs Present.", Dmps.SwitcherOutputs.Count);
SetupOutputCards();
SetupInputCards();
}
public override bool CustomActivate()
{
// Set input and output names from config
if (InputNames != null)
foreach (var kvp in InputNames)
(Dmps.SwitcherInputs[kvp.Key] as DMInput).Name.StringValue = kvp.Value;
if (OutputNames != null)
foreach (var kvp in OutputNames)
(Dmps.SwitcherOutputs[kvp.Key] as Card.Dmps3OutputBase).Name.StringValue = kvp.Value;
// Subscribe to events
Dmps.DMInputChange += new DMInputEventHandler(Dmps_DMInputChange);
Dmps.DMOutputChange += new DMOutputEventHandler(Dmps_DMOutputChange);
return base.CustomActivate();
}
/// <summary>
/// Iterate the SwitcherOutputs collection to setup feedbacks and add routing ports
/// </summary>
void SetupOutputCards()
{
foreach (var card in Dmps.SwitcherOutputs)
{
var outputCard = card as DMOutput;
Debug.Console(1, this, "Adding Output Card Number {0} Type: {1}", outputCard.Number, outputCard.CardInputOutputType.ToString());
if (outputCard != null)
{
VideoOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
{
if (outputCard.VideoOutFeedback != null) { return (ushort)outputCard.VideoOutFeedback.Number; }
else { return 0; };
});
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
{
if (outputCard.AudioOutFeedback != null) { return (ushort)outputCard.AudioOutFeedback.Number; }
else { return 0; };
});
OutputNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
{
if (outputCard.NameFeedback != null && !string.IsNullOrEmpty(outputCard.NameFeedback.StringValue))
{
Debug.Console(2, this, "Output Card {0} Name: {1}", outputCard.Number, outputCard.NameFeedback.StringValue);
return outputCard.NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputVideoRouteNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
{
if (outputCard.VideoOutFeedback != null && outputCard.VideoOutFeedback.NameFeedback != null)
{
return outputCard.VideoOutFeedback.NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputAudioRouteNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
{
if (outputCard.AudioOutFeedback != null && outputCard.AudioOutFeedback.NameFeedback != null)
{
return outputCard.AudioOutFeedback.NameFeedback.StringValue;
}
else
{
return "";
}
});
OutputEndpointOnlineFeedbacks[outputCard.Number] = new BoolFeedback(() => { return outputCard.EndpointOnlineFeedback; });
AddOutputCard(outputCard.Number, outputCard);
}
}
}
/// <summary>
/// Iterate the SwitcherInputs collection to setup feedbacks and add routing ports
/// </summary>
void SetupInputCards()
{
foreach (var card in Dmps.SwitcherInputs)
{
var inputCard = card as DMInput;
Debug.Console(1, this, "Adding Input Card Number {0} Type: {1}", inputCard.Number, inputCard.CardInputOutputType.ToString());
if (inputCard != null)
{
InputEndpointOnlineFeedbacks[inputCard.Number] = new BoolFeedback(() => { return inputCard.EndpointOnlineFeedback; });
if (inputCard.VideoDetectedFeedback != null)
{
VideoInputSyncFeedbacks[inputCard.Number] = new BoolFeedback(() =>
{
return inputCard.VideoDetectedFeedback.BoolValue;
});
}
InputNameFeedbacks[inputCard.Number] = new StringFeedback(() =>
{
if (inputCard.NameFeedback != null && !string.IsNullOrEmpty(inputCard.NameFeedback.StringValue))
{
Debug.Console(2, this, "Input Card {0} Name: {1}", inputCard.Number, inputCard.NameFeedback.StringValue);
return inputCard.NameFeedback.StringValue;
}
else
{
Debug.Console(2, this, "Input Card {0} Name is null", inputCard.Number, inputCard.NameFeedback.StringValue);
return "";
}
});
}
AddInputCard(inputCard.Number, inputCard);
}
}
/// <summary>
/// Builds the appropriate ports aand callst the appropreate add port method
/// </summary>
/// <param name="number"></param>
/// <param name="inputCard"></param>
public void AddInputCard(uint number, DMInput inputCard)
{
if (inputCard is Card.Dmps3HdmiInputWithoutAnalogAudio)
{
var hdmiInputCard = inputCard as Card.Dmps3HdmiInput;
var cecPort = hdmiInputCard.HdmiInputPort;
AddInputPortWithDebug(number, string.Format("HdmiIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
}
else if (inputCard is Card.Dmps3HdmiInput)
{
var hdmiInputCard = inputCard as Card.Dmps3HdmiInput;
var cecPort = hdmiInputCard.HdmiInputPort;
AddInputPortWithDebug(number, string.Format("HdmiIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
AddInputPortWithDebug(number, string.Format("HudioIn{1}", number), eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
}
else if (inputCard is Card.Dmps3HdmiVgaInput)
{
// TODO: Build a virtual TX device and assign the ports to it
var hdmiVgaInputCard = inputCard as Card.Dmps3HdmiVgaInput;
DmpsInternalVirtualHdmiVgaInputController inputCardController = new DmpsInternalVirtualHdmiVgaInputController(Key +
string.Format("-HdmiVgaIn{0}", number), string.Format("InternalInputController-{0}", number), hdmiVgaInputCard);
DeviceManager.AddDevice(inputCardController);
AddInputPortWithDebug(number, string.Format("HdmiVgaIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.BackplaneOnly);
}
else if (inputCard is Card.Dmps3HdmiVgaBncInput)
{
// TODO: Build a virtual TX device and assign the ports to it
var hdmiVgaBncInputCard = inputCard as Card.Dmps3HdmiVgaBncInput;
DmpsInternalVirtualHdmiVgaBncInputController inputCardController = new DmpsInternalVirtualHdmiVgaBncInputController(Key +
string.Format("-HdmiVgaBncIn{0}", number), string.Format("InternalInputController-{0}", number), hdmiVgaBncInputCard);
DeviceManager.AddDevice(inputCardController);
AddInputPortWithDebug(number, string.Format("HdmiVgaBncIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.BackplaneOnly);
}
else if (inputCard is Card.Dmps3DmInput)
{
var hdmiInputCard = inputCard as Card.Dmps3DmInput;
var cecPort = hdmiInputCard.DmInputPort;
AddInputPortWithDebug(number, string.Format("DmIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
}
else if (inputCard is Card.Dmps3AirMediaInput)
{
var airMediaInputCard = inputCard as Card.Dmps3AirMediaInput;
AddInputPortWithDebug(number, string.Format("AirMediaIn{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
}
}
/// <summary>
/// Adds InputPort
/// </summary>
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
{
var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
Debug.Console(2, this, "Adding input port '{0}'", portKey);
var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
InputPorts.Add(inputPort);
}
/// <summary>
/// Adds InputPort and sets Port as ICec object
/// </summary>
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
{
var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
Debug.Console(2, this, "Adding input port '{0}'", portKey);
var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
if (cecPort != null)
inputPort.Port = cecPort;
InputPorts.Add(inputPort);
}
/// <summary>
/// Builds the appropriate ports and calls the appropriate add port method
/// </summary>
/// <param name="number"></param>
/// <param name="outputCard"></param>
public void AddOutputCard(uint number, DMOutput outputCard)
{
if (outputCard is Card.Dmps3HdmiOutput)
{
var hdmiOutputCard = outputCard as Card.Dmps3HdmiOutput;
var cecPort = hdmiOutputCard.HdmiOutputPort;
AddHdmiOutputPort(number, cecPort);
return;
}
else if (outputCard is Card.Dmps3DmOutput)
{
var dmOutputCard = outputCard as Card.Dmps3DmOutput;
var cecPort = dmOutputCard.DmOutputPort;
AddDmOutputPort(number);
return;
}
else if (outputCard is Card.Dmps3ProgramOutput)
{
AddAudioOnlyOutputPort(number, "Program");
var programOutput = new DmpsAudioOutputController(string.Format("processor-programAudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
DeviceManager.AddDevice(programOutput);
return;
}
else if (outputCard is Card.Dmps3AuxOutput)
{
if (outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux1Output)
{
AddAudioOnlyOutputPort(number, "Aux1");
var aux1Output = new DmpsAudioOutputController(string.Format("processor-aux1AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
DeviceManager.AddDevice(aux1Output);
}
else if (outputCard.CardInputOutputType == eCardInputOutputType.Dmps3Aux2Output)
{
AddAudioOnlyOutputPort(number, "Aux2");
var aux2Output = new DmpsAudioOutputController(string.Format("processor-aux2AudioOutput"), "Program Audio Output", outputCard as Card.Dmps3OutputBase);
DeviceManager.AddDevice(aux2Output);
}
return;
}
else if (outputCard is Card.Dmps3CodecOutput)
{
if (number == (uint)CrestronControlSystem.eDmps300cOutputs.Codec1
|| number == (uint)CrestronControlSystem.eDmps3200cOutputs.Codec1
|| number == (uint)CrestronControlSystem.eDmps3300cAecOutputs.Codec1
|| number == (uint)CrestronControlSystem.eDmps34K250COutputs.Codec1
|| number == (uint)CrestronControlSystem.eDmps34K350COutputs.Codec1)
AddAudioOnlyOutputPort(number, CrestronControlSystem.eDmps300cOutputs.Codec1.ToString());
else if (number == (uint)CrestronControlSystem.eDmps300cOutputs.Codec2
|| number == (uint)CrestronControlSystem.eDmps3200cOutputs.Codec2
|| number == (uint)CrestronControlSystem.eDmps3300cAecOutputs.Codec2
|| number == (uint)CrestronControlSystem.eDmps34K250COutputs.Codec2
|| number == (uint)CrestronControlSystem.eDmps34K350COutputs.Codec2)
AddAudioOnlyOutputPort(number, CrestronControlSystem.eDmps300cOutputs.Codec2.ToString());
return;
}
else if (outputCard is Card.Dmps3DialerOutput)
{
AddAudioOnlyOutputPort(number, "Dialer");
return;
}
else if (outputCard is Card.Dmps3DigitalMixOutput)
{
if (number == (uint)CrestronControlSystem.eDmps34K250COutputs.Mix1
|| number == (uint)CrestronControlSystem.eDmps34K300COutputs.Mix1
|| number == (uint)CrestronControlSystem.eDmps34K350COutputs.Mix1)
AddAudioOnlyOutputPort(number, CrestronControlSystem.eDmps34K250COutputs.Mix1.ToString());
if (number == (uint)CrestronControlSystem.eDmps34K250COutputs.Mix2
|| number == (uint)CrestronControlSystem.eDmps34K300COutputs.Mix2
|| number == (uint)CrestronControlSystem.eDmps34K350COutputs.Mix2)
AddAudioOnlyOutputPort(number, CrestronControlSystem.eDmps34K250COutputs.Mix2.ToString());
return;
}
else if (outputCard is Card.Dmps3AecOutput)
{
AddAudioOnlyOutputPort(number, "Aec");
return;
}
else
{
Debug.Console(1, this, "Output Card is of a type not currently handled:", outputCard.CardInputOutputType.ToString());
}
}
/// <summary>
/// Adds an Audio only output port
/// </summary>
/// <param name="number"></param>
void AddAudioOnlyOutputPort(uint number, string portName)
{
AddOutputPortWithDebug(number, portName, eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, number);
}
/// <summary>
/// Adds an HDMI output port
/// </summary>
/// <param name="number"></param>
/// <param name="cecPort"></param>
void AddHdmiOutputPort(uint number, ICec cecPort)
{
AddOutputPortWithDebug(number, string.Format("hdmiOut{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, number, cecPort);
}
/// <summary>
/// Adds a DM output port
/// </summary>
/// <param name="number"></param>
void AddDmOutputPort(uint number)
{
AddOutputPortWithDebug(number, string.Format("dmOut{0}", number), eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, number);
}
/// <summary>
/// Adds OutputPort
/// </summary>
void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector)
{
var portKey = string.Format("outputCard{0}--{1}", cardNum, portName);
Debug.Console(2, this, "Adding output port '{0}'", portKey);
OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this));
}
/// <summary>
/// Adds OutputPort and sets Port as ICec object
/// </summary>
void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort)
{
var portKey = string.Format("outputCard{0}--{1}", cardNum, portName);
Debug.Console(2, this, "Adding output port '{0}'", portKey);
var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this);
if (cecPort != null)
outputPort.Port = cecPort;
OutputPorts.Add(outputPort);
}
/// <summary>
///
/// </summary>
void AddVolumeControl(uint number, Audio.Output audio)
{
VolumeControls.Add(number, new DmCardAudioOutputController(audio));
}
void Dmps_DMInputChange(Switch device, DMInputEventArgs args)
{
//Debug.Console(2, this, "DMSwitch:{0} Input:{1} Event:{2}'", this.Name, args.Number, args.EventId.ToString());
switch (args.EventId)
{
case (DMInputEventIds.OnlineFeedbackEventId):
{
Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
break;
}
case (DMInputEventIds.VideoDetectedEventId):
{
Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
VideoInputSyncFeedbacks[args.Number].FireUpdate();
break;
}
case (DMInputEventIds.InputNameEventId):
{
Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
InputNameFeedbacks[args.Number].FireUpdate();
break;
}
}
}
///
/// </summary>
void Dmps_DMOutputChange(Switch device, DMOutputEventArgs args)
{
Debug.Console(2, this, "DMOutputChange Output: {0} EventId: {1}", args.Number, args.EventId.ToString());
var output = args.Number;
DMOutput outputCard = Dmps.SwitcherOutputs[output] as DMOutput;
if (args.EventId == DMOutputEventIds.VolumeEventId &&
VolumeControls.ContainsKey(output))
{
VolumeControls[args.Number].VolumeEventFromChassis();
}
else if (args.EventId == DMOutputEventIds.OnlineFeedbackEventId
&& OutputEndpointOnlineFeedbacks.ContainsKey(output))
{
OutputEndpointOnlineFeedbacks[output].FireUpdate();
}
else if (args.EventId == DMOutputEventIds.VideoOutEventId)
{
if (outputCard != null && outputCard.VideoOutFeedback != null)
{
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, outputCard.VideoOutFeedback.Number, output);
}
if (VideoOutputFeedbacks.ContainsKey(output))
{
VideoOutputFeedbacks[output].FireUpdate();
}
if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
{
OutputVideoRouteNameFeedbacks[output].FireUpdate();
}
}
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
{
if (outputCard != null && outputCard.AudioOutFeedback != null)
{
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, outputCard.AudioOutFeedback.Number, output);
}
if (AudioOutputFeedbacks.ContainsKey(output))
{
AudioOutputFeedbacks[output].FireUpdate();
}
}
else if (args.EventId == DMOutputEventIds.OutputNameEventId
&& OutputNameFeedbacks.ContainsKey(output))
{
Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
OutputNameFeedbacks[output].FireUpdate();
}
}
/// <summary>
///
/// </summary>
/// <param name="pnt"></param>
void StartOffTimer(PortNumberType pnt)
{
if (RouteOffTimers.ContainsKey(pnt))
return;
RouteOffTimers[pnt] = new CTimer(o =>
{
ExecuteSwitch(0, pnt.Number, pnt.Type);
}, RouteOffTime);
}
#region IRouting Members
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType)
{
try
{
Debug.Console(2, this, "Attempting a DM route from input {0} to output {1} {2}", inputSelector, outputSelector, sigType);
var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
var output = Convert.ToUInt32(outputSelector);
if (input <= Dmps.NumberOfSwitcherInputs && output <= Dmps.NumberOfSwitcherOutputs)
{
// Check to see if there's an off timer waiting on this and if so, cancel
var key = new PortNumberType(output, sigType);
if (input == 0)
{
StartOffTimer(key);
}
else if (key.Number > 0)
{
if (RouteOffTimers.ContainsKey(key))
{
Debug.Console(2, this, "{0} cancelling route off due to new source", output);
RouteOffTimers[key].Stop();
RouteOffTimers.Remove(key);
}
}
DMInput inCard = input == 0 ? null : Dmps.SwitcherInputs[input] as DMInput;
Card.Dmps3OutputBase outCard = output == 0 ? null : Dmps.SwitcherOutputs[output] as Card.Dmps3OutputBase;
if (inCard != null)
{
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
if ((sigType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
{
//SystemControl.VideoEnter.BoolValue = true;
if (outCard != null && outCard.VideoOut != null)
outCard.VideoOut = inCard;
}
if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
{
if (outCard != null && outCard.AudioOut != null)
outCard.AudioOut = inCard;
}
if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
{
if (outCard != null && outCard.USBRoutedTo != null)
outCard.USBRoutedTo = inCard;
}
if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
{
if (inCard != null && inCard.USBRoutedTo != null)
inCard.USBRoutedTo = outCard;
}
}
else
{
Debug.Console(1, this, "Unable to execute route from input {0} to output {1}. Input card not available", inputSelector, outputSelector);
}
}
else
{
Debug.Console(1, this, "Unable to execute route from input {0} to output {1}", inputSelector, outputSelector);
}
}
catch (Exception e)
{
Debug.Console(1, this, "Error executing switch: {0}", e);
}
}
#endregion
}
}

View File

@@ -35,11 +35,11 @@ namespace PepperDash.Essentials.DM.Chassis
InputPorts = new RoutingPortCollection<RoutingInputPort>();
for (uint i = 1; i <= 4; i++)
{
InputPorts.Add(new RoutingInputPort("hdmiIn" + i, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort("hdmiIn" + i, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, i, this));
}
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this));
// physical settings

View File

@@ -31,7 +31,15 @@ namespace PepperDash.Essentials.DM.Config
[JsonProperty("outputNames")]
public Dictionary<uint, string> OutputNames { get; set; }
}
[JsonProperty("inputSlotSupportsHdcp2")]
public Dictionary<uint, bool> InputSlotSupportsHdcp2 { get; set; }
public DMChassisPropertiesConfig()
{
InputSlotSupportsHdcp2 = new Dictionary<uint, bool>();
}
}
/// <summary>
///

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.AirMedia;
using Crestron.SimplSharpPro.UI;
@@ -68,7 +69,24 @@ namespace PepperDash.Essentials.DM
return PepperDash.Essentials.DM.Chassis.HdMdNxM4kEController.GetController(key, name, type, props);
}
else if (typeName.Equals("hdmd400ce") || typeName.Equals("hdmd300ce") || typeName.Equals("hdmd200ce") || typeName.Equals("hdmd200c1ge"))
{
var props = JsonConvert.DeserializeObject
<PepperDash.Essentials.DM.HdMdxxxCEPropertiesConfig>(properties.ToString());
if (typeName.Equals("hdmd400ce"))
return new PepperDash.Essentials.DM.HdMdxxxCEController(key, name,
new HdMd400CE(props.Control.IpIdInt, props.Control.TcpSshProperties.Address, Global.ControlSystem));
else if (typeName.Equals("hdmd300ce"))
return new PepperDash.Essentials.DM.HdMdxxxCEController(key, name,
new HdMd300CE(props.Control.IpIdInt, props.Control.TcpSshProperties.Address, Global.ControlSystem));
else if (typeName.Equals("hdmd200ce"))
return new PepperDash.Essentials.DM.HdMdxxxCEController(key, name,
new HdMd200CE(props.Control.IpIdInt, props.Control.TcpSshProperties.Address, Global.ControlSystem));
else if (typeName.Equals("hdmd200c1ge"))
return new PepperDash.Essentials.DM.HdMdxxxCEController(key, name,
new HdMd200C1GE(props.Control.IpIdInt, props.Control.TcpSshProperties.Address, Global.ControlSystem));
}
return null;
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using Crestron.SimplSharpPro.DM;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM.Cards;
namespace PepperDash.Essentials.DM.Config
{
/// <summary>
/// Represents the "properties" property of a DM device config
/// </summary>
public class DmpsRoutingPropertiesConfig
{
[JsonProperty("inputNames")]
public Dictionary<uint, string> InputNames { get; set; }
[JsonProperty("outputNames")]
public Dictionary<uint, string> OutputNames { get; set; }
public DmpsRoutingPropertiesConfig()
{
InputNames = new Dictionary<uint, string>();
OutputNames = new Dictionary<uint, string>();
}
}
}

View File

@@ -0,0 +1,226 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Endpoints;
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.DM
{
/// <summary>
/// Represent both a transmitter and receiver pair of the HD-MD-400-C-E / HD-MD-300-C-E / HD-MD-200-C-E kits
/// </summary>
public class HdMdxxxCEController : CrestronGenericBaseDevice, IRouting//, IComPorts
{
/// <summary>
///// DmLite Ports
///// </summary>
//public RoutingOutputPort ToRx { get; private set; }
//public RoutingInputPort FromTx { get; private set; }
public RoutingOutputPort HdmiOut { get; private set; }
public HdMdxxxCE TxRxPair { get; private set; }
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
/// <summary>
/// The value of the current video source for the HDMI output on the receiver
/// </summary>
public IntFeedback VideoSourceFeedback { get; private set; }
/// <summary>
/// Indicates if Auto Route is on on the transmitter
/// </summary>
public BoolFeedback AutoRouteOnFeedback { get; private set; }
/// <summary>
/// Indicates if Priority Routing is on on the transmitter
/// </summary>
public BoolFeedback PriorityRoutingOnFeedback { get; private set; }
/// <summary>
/// INdicates if the On Screen Display is enabled
/// </summary>
public BoolFeedback InputOnScreenDisplayEnabledFeedback { get; private set; }
/// <summary>
/// Indicates if video sync is detected on each of the inputs
/// </summary>
public Dictionary<uint, BoolFeedback> SyncDetectedFeedbacks { get; private set; }
/// <summary>
/// Indicates if the remote end device is detected
/// </summary>
public BoolFeedback RemoteEndDetectedFeedback { get; private set; }
public RoutingPortCollection<RoutingOutputPort> OutputPorts
{
get { return new RoutingPortCollection<RoutingOutputPort> { HdmiOut }; }
}
public HdMdxxxCEController(string key, string name, HdMdxxxCE txRxPair)
:base(key, name, txRxPair)
{
TxRxPair = txRxPair;
RemoteEndDetectedFeedback = new BoolFeedback(() => TxRxPair.RemoteEndDetectedOnFeedback.BoolValue);
AutoRouteOnFeedback = new BoolFeedback(() => TxRxPair.TransmitterAutoModeOnFeedback.BoolValue);
PriorityRoutingOnFeedback = new BoolFeedback(() => TxRxPair.PriorityRoutingOnFeedback.BoolValue);
InputOnScreenDisplayEnabledFeedback = new BoolFeedback(() => TxRxPair.OnScreenDisplayEnabledFeedback.BoolValue);
InputPorts = new RoutingPortCollection<RoutingInputPort>();
SyncDetectedFeedbacks = new Dictionary<uint, BoolFeedback>();
// Add the HDMI input port on the receiver
InputPorts.Add(new RoutingInputPort(DmPortName.Hdmi, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, 1, this));
SyncDetectedFeedbacks.Add(1, new BoolFeedback( () => TxRxPair.HdmiInputs[1].VideoDetectedFeedback.BoolValue));
if(txRxPair is HdMd400CE)
{
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, 2, this));
SyncDetectedFeedbacks.Add(2, new BoolFeedback(() => TxRxPair.HdmiInputs[2].VideoDetectedFeedback.BoolValue));
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, 3, this));
SyncDetectedFeedbacks.Add(3, new BoolFeedback(() => TxRxPair.HdmiInputs[3].VideoDetectedFeedback.BoolValue));
InputPorts.Add(new RoutingInputPort(DmPortName.VgaIn, eRoutingSignalType.Video | eRoutingSignalType.Audio,
eRoutingPortConnectionType.Vga, 4, this));
SyncDetectedFeedbacks.Add(4, new BoolFeedback(() => TxRxPair.VgaInputs[1].VideoDetectedFeedback.BoolValue));
// Set Ports for CEC
InputPorts[DmPortName.HdmiIn1].Port = TxRxPair.HdmiInputs[1];
InputPorts[DmPortName.HdmiIn2].Port = TxRxPair.HdmiInputs[2];
}
else if (txRxPair is HdMd300CE)
{
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, 2, this));
SyncDetectedFeedbacks.Add(2, new BoolFeedback(() => TxRxPair.HdmiInputs[2].VideoDetectedFeedback.BoolValue));
InputPorts.Add(new RoutingInputPort(DmPortName.VgaIn, eRoutingSignalType.Video | eRoutingSignalType.Audio,
eRoutingPortConnectionType.Vga, 3, this));
SyncDetectedFeedbacks.Add(3, new BoolFeedback(() => TxRxPair.VgaInputs[1].VideoDetectedFeedback.BoolValue));
// Set Ports for CEC
InputPorts[DmPortName.HdmiIn].Port = TxRxPair.HdmiInputs[1];
}
else if (txRxPair is HdMd200CE || txRxPair is HdMd200C1GE)
{
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, 2, this));
SyncDetectedFeedbacks.Add(2, new BoolFeedback(() => TxRxPair.HdmiInputs[2].VideoDetectedFeedback.BoolValue));
// Set Ports for CEC
InputPorts[DmPortName.HdmiIn].Port = TxRxPair.HdmiInputs[1];
}
//ToRx = new RoutingOutputPort(DmPortName.ToTx, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.DmCat, null, this);
//FromTx = new RoutingInputPort(DmPortName.FromTx, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.DmCat, null, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
OutputPorts[DmPortName.HdmiOut].Port = TxRxPair.HdmiOutputs[1];
TxRxPair.DMInputChange += new DMInputEventHandler(TxRxPair_DMInputChange);
TxRxPair.DMOutputChange += new DMOutputEventHandler(TxRxPair_DMOutputChange);
TxRxPair.DMSystemChange += new DMSystemEventHandler(TxRxPair_DMSystemChange);
VideoSourceFeedback = new IntFeedback(() => (int)TxRxPair.HdmiOutputs[1].VideoOutFeedback.Number);
}
void TxRxPair_DMSystemChange(Switch device, DMSystemEventArgs args)
{
if (args.EventId == DMSystemEventIds.RemoteEndDetectedEventId)
RemoteEndDetectedFeedback.FireUpdate();
else if (args.EventId == DMSystemEventIds.TransmitterAutoModeOnEventId)
AutoRouteOnFeedback.FireUpdate();
else if (args.EventId == DMSystemEventIds.PriorityRoutingOnEventId)
PriorityRoutingOnFeedback.FireUpdate();
else if (args.EventId == DMSystemEventIds.OnScreenDisplayEnabledEventId)
InputOnScreenDisplayEnabledFeedback.FireUpdate();
}
void TxRxPair_DMOutputChange(Switch device, DMOutputEventArgs args)
{
if (args.EventId == DMOutputEventIds.VideoOutEventId)
VideoSourceFeedback.FireUpdate();
}
void TxRxPair_DMInputChange(Switch device, DMInputEventArgs args)
{
if (args.EventId == DMInputEventIds.VideoDetectedEventId)
SyncDetectedFeedbacks[args.Number].FireUpdate();
}
public void AutoRouteOn()
{
TxRxPair.TransmitterAutoModeOn();
}
public void AutoRouteOff()
{
TxRxPair.TransmitterAutoModeOff();
}
public void PriorityRouteOn()
{
TxRxPair.PriorityRoutingOn();
}
public void PriorityRouteOff()
{
TxRxPair.PriorityRoutingOff();
}
public void OnScreenDisplayEnable()
{
TxRxPair.OnScreenDisplayEnabled();
}
public void OnScreenDisplayDisable()
{
TxRxPair.OnScreenDisplayDisabled();
}
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
{
var number = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
var input = number == 0 ? null : TxRxPair.Inputs[number];
TxRxPair.HdmiOutputs[1].VideoOut = input;
}
// This device has a different class for com ports which will make it hard to implement IComPorts....
//#region IComPorts Members
//public CrestronCollection<ComPort> ComPorts { get { return TxRxPair.ComPorts as CrestronCollection<ComPort>; } }
//public int NumberOfComPorts { get { return 1; } }
//#endregion
}
public class HdMdxxxCEPropertiesConfig
{
public ControlPropertiesConfig Control { get; set; }
}
}

View File

@@ -14,16 +14,20 @@ namespace PepperDash.Essentials.DM
public const string AirBoardIn = "AirBoardIn";
public const string AirMediaIn = "AirMediaIn";
public const string AnyVideoIn = "AnyVideoIn";
public const string AudioIn = "AudioIn";
public const string AudioLoopOut = "AudioLoopOut";
public const string BalancedAudioOut = "BalancedAudioOut";
public const string BalancedAudioOut1 = "BalancedAudioOut1";
public const string BalancedAudioOut2 = "BalancedAudioOut2";
public const string BncIn = "BncIn";
public const string CompositeIn = "CompositeIn";
public const string DisplayPortIn = "DisplayPortIn";
public const string DmIn = "DmIn";
public const string DmOut = "DmOut";
public const string DmOut1 = "DmOut1";
public const string DmOut2 = "DmOut2";
public const string FromTx = "FromTx";
public const string Hdmi = "Hdmi";
public const string HdmiIn = "HdmiIn";
public const string HdmiIn1 = "HdmiIn1";
public const string HdmiIn2 = "HdmiIn2";
@@ -32,6 +36,8 @@ namespace PepperDash.Essentials.DM
public const string HdmiLoopOut = "HdmiLoopOut";
public const string HdmiOut = "HdmiOut";
public const string Osd = "Osd";
public const string SpdifIn = "SpdifIn";
public const string ToTx = "ToTx";
public const string VgaIn = "VgaIn";
}
}

View File

@@ -32,9 +32,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HDBaseTSink = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HDBaseTSink = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
// Set Ports for CEC

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
// Set Ports for CEC

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);

View File

@@ -42,9 +42,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
eRoutingPortConnectionType.LineAudio, null, this);

View File

@@ -33,9 +33,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
// Set Ports for CEC

View File

@@ -42,9 +42,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
BalancedAudioOut = new RoutingOutputPort(DmPortName.BalancedAudioOut, eRoutingSignalType.Audio,
eRoutingPortConnectionType.LineAudio, null, this);

View File

@@ -112,6 +112,8 @@ namespace PepperDash.Essentials.DM
{
if (typeName.StartsWith("dmrmc100c"))
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmrmc100s"))
return new DmRmc100SController(key, name, new DmRmc100S(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmrmc4k100c"))
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmrmc4kz100c"))
@@ -182,6 +184,8 @@ namespace PepperDash.Essentials.DM
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc100c"))
return new DmRmcX100CController(key, name, new DmRmc100C(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc100s"))
return new DmRmc100SController(key, name, new DmRmc100S(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4k100c"))
return new DmRmcX100CController(key, name, new DmRmc4k100C(chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kz100c"))
@@ -213,6 +217,8 @@ namespace PepperDash.Essentials.DM
return new DmRmc4k100C1GController(key, name, new DmRmc4K100C1G(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc100c"))
return new DmRmcX100CController(key, name, new DmRmc100C(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc100s"))
return new DmRmc100SController(key, name, new DmRmc100S(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4k100c"))
return new DmRmcX100CController(key, name, new DmRmc4k100C(ipid, chassis.Outputs[num]));
if (typeName.StartsWith("dmrmc4kz100c"))

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
EdidManufacturerFeedback = new StringFeedback(() => Rmc.HdmiOutput.ConnectedDevice.Manufacturer.StringValue);

View File

@@ -41,9 +41,9 @@ namespace PepperDash.Essentials.DM
: base(key, name, rmc)
{
Rmc = rmc;
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, 0, this);
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
// Set Ports for CEC

View File

@@ -91,7 +91,7 @@ namespace PepperDash.Essentials.DM
Tx = tx;
HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, DmTx200Base.eSourceSelection.Digital, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, DmTx200Base.eSourceSelection.Digital, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput));
VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this,
@@ -155,9 +155,9 @@ namespace PepperDash.Essentials.DM
};
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat, null, this);
DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, null, this);
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,

View File

@@ -92,7 +92,7 @@ namespace PepperDash.Essentials.DM
Tx = tx;
HdmiInput = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, DmTx200Base.eSourceSelection.Digital, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, DmTx200Base.eSourceSelection.Digital, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput));
VgaInput = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, DmTx200Base.eSourceSelection.Analog, this,
@@ -156,10 +156,10 @@ namespace PepperDash.Essentials.DM
};
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat, null, this);
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.AudioVideo,
DmOutput = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, null, this);
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,

View File

@@ -21,6 +21,8 @@ namespace PepperDash.Essentials.DM
{
public DmTx401C Tx { get; private set; }
public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; }
public RoutingInputPortWithVideoStatuses DisplayPortIn { get; private set; }
public RoutingInputPortWithVideoStatuses VgaIn { get; private set; }
@@ -92,10 +94,10 @@ namespace PepperDash.Essentials.DM
Tx = tx;
HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.HDMI, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.HDMI, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInput));
DisplayPortIn = new RoutingInputPortWithVideoStatuses(DmPortName.DisplayPortIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.DisplayPort, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.DisplayPort, this,
VideoStatusHelper.GetDisplayPortInputStatusFuncs(tx.DisplayPortInput));
VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.VGA, this,
@@ -168,11 +170,11 @@ namespace PepperDash.Essentials.DM
&& tx.CvbsInput.SyncDetectedFeedback.BoolValue)
};
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.DmCat, null, this);
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, null, this);
AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback,
AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback,

View File

@@ -67,9 +67,9 @@ namespace PepperDash.Essentials.DM
Tx = tx;
HdmiIn = new RoutingInputPort(DmPortName.HdmiIn1,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this);
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this);
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.AudioVideo,
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, null, this);
// Set Ports for CEC

View File

@@ -82,10 +82,10 @@ namespace PepperDash.Essentials.DM
Tx = tx;
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
() => ActualActiveVideoInput.ToString());
@@ -151,11 +151,11 @@ namespace PepperDash.Essentials.DM
};
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.AudioVideo,
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, null, this);
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.AudioVideo,
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);

View File

@@ -86,10 +86,10 @@ namespace PepperDash.Essentials.DM
Tx = tx;
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
VgaIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
eRoutingSignalType.Video, eRoutingPortConnectionType.Vga, eVst.Vga, this,
@@ -161,11 +161,11 @@ namespace PepperDash.Essentials.DM
};
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.AudioVideo,
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, null, this);
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.AudioVideo,
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);

View File

@@ -86,13 +86,13 @@ namespace PepperDash.Essentials.DM
Tx = tx;
HdmiIn1 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn1,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi1, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[1]));
HdmiIn2 = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn2,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, eVst.Hdmi2, this,
VideoStatusHelper.GetHdmiInputStatusFuncs(tx.HdmiInputs[2]));
DisplayPortIn = new RoutingInputPortWithVideoStatuses(DmPortName.VgaIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DisplayPort, eVst.DisplayPort, this,
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DisplayPort, eVst.DisplayPort, this,
VideoStatusHelper.GetDisplayPortInputStatusFuncs(tx.DisplayPortInput));
ActiveVideoInputFeedback = new StringFeedback("ActiveVideoInput",
() => ActualActiveVideoInput.ToString());
@@ -161,11 +161,11 @@ namespace PepperDash.Essentials.DM
};
AnyVideoInput = new RoutingInputPortWithVideoStatuses(DmPortName.AnyVideoIn,
eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.None, 0, this, combinedFuncs);
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.AudioVideo,
DmOut = new RoutingOutputPort(DmPortName.DmOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, null, this);
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.AudioVideo,
HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
@@ -207,27 +207,27 @@ namespace PepperDash.Essentials.DM
{
case 0:
{
ExecuteSwitch(eVst.Auto, null, eRoutingSignalType.AudioVideo);
ExecuteSwitch(eVst.Auto, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
break;
}
case 1:
{
ExecuteSwitch(HdmiIn1.Selector, null, eRoutingSignalType.AudioVideo);
ExecuteSwitch(HdmiIn1.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
break;
}
case 2:
{
ExecuteSwitch(HdmiIn2.Selector, null, eRoutingSignalType.AudioVideo);
ExecuteSwitch(HdmiIn2.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
break;
}
case 3:
{
ExecuteSwitch(DisplayPortIn.Selector, null, eRoutingSignalType.AudioVideo);
ExecuteSwitch(DisplayPortIn.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
break;
}
case 4:
{
ExecuteSwitch(eVst.AllDisabled, null, eRoutingSignalType.AudioVideo);
ExecuteSwitch(eVst.AllDisabled, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
break;
}
}

View File

@@ -37,7 +37,7 @@ namespace PepperDash.Essentials.DM
// Catch constructor failures, mainly dues to IPID
try
{
if(typeName.StartsWith("dmTx200"))
if(typeName.StartsWith("dmtx200"))
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, Global.ControlSystem));
if (typeName.StartsWith("dmtx201"))
return new DmTx201XController(key, name, new DmTx201S(ipid, Global.ControlSystem));
@@ -55,7 +55,7 @@ namespace PepperDash.Essentials.DM
}
catch (Exception e)
{
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e.Message);
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
}
}
else
@@ -93,7 +93,7 @@ namespace PepperDash.Essentials.DM
chassis is DmMd32x32Cpu3 || chassis is DmMd8x8Cpu3rps ||
chassis is DmMd16x16Cpu3rps || chassis is DmMd32x32Cpu3rps)
{
if (typeName.StartsWith("dmTx200"))
if (typeName.StartsWith("dmtx200"))
return new DmTx200Controller(key, name, new DmTx200C2G(chassis.Inputs[num]));
if (typeName.StartsWith("dmtx201"))
return new DmTx201XController(key, name, new DmTx201C(chassis.Inputs[num]));
@@ -112,7 +112,7 @@ namespace PepperDash.Essentials.DM
}
else
{
if (typeName.StartsWith("dmTx200"))
if (typeName.StartsWith("dmtx200"))
return new DmTx200Controller(key, name, new DmTx200C2G(ipid, chassis.Inputs[num]));
if (typeName.StartsWith("dmtx201"))
return new DmTx201XController(key, name, new DmTx201C(ipid, chassis.Inputs[num]));
@@ -132,7 +132,7 @@ namespace PepperDash.Essentials.DM
}
catch (Exception e)
{
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e.Message);
Debug.Console(0, "[{0}] WARNING: Cannot create DM-TX device: {1}", key, e);
}
}

View File

@@ -1,160 +1,165 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9199CE8A-0C9F-4952-8672-3EED798B284F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PepperDash.Essentials.DM</RootNamespace>
<AssemblyName>PepperDash_Essentials_DM</AssemblyName>
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
<OSVersion>5.0</OSVersion>
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<NativePlatformName>Windows CE</NativePlatformName>
<FormFactorID>
</FormFactorID>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.4.20530, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\references\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
</Reference>
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
<Compile Include="AirMedia\AirMediaController.cs" />
<Compile Include="Cards REMOVE\Dmc4kHdoSingleOutputCard.cs" />
<Compile Include="Cards REMOVE\Dmc4kCoHdSingleOutputCard.cs" />
<Compile Include="Cards REMOVE\DmOutputCardBase.cs" />
<Compile Include="Cards REMOVE\DmcC4kInputCard.cs" />
<Compile Include="Cards REMOVE\DmcHD4kInputCard.cs" />
<Compile Include="Cards REMOVE\DmInputCardBase.cs" />
<Compile Include="Chassis\DmCardAudioOutput.cs" />
<Compile Include="Chassis\DmChassisController.cs" />
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
<Compile Include="Config\DmRmcConfig.cs" />
<Compile Include="Config\DmTxConfig.cs" />
<Compile Include="Config\DMChassisConfig.cs" />
<Compile Include="Config\HdMdNxM4kEPropertiesConfig.cs" />
<Compile Include="Config\InputPropertiesConfig.cs" />
<Compile Include="DmPortName.cs" />
<Compile Include="Endpoints\NVX\DmNvx35xController.cs" />
<Compile Include="Endpoints\NVX\DmNvxConfig.cs" />
<Compile Include="Endpoints\NVX\DmNvxControllerBase.cs" />
<Compile Include="Endpoints\DGEs\DgeController.cs" />
<Compile Include="Endpoints\DGEs\DgePropertiesConfig.cs" />
<Compile Include="Endpoints\Receivers\DmHdBaseTEndpointController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc100SController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc150SController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc200CController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc200S2Controller.cs" />
<Compile Include="Endpoints\Receivers\DmRmc200SController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc4k100C1GController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc4KScalerCController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc4kScalerCDspController.cs" />
<Compile Include="Endpoints\Receivers\DmRmcScalerCController.cs" />
<Compile Include="Endpoints\Receivers\DmRmcX100CController.cs" />
<Compile Include="Endpoints\Receivers\DmRmcHelper.cs" />
<Compile Include="Endpoints\Receivers\DmRmcScalerS2Controller.cs" />
<Compile Include="Endpoints\Receivers\DmRmcScalerSController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx200Controller.cs" />
<Compile Include="Endpoints\Transmitters\DmTx401CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx4k100Controller.cs" />
<Compile Include="Endpoints\Transmitters\DmTx4k202CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx4k302CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx201CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx4kz302CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTxHelpers.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="Config\DeviceFactory.cs" />
<Compile Include="IDmHdmiInputExtensions.cs" />
<Compile Include="MOVE IBasicVideoStatusFeedbacks.cs" />
<Compile Include="Nvx\NvxDirectorController.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VideoStatusHelpers.cs" />
<None Include="app.config" />
<None Include="Properties\ControlSystem.cfg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
<Name>PepperDash_Essentials_Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
</PropertyGroup>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9199CE8A-0C9F-4952-8672-3EED798B284F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PepperDash.Essentials.DM</RootNamespace>
<AssemblyName>PepperDash_Essentials_DM</AssemblyName>
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
<OSVersion>5.0</OSVersion>
<DeployDirSuffix>SmartDeviceProject1</DeployDirSuffix>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<NativePlatformName>Windows CE</NativePlatformName>
<FormFactorID>
</FormFactorID>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowedReferenceRelatedFileExtensions>.allowedReferenceRelatedFileExtensions</AllowedReferenceRelatedFileExtensions>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<FileAlignment>512</FileAlignment>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Crestron.SimplSharpPro.DeviceSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.DM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
</Reference>
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.26.30384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\pepperdashcore-builds\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
</Reference>
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
<Compile Include="AirMedia\AirMediaController.cs" />
<Compile Include="Cards REMOVE\Dmc4kHdoSingleOutputCard.cs" />
<Compile Include="Cards REMOVE\Dmc4kCoHdSingleOutputCard.cs" />
<Compile Include="Cards REMOVE\DmOutputCardBase.cs" />
<Compile Include="Cards REMOVE\DmcC4kInputCard.cs" />
<Compile Include="Cards REMOVE\DmcHD4kInputCard.cs" />
<Compile Include="Cards REMOVE\DmInputCardBase.cs" />
<Compile Include="Chassis\DmCardAudioOutput.cs" />
<Compile Include="Chassis\DmChassisController.cs" />
<Compile Include="Chassis\DmpsAudioOutputController.cs" />
<Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" />
<Compile Include="Chassis\DmpsRoutingController.cs" />
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
<Compile Include="Config\DmpsRoutingConfig.cs" />
<Compile Include="Config\DmRmcConfig.cs" />
<Compile Include="Config\DmTxConfig.cs" />
<Compile Include="Config\DMChassisConfig.cs" />
<Compile Include="Config\HdMdNxM4kEPropertiesConfig.cs" />
<Compile Include="Config\InputPropertiesConfig.cs" />
<Compile Include="DmPortName.cs" />
<Compile Include="Endpoints\NVX\DmNvx35xController.cs" />
<Compile Include="Endpoints\NVX\DmNvxConfig.cs" />
<Compile Include="Endpoints\NVX\DmNvxControllerBase.cs" />
<Compile Include="Endpoints\DGEs\DgeController.cs" />
<Compile Include="Endpoints\DGEs\DgePropertiesConfig.cs" />
<Compile Include="DmLite\HdMdxxxCEController.cs" />
<Compile Include="Endpoints\Receivers\DmHdBaseTEndpointController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc100SController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc150SController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc200CController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc200S2Controller.cs" />
<Compile Include="Endpoints\Receivers\DmRmc200SController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc4k100C1GController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc4KScalerCController.cs" />
<Compile Include="Endpoints\Receivers\DmRmc4kScalerCDspController.cs" />
<Compile Include="Endpoints\Receivers\DmRmcScalerCController.cs" />
<Compile Include="Endpoints\Receivers\DmRmcX100CController.cs" />
<Compile Include="Endpoints\Receivers\DmRmcHelper.cs" />
<Compile Include="Endpoints\Receivers\DmRmcScalerS2Controller.cs" />
<Compile Include="Endpoints\Receivers\DmRmcScalerSController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx200Controller.cs" />
<Compile Include="Endpoints\Transmitters\DmTx401CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx4k100Controller.cs" />
<Compile Include="Endpoints\Transmitters\DmTx4k202CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx4k302CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx201CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTx4kz302CController.cs" />
<Compile Include="Endpoints\Transmitters\DmTxHelpers.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="Config\DeviceFactory.cs" />
<Compile Include="IDmHdmiInputExtensions.cs" />
<Compile Include="MOVE IBasicVideoStatusFeedbacks.cs" />
<Compile Include="Nvx\NvxDirectorController.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VideoStatusHelpers.cs" />
<None Include="app.config" />
<None Include="Properties\ControlSystem.cfg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
<Name>PepperDash_Essentials_Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
<PostBuildEvent>rem S# Pro preparation will execute after these operations</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -326,38 +326,38 @@
// else if (type == "dmcS")
// {
// new DmcS(number, Chassis);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmMmFiber);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcSDsp")
// {
// new DmcSDsp(number, Chassis);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmMmFiber);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcS2")
// {
// new DmcS2(number, Chassis);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmSmFiber);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcS2Dsp")
// {
// new DmcS2Dsp(number, Chassis);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmSmFiber);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcSdi")
// {
// new DmcSdi(number, Chassis);
// AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Sdi);
// AddOutputPortWithDebug(number, "sdiOut", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Sdi, null);
// AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
// AddOutputPortWithDebug(number, "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi, null);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcDvi")
// {
// new DmcDvi(number, Chassis);
// AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Dvi);
// AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi);
// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
// AddInCardHdmiLoopPort(number);
// }
@@ -401,32 +401,32 @@
// else if (type == "dmcStr")
// {
// new DmcStr(number, Chassis);
// AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Streaming);
// AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// }
// void AddDmInCardPorts(uint number)
// {
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// void AddHdmiInCardPorts(uint number, ICec cecPort)
// {
// AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, cecPort);
// AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// void AddInCardHdmiAndAudioLoopPorts(uint number)
// {
// AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null);
// AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null);
// AddOutputPortWithDebug(number, "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null);
// }
// void AddInCardHdmiLoopPort(uint number)
// {
// AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null);
// AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null);
// }
// /// <summary>
@@ -479,23 +479,23 @@
// {
// var outputCard = new DmcSoHdSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2);
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2);
// }
// else if (type == "dmcS2oHd")
// {
// var outputCard = new DmcS2oHdSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2);
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2);
// }
// else if (type == "dmcStro")
// {
// var outputCard = new DmcStroSingle(number, Chassis);
// AddOutputPortWithDebug(number, "streamOut", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1);
// }
// else
@@ -504,17 +504,17 @@
// void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2)
// {
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut2", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 2, cecPort2);
// AddOutputPortWithDebug(number, "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 2, cecPort2);
// AddOutputPortWithDebug(number, "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 2);
// }
// void AddDmcCoPorts(uint number, ICec cecPort1)
// {
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 2);
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 2);
// }

View File

@@ -48,6 +48,26 @@ namespace PepperDash.Essentials.DM
};
}
public static VideoStatusFuncsWrapper GetVgaInputStatusFuncs(VgaDviInputPort port)
{
return new VideoStatusFuncsWrapper
{
HdcpActiveFeedbackFunc = () => port.VideoAttributes.HdcpActiveFeedback.BoolValue,
HdcpStateFeedbackFunc = () => port.VideoAttributes.HdcpStateFeedback.ToString(),
VideoResolutionFeedbackFunc = () => port.VideoAttributes.GetVideoResolutionString(),
VideoSyncFeedbackFunc = () => port.SyncDetectedFeedback.BoolValue
};
}
public static VideoStatusFuncsWrapper GetBncInputStatusFuncs(Component port)
{
return new VideoStatusFuncsWrapper
{
VideoResolutionFeedbackFunc = () => port.VideoAttributes.GetVideoResolutionString(),
VideoSyncFeedbackFunc = () => port.VideoDetectedFeedback.BoolValue
};
}
public static VideoStatusFuncsWrapper GetDmInputStatusFuncs(DMInputPort port)
{
return new VideoStatusFuncsWrapper

View File

@@ -33,7 +33,7 @@ namespace PepperDash.Essentials.Devices.Common
PowerIsOnFeedback = new BoolFeedback(() => _PowerIsOn);
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo,
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
eRoutingPortConnectionType.DigitalAudio, null, this);

View File

@@ -146,28 +146,28 @@ namespace PepperDash.Essentials.Devices.Displays
v => SetVolume((ushort)v),
() => _LastVolumeSent);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo,
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi1), this), InputHdmi1Value);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo,
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi2), this), InputHdmi2Value);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo,
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi3), this), InputHdmi3Value);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn4, eRoutingSignalType.AudioVideo,
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn4, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi4), this), InputHdmi4Value);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn5, eRoutingSignalType.AudioVideo,
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn5, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi5), this), InputHdmi5Value);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.DisplayPortIn1, eRoutingSignalType.AudioVideo,
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.DisplayPortIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DisplayPort, new Action(InputDisplayPort1), this), InputDisplayPort1Value);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.VgaIn, eRoutingSignalType.AudioVideo,
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.VgaIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Dvi, new Action(InputVga1), this), InputVga1Value);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.IpcOps, eRoutingSignalType.AudioVideo,
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.IpcOps, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Composite, new Action(InputIpcOps), this), InputIpcOpsValue);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.MediaPlayer, eRoutingSignalType.Video,

View File

@@ -103,21 +103,21 @@ namespace PepperDash.Essentials.Devices.Displays
PortGather.LineReceived += this.Port_LineReceived;
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, "xx\x0d");
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi1), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi2), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn3, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi3), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn4, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(RoutingPortNames.HdmiIn4, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi4), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.DisplayPortIn1, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(RoutingPortNames.DisplayPortIn1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DisplayPort, new Action(InputDisplayPort1), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.DisplayPortIn2, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(RoutingPortNames.DisplayPortIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DisplayPort, new Action(InputDisplayPort2), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.DviIn, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(RoutingPortNames.DviIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Dvi, new Action(InputDvi1), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.CompositeIn, eRoutingSignalType.AudioVideo,
InputPorts.Add(new RoutingInputPort(RoutingPortNames.CompositeIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Composite, new Action(InputVideo1), this));
InputPorts.Add(new RoutingInputPort(RoutingPortNames.VgaIn, eRoutingSignalType.Video,
eRoutingPortConnectionType.Vga, new Action(InputVga), this));

Some files were not shown because too many files have changed in this diff Show More