Skip to content

Commit

Permalink
Merge pull request #115 from PepperDash/IMatrixRouting-implementation
Browse files Browse the repository at this point in the history
4-Series/Essentials 2.0.0 updates
  • Loading branch information
ngenovese11 authored May 8, 2024
2 parents 6c96bf9 + d922084 commit f158eb8
Show file tree
Hide file tree
Showing 54 changed files with 1,647 additions and 149 deletions.
Binary file added ._packages.config
Binary file not shown.
31 changes: 31 additions & 0 deletions .github/workflows/EssentialsPlugins-builds-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Essentials Plugin

on:
push:
branches:
- '**'

jobs:
getVersion:
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
secrets: inherit
build-3Series:
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-3Series-builds.yml@main
secrets: inherit
needs: getVersion
if: needs.getVersion.outputs.newVersion == 'true'
with:
newVersion: ${{ needs.getVersion.outputs.newVersion }}
version: ${{ needs.getVersion.outputs.version }}
tag: ${{ needs.getVersion.outputs.tag }}
channel: ${{ needs.getVersion.outputs.channel }}
build-4Series:
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-4Series-builds.yml@main
secrets: inherit
needs: getVersion
if: needs.getVersion.outputs.newVersion == 'true'
with:
newVersion: ${{ needs.getVersion.outputs.newVersion }}
version: ${{ needs.getVersion.outputs.version }}
tag: ${{ needs.getVersion.outputs.tag }}
channel: ${{ needs.getVersion.outputs.channel }}
22 changes: 0 additions & 22 deletions .github/workflows/essentialsplugins-betabuilds-caller.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/essentialsplugins-releasebuilds-caller.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ bld/
[Oo]bj/
[Ll]og/
[Ll]ogs/
[Oo]utput/

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand Down
34 changes: 34 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{ "scope": "force-patch", "release": "patch" },
{ "scope": "no-release", "release": false }
]
}
],
"@semantic-release/release-notes-generator",
["@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "echo \"newVersion=true\" >> $GITHUB_OUTPUT",
"publishCmd": "echo \"version=${nextRelease.version}\" >> $GITHUB_OUTPUT && echo \"tag=${nextRelease.gitTag}\" >> $GITHUB_OUTPUT && echo \"type=${nextRelease.type}\" >> $GITHUB_OUTPUT && echo \"channel=${nextRelease.channel}\" >> $GITHUB_OUTPUT"
}
]
],
"branches": [
"main",
{
"name": "replace-me-feature-branch",
"prerelease": "replace-me-prerelease",
"channel": "replace-me-prerelease"
}
]
}
7 changes: 7 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) <2020> PepperDash Technology Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
File renamed without changes.
25 changes: 25 additions & 0 deletions NvxEpi.4Series.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34601.278
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NvxEpi.4Series", "src\NvxEpi\NvxEpi.4Series.csproj", "{A24B641A-8D55-412B-8522-C2F825B17BF9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A24B641A-8D55-412B-8522-C2F825B17BF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A24B641A-8D55-412B-8522-C2F825B17BF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A24B641A-8D55-412B-8522-C2F825B17BF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A24B641A-8D55-412B-8522-C2F825B17BF9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DA074D94-0A55-463E-8A97-3E45A81AD79A}
EndGlobalSection
EndGlobal
21 changes: 21 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project>
<PropertyGroup>
<Version>1.0.0-local</Version>
<InformationalVersion>$(Version)</InformationalVersion>
<Authors>PepperDash Technologies</Authors>
<Company>PepperDash Technologies</Company>
<Product>PepperDash Crestron NVX</Product>
<Copyright>Copyright © 2023</Copyright>
<RepositoryUrl>https://github.com/PepperDash/epi-mobile-control</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Crestron; 4series</PackageTags>
<PackageOutputPath>../../output</PackageOutputPath>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\LICENSE.md" Pack="true" PackagePath=""/>
<None Include="..\..\README.md" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>
20 changes: 20 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>
<ItemGroup>
<None Include="$(TargetDir)\$(TargetName).$(Version).cpz" Condition="$(ProjectType) == 'Program'">
<Pack>true</Pack>
<PackagePath>content;</PackagePath>
</None>
<None Include="$(PackageOutputPath)\$(TargetName).$(Version).cplz" Condition="$(ProjectType) == 'ProgramLibrary'">
<Pack>true</Pack>
<PackagePath>content;</PackagePath>
</None>
</ItemGroup>
<Target Name="Create CPLZ" AfterTargets="Build; Rebuild" Condition="$(ProjectType) == 'ProgramLibrary'">
<Message Text="Creating CPLZ"></Message>
<MakeDir Directories="$(PackageOutputPath)" Condition="!Exists($(PackageOutputPath))"></MakeDir>
<ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(PackageOutputPath)\$(TargetName).$(Version).cplz" Overwrite="true"/>
</Target>
<Target Name="Clean CPLZ" AfterTargets="AfterClean" Condition="$(ProjectType) == 'ProgramLibrary'">
<Delete Files="$(PackageOutputPath)\$(TargetName).$(Version).cplz"/>
</Target>
</Project>
14 changes: 12 additions & 2 deletions src/NvxEpi/Abstractions/HdmiInput/IHdmiInput.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Crestron.SimplSharp;
using NvxEpi.Abstractions.Hardware;
using PepperDash.Essentials.Core;

namespace NvxEpi.Abstractions.HdmiInput
Expand All @@ -8,6 +7,17 @@ public interface IHdmiInput : INvxDeviceWithHardware
{
ReadOnlyDictionary<uint, IntFeedback> HdcpCapability { get; }
ReadOnlyDictionary<uint, BoolFeedback> SyncDetected { get; }
ReadOnlyDictionary<uint, StringFeedback> CurrentResolution { get; }
ReadOnlyDictionary<uint, StringFeedback> CurrentResolution { get; }

ReadOnlyDictionary<uint, StringFeedback> HdcpCapabilityString { get; }

ReadOnlyDictionary<uint, StringFeedback> HdcpSupport { get; }
ReadOnlyDictionary<uint, IntFeedback> AudioChannels { get; }

ReadOnlyDictionary<uint, StringFeedback> AudioFormat { get; }

ReadOnlyDictionary<uint, StringFeedback> ColorSpace { get; }

ReadOnlyDictionary<uint, StringFeedback> HdrType { get; }
}
}
2 changes: 2 additions & 0 deletions src/NvxEpi/Abstractions/HdmiOutput/IHdmiOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ public interface IHdmiOutput : INvxDeviceWithHardware
BoolFeedback DisabledByHdcp { get; }
IntFeedback HorizontalResolution { get; }
StringFeedback EdidManufacturer { get; }

StringFeedback OutputResolution { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
using NvxEpi.Features.Streams.Video;
using NvxEpi.Services.InputSwitching;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Routing;


#if SERIES4
using MockDisplay = PepperDash.Essentials.Devices.Common.Displays.MockDisplay;
#endif

namespace NvxEpi.Application.Entities
{
Expand Down Expand Up @@ -46,7 +52,7 @@ public NvxApplicationVideoReceiver(string key, NvxApplicationDeviceVideoConfig c
if (port == null)
throw new NullReferenceException("hdmi output routing port");
TieLineCollection.Default.Add(new TieLine(port, sink.HdmiIn1));
TieLineCollection.Default.Add(new TieLine(port, sink.InputPorts[RoutingPortNames.HdmiIn1]));
});

AddPostActivationAction(() =>
Expand Down
72 changes: 72 additions & 0 deletions src/NvxEpi/Application/Services/Amplifier.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;

using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.Routing;

namespace PepperDash.Essentials
{
public class Amplifier : EssentialsDevice, IRoutingSink
{
public event SourceInfoChangeHandler CurrentSourceChange;

public string CurrentSourceInfoKey { get; set; }
public SourceListItem CurrentSourceInfo
{
get
{
return _CurrentSourceInfo;
}
set
{
if (value == _CurrentSourceInfo) return;

var handler = CurrentSourceChange;

if (handler != null)
handler(_CurrentSourceInfo, ChangeType.WillChange);

_CurrentSourceInfo = value;

if (handler != null)
handler(_CurrentSourceInfo, ChangeType.DidChange);
}
}
SourceListItem _CurrentSourceInfo;

public RoutingInputPort AudioIn { get; private set; }

public Amplifier(string key, string name)
: base(key, name)
{
AudioIn = new RoutingInputPort(RoutingPortNames.AnyAudioIn, eRoutingSignalType.Audio,
eRoutingPortConnectionType.None, null, this);
InputPorts = new RoutingPortCollection<RoutingInputPort> { AudioIn };
}

#region IRoutingInputs Members

public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }

#endregion
}

public class AmplifierFactory : EssentialsDeviceFactory<Amplifier>
{
public AmplifierFactory()
{
TypeNames = new List<string>() { "amplifier" };
}

public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Amplifier Device");
return new Amplifier(dc.Key, dc.Name);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Routing;

#if SERIES4
using MockDisplay = PepperDash.Essentials.Devices.Common.Displays.MockDisplay;
#endif

namespace NvxEpi.Application.Services
{
public class ApplicationTieLineConnector
Expand All @@ -24,8 +28,11 @@ public static void AddTieLineForMockDisplay(MockDisplay dest, INvxDevice rx)
var outputPort = rx.OutputPorts[SwitcherForHdmiOutput.Key];
if (outputPort == null)
throw new ArgumentNullException("outputPort");

#if SERIES4
TieLineCollection.Default.Add(new TieLine(outputPort, dest.InputPorts[RoutingPortNames.HdmiIn1], eRoutingSignalType.AudioVideo));
#else
TieLineCollection.Default.Add(new TieLine(outputPort, dest.HdmiIn1, eRoutingSignalType.AudioVideo));
#endif
}
}
}
Loading

0 comments on commit f158eb8

Please sign in to comment.