Compare commits

..

24 Commits

Author SHA1 Message Date
Neil Dorin
9d7f5af26e Adds IBridgeAdvanced and updates to 1.0.35 of PepperDash.Core 2020-04-03 18:21:17 -06:00
Neil Dorin
3a101d89ea Adds some additional help 2020-04-03 18:01:08 -06:00
Neil Dorin
703695e768 Adds console method to print join maps at runtime. Adds overload of LinkToApi extension method for IBridge to allow passing the bridge in for JoinMapBaseAdvance applications 2020-04-03 09:25:48 -06:00
Neil Dorin
bb3897160b Adds a method to print the typenames to console 2020-04-01 15:57:51 -06:00
Neil Dorin
3b2ff5eed8 Merge branch 'feature/update-essentials-DM-project-name' into feature/updated-IDeviceFactory-for-plugin-implementation 2020-04-01 15:08:59 -06:00
Neil Dorin
9828e79668 Updates the name for Essentials_DM to PepperDash_Essentials_DM to ensure the .cplz name matches the .dll name 2020-04-01 15:08:24 -06:00
Neil Dorin
a231bb75a6 Adds back the correct PluginLoader version that supports loading with the new plugin methodology 2020-04-01 14:42:26 -06:00
Neil Dorin
fcc2a5db06 Updates to device factory methodology for use in plugins 2020-04-01 14:18:26 -06:00
Andrew Welker
f0010a7625 Merge pull request #84 from PepperDash/feature/ecs-1209
Feature/ecs 1209
2020-04-01 12:22:37 -06:00
Neil Dorin
294f2fd9ec Merge pull request #82 from PepperDash/bugfix/load-plugins-crash-with-no-plugins
adds missing paren that was causing build error; closes #80
2020-04-01 11:52:33 -06:00
Neil Dorin
4bf1da36e2 Moves PluginLoader to Essentials.Core. Moves IDeviceFactory and IPluginDeviceFactory interfaces to their own files in a better locatino 2020-04-01 11:32:24 -06:00
Neil Dorin
0facecc682 Merge branch 'feature/rework-plugin-loading-process-to-avoid-assembly-conflicts' into feature/ecs-1209
# Conflicts:
#	essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
2020-04-01 11:19:30 -06:00
Neil Dorin
ed627875a0 Updates remaining SIMPL Bridges for MC to JoinMapBaseAdvanced. Updates affected bridges 2020-04-01 11:16:27 -06:00
Neil Dorin
1d00261b1f Merge remote-tracking branch 'origin/bugfix/load-plugins-crash-with-no-plugins' into feature/ecs-1209 2020-04-01 08:55:12 -06:00
Neil Dorin
e52259e750 Updated SIMPLVtcJoinMap to new join scheme 2020-03-31 20:52:05 -06:00
Andrew Welker
661b3ef9f4 fixes script to add bugfix prefix 2020-03-31 11:12:16 -06:00
Andrew Welker
dc109b3e35 temporarily adding bugfix/* to get PR to close 2020-03-31 10:53:29 -06:00
Andrew Welker
e0ca3ac2be adds missing paren that was causing build error 2020-03-31 10:49:53 -06:00
Andrew Welker
aaf6d0a21a Merge pull request #81 from PepperDash/bugfix/load-plugins-crash-with-no-plugins
Added condition to check for _loadedPluginsDirectoryPath when loading plugins
2020-03-30 10:52:22 -06:00
Andrew Welker
1873cca375 updated new EssentialsDevice base class 2020-03-27 08:34:28 -06:00
Neil Dorin
a403a8b81f Attempt at modifying device factory mechanism 2020-03-26 16:10:54 -06:00
Neil Dorin
ca27e01f94 Merge remote-tracking branch 'origin/development' into feature/rework-plugin-loading-process-to-avoid-assembly-conflicts 2020-03-26 14:34:42 -06:00
Neil Dorin
50d5850097 Changes to instantiate the plugin loader class from the custom plugin 2020-03-26 14:10:50 -06:00
Neil Dorin
a2ca41d965 Adds back in the plugin interfaces. Modifies PluginLoader to try new inteface method for custom plugins first, then fail back to legacy method 2020-03-26 11:59:32 -06:00
34 changed files with 1410 additions and 1327 deletions

View File

@@ -39,6 +39,10 @@ switch -regex ($Env:GITHUB_REF) {
$phase = 'hotfix'
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
}
'^refs\/heads\/bugfix\/*.' {
$phase = 'hotfix'
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
}
}

View File

@@ -5,6 +5,7 @@ on:
branches:
- feature/*
- hotfix/*
- bugfix/*
- release/*
- development

View File

@@ -1,21 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", ".\PepperDashEssentials\PepperDashEssentials.csproj", "{1BED5BA9-88C4-4365-9362-6F4B128071D3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDashEssentials", "PepperDashEssentials\PepperDashEssentials.csproj", "{1BED5BA9-88C4-4365-9362-6F4B128071D3}"
ProjectSection(ProjectDependencies) = postProject
{892B761C-E479-44CE-BD74-243E9214AF13} = {892B761C-E479-44CE-BD74-243E9214AF13}
{9199CE8A-0C9F-4952-8672-3EED798B284F} = {9199CE8A-0C9F-4952-8672-3EED798B284F}
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", ".\essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_Core", "essentials-framework\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj", "{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", ".\essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials Devices Common", "essentials-framework\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj", "{892B761C-E479-44CE-BD74-243E9214AF13}"
ProjectSection(ProjectDependencies) = postProject
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials_DM", ".\essentials-framework\Essentials DM\Essentials_DM\Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PepperDash_Essentials_DM", "essentials-framework\Essentials DM\Essentials_DM\PepperDash_Essentials_DM.csproj", "{9199CE8A-0C9F-4952-8672-3EED798B284F}"
ProjectSection(ProjectDependencies) = postProject
{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} = {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}
EndProjectSection

View File

@@ -189,7 +189,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
// Pulse DTMF
AppServerController.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
{
var join = JoinMap.Joins[s];
var join = JoinMap.Joins[s];
if (join != null)
{
if (join.JoinNumber > 0)

View File

@@ -247,11 +247,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
{
EISC = eisc;
JoinMap = new SIMPLVtcJoinMap();
// TODO: Take in JoinStart value from config
JoinMap.OffsetJoinNumbers(701);
JoinMap = new SIMPLVtcJoinMap(701);
CurrentCallItem = new CodecActiveCallItem();
CurrentCallItem.Type = eCodecCallType.Video;
@@ -265,31 +261,31 @@ namespace PepperDash.Essentials.AppServer.Messengers
protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
{
var asc = appServerController;
EISC.SetStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.HookState), s =>
EISC.SetStringSigAction(JoinMap.HookState.JoinNumber, s =>
{
CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
PostFullStatus(); // SendCallsList();
});
EISC.SetStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CurrentCallNumber), s =>
EISC.SetStringSigAction(JoinMap.CurrentCallNumber.JoinNumber, s =>
{
CurrentCallItem.Number = s;
PostCallsList();
});
EISC.SetStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CurrentCallName), s =>
EISC.SetStringSigAction(JoinMap.CurrentCallName.JoinNumber, s =>
{
CurrentCallItem.Name = s;
PostCallsList();
});
EISC.SetStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CallDirection), s =>
EISC.SetStringSigAction(JoinMap.CallDirection.JoinNumber, s =>
{
CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
PostCallsList();
});
EISC.SetBoolSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.IncomingCall), b =>
EISC.SetBoolSigAction(JoinMap.IncomingCall.JoinNumber, b =>
{
if (b)
{
@@ -297,8 +293,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
{
Direction = eCodecCallDirection.Incoming,
Id = "-video-incoming",
Name = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.IncomingCallName)),
Number = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.IncomingCallNumber)),
Name = EISC.GetString(JoinMap.IncomingCallName.JoinNumber),
Number = EISC.GetString(JoinMap.IncomingCallNumber.JoinNumber),
Status = eCodecCallStatus.Ringing,
Type = eCodecCallType.Video
};
@@ -311,14 +307,14 @@ namespace PepperDash.Essentials.AppServer.Messengers
PostCallsList();
});
EISC.SetBoolSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraSupportsAutoMode), b =>
EISC.SetBoolSigAction(JoinMap.CameraSupportsAutoMode.JoinNumber, b =>
{
PostStatusMessage(new
{
cameraSupportsAutoMode = b
});
});
EISC.SetBoolSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraSupportsOffMode), b =>
EISC.SetBoolSigAction(JoinMap.CameraSupportsOffMode.JoinNumber, b =>
{
PostStatusMessage(new
{
@@ -327,78 +323,78 @@ namespace PepperDash.Essentials.AppServer.Messengers
});
// Directory insanity
EISC.SetUShortSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryRowCount), u =>
EISC.SetUShortSigAction(JoinMap.DirectoryRowCount.JoinNumber, u =>
{
// The length of the list comes in before the list does.
// Splice the sig change operation onto the last string sig that will be changing
// when the directory entries make it through.
if (PreviousDirectoryLength > 0)
{
EISC.ClearStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntriesStart) + PreviousDirectoryLength - 1);
EISC.ClearStringSigAction(JoinMap.DirectoryEntriesStart.JoinNumber + PreviousDirectoryLength - 1);
}
EISC.SetStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntriesStart) + u - 1, s => PostDirectory());
EISC.SetStringSigAction(JoinMap.DirectoryEntriesStart.JoinNumber + u - 1, s => PostDirectory());
PreviousDirectoryLength = u;
});
EISC.SetStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntrySelectedName), s =>
EISC.SetStringSigAction(JoinMap.DirectoryEntrySelectedName.JoinNumber, s =>
{
PostStatusMessage(new
{
directoryContactSelected = new
{
name = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntrySelectedName)),
name = EISC.GetString(JoinMap.DirectoryEntrySelectedName.JoinNumber),
}
});
});
EISC.SetStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntrySelectedNumber), s =>
EISC.SetStringSigAction(JoinMap.DirectoryEntrySelectedNumber.JoinNumber, s =>
{
PostStatusMessage(new
{
directoryContactSelected = new
{
number = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntrySelectedNumber)),
number = EISC.GetString(JoinMap.DirectoryEntrySelectedNumber.JoinNumber),
}
});
});
EISC.SetStringSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectorySelectedFolderName), s => PostStatusMessage(new
EISC.SetStringSigAction(JoinMap.DirectorySelectedFolderName.JoinNumber, s => PostStatusMessage(new
{
directorySelectedFolderName = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectorySelectedFolderName))
directorySelectedFolderName = EISC.GetString(JoinMap.DirectorySelectedFolderName.JoinNumber)
}));
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraModeAuto), () => PostCameraMode());
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraModeManual), () => PostCameraMode());
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraModeOff), () => PostCameraMode());
EISC.SetSigTrueAction(JoinMap.CameraModeAuto.JoinNumber, () => PostCameraMode());
EISC.SetSigTrueAction(JoinMap.CameraModeManual.JoinNumber, () => PostCameraMode());
EISC.SetSigTrueAction(JoinMap.CameraModeOff.JoinNumber, () => PostCameraMode());
EISC.SetBoolSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraSelfView), b => PostStatusMessage(new
EISC.SetBoolSigAction(JoinMap.CameraSelfView.JoinNumber, b => PostStatusMessage(new
{
cameraSelfView = b
}));
EISC.SetUShortSigAction(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraNumberSelect), (u) => PostSelectedCamera());
EISC.SetUShortSigAction(JoinMap.CameraNumberSelect.JoinNumber, (u) => PostSelectedCamera());
// Add press and holds using helper action
Action<string, uint> addPHAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
addPHAction("/cameraUp", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraTiltUp));
addPHAction("/cameraDown", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraTiltDown));
addPHAction("/cameraLeft", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraPanLeft));
addPHAction("/cameraRight", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraPanRight));
addPHAction("/cameraZoomIn", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraZoomIn));
addPHAction("/cameraZoomOut", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraZoomOut));
addPHAction("/cameraUp", JoinMap.CameraTiltUp.JoinNumber);
addPHAction("/cameraDown", JoinMap.CameraTiltDown.JoinNumber);
addPHAction("/cameraLeft", JoinMap.CameraPanLeft.JoinNumber);
addPHAction("/cameraRight", JoinMap.CameraPanRight.JoinNumber);
addPHAction("/cameraZoomIn", JoinMap.CameraZoomIn.JoinNumber);
addPHAction("/cameraZoomOut", JoinMap.CameraZoomOut.JoinNumber);
// Add straight pulse calls using helper action
Action<string, uint> addAction = (s, u) =>
AppServerController.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
addAction("/endCallById", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.EndCall));
addAction("/endAllCalls", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.EndCall));
addAction("/acceptById", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.IncomingAnswer));
addAction("/rejectById", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.IncomingReject));
addAction("/endCallById", JoinMap.EndCall.JoinNumber);
addAction("/endAllCalls", JoinMap.EndCall.JoinNumber);
addAction("/acceptById", JoinMap.IncomingAnswer.JoinNumber);
addAction("/rejectById", JoinMap.IncomingReject.JoinNumber);
var speeddialStart = JoinMap.GetJoinForKey(SIMPLVtcJoinMap.SpeedDialStart);
var speeddialEnd = JoinMap.GetJoinForKey(SIMPLVtcJoinMap.SpeedDialStart) + JoinMap.GetJoinSpanForKey(SIMPLVtcJoinMap.SpeedDialStart);
var speeddialStart = JoinMap.SpeedDialStart.JoinNumber;
var speeddialEnd = JoinMap.SpeedDialStart.JoinNumber + JoinMap.SpeedDialStart.JoinSpan;
var speedDialIndex = 1;
for (uint i = speeddialStart; i < speeddialEnd; i++)
@@ -407,18 +403,18 @@ namespace PepperDash.Essentials.AppServer.Messengers
speedDialIndex++;
}
addAction("/cameraModeAuto", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraModeAuto));
addAction("/cameraModeManual", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraModeManual));
addAction("/cameraModeOff", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraModeOff));
addAction("/cameraSelfView", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraSelfView));
addAction("/cameraLayout", JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraLayout));
addAction("/cameraModeAuto", JoinMap.CameraModeAuto.JoinNumber);
addAction("/cameraModeManual", JoinMap.CameraModeManual.JoinNumber);
addAction("/cameraModeOff", JoinMap.CameraModeOff.JoinNumber);
addAction("/cameraSelfView", JoinMap.CameraSelfView.JoinNumber);
addAction("/cameraLayout", JoinMap.CameraLayout.JoinNumber);
asc.AddAction("/cameraSelect", new Action<string>(SelectCamera));
// camera presets
for(uint i = 0; i < 6; i++)
{
addAction("/cameraPreset" + (i + 1), JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraPresetStart) + i);
addAction("/cameraPreset" + (i + 1), JoinMap.CameraPresetStart.JoinNumber + i);
}
asc.AddAction(MessagePath + "/isReady", new Action(PostIsReady));
@@ -426,28 +422,31 @@ namespace PepperDash.Essentials.AppServer.Messengers
asc.AddAction(MessagePath + "/fullStatus", new Action(PostFullStatus));
// Dial on string
asc.AddAction(MessagePath + "/dial", new Action<string>(s =>
EISC.SetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CurrentDialString), s)));
EISC.SetString(JoinMap.CurrentDialString.JoinNumber, s)));
// Pulse DTMF
AppServerController.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
{
var join = JoinMap.GetJoinForKey(s);
if (join > 0)
var join = JoinMap.Joins[s];
if (join != null)
{
EISC.PulseBool(join, 100);
if (join.JoinNumber > 0)
{
EISC.PulseBool(join.JoinNumber, 100);
}
}
}));
// Directory madness
asc.AddAction(MessagePath + "/directoryRoot", new Action(() => EISC.PulseBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryRoot))));
asc.AddAction(MessagePath + "/directoryBack", new Action(() => EISC.PulseBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryFolderBack))));
asc.AddAction(MessagePath + "/directoryRoot", new Action(() => EISC.PulseBool(JoinMap.DirectoryRoot.JoinNumber)));
asc.AddAction(MessagePath + "/directoryBack", new Action(() => EISC.PulseBool(JoinMap.DirectoryFolderBack.JoinNumber)));
asc.AddAction(MessagePath + "/directoryById", new Action<string>(s =>
{
// the id should contain the line number to forward to simpl
try
{
var u = ushort.Parse(s);
EISC.SetUshort(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectorySelectRow), u);
EISC.PulseBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryLineSelected));
EISC.SetUshort(JoinMap.DirectorySelectRow.JoinNumber, u);
EISC.PulseBool(JoinMap.DirectoryLineSelected.JoinNumber);
}
catch (Exception)
{
@@ -461,8 +460,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
try
{
var u = ushort.Parse(s);
EISC.SetUshort(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectorySelectRow), u);
EISC.PulseBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryLineSelected));
EISC.SetUshort(JoinMap.DirectorySelectRow.JoinNumber, u);
EISC.PulseBool(JoinMap.DirectoryLineSelected.JoinNumber);
}
catch
{
@@ -470,17 +469,17 @@ namespace PepperDash.Essentials.AppServer.Messengers
}
}));
asc.AddAction(MessagePath + "/directoryDialContact", new Action(() => {
EISC.PulseBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryDialSelectedLine));
EISC.PulseBool(JoinMap.DirectoryDialSelectedLine.JoinNumber);
}));
asc.AddAction(MessagePath + "/getDirectory", new Action(() =>
{
if (EISC.GetUshort(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryRowCount)) > 0)
if (EISC.GetUshort(JoinMap.DirectoryRowCount.JoinNumber) > 0)
{
PostDirectory();
}
else
{
EISC.PulseBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryRoot));
EISC.PulseBool(JoinMap.DirectoryRoot.JoinNumber);
}
}));
}
@@ -494,18 +493,18 @@ namespace PepperDash.Essentials.AppServer.Messengers
{
calls = GetCurrentCallList(),
cameraMode = GetCameraMode(),
cameraSelfView = EISC.GetBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraSelfView)),
cameraSupportsAutoMode = EISC.GetBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraSupportsAutoMode)),
cameraSupportsOffMode = EISC.GetBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraSupportsOffMode)),
currentCallString = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CurrentCallNumber)),
currentDialString = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CurrentDialString)),
cameraSelfView = EISC.GetBool(JoinMap.CameraSelfView.JoinNumber),
cameraSupportsAutoMode = EISC.GetBool(JoinMap.CameraSupportsAutoMode.JoinNumber),
cameraSupportsOffMode = EISC.GetBool(JoinMap.CameraSupportsOffMode.JoinNumber),
currentCallString = EISC.GetString(JoinMap.CurrentCallNumber.JoinNumber),
currentDialString = EISC.GetString(JoinMap.CurrentDialString.JoinNumber),
directoryContactSelected = new
{
name = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntrySelectedName)),
number = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntrySelectedNumber))
name = EISC.GetString(JoinMap.DirectoryEntrySelectedName.JoinNumber),
number = EISC.GetString(JoinMap.DirectoryEntrySelectedNumber.JoinNumber)
},
directorySelectedFolderName = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectorySelectedFolderName)),
isInCall = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.HookState)) == "Connected",
directorySelectedFolderName = EISC.GetString(JoinMap.DirectorySelectedFolderName.JoinNumber),
isInCall = EISC.GetString(JoinMap.HookState.JoinNumber) == "Connected",
hasDirectory = true,
hasDirectorySearch = false,
hasRecents = !EISC.BooleanOutput[502].BoolValue,
@@ -520,11 +519,11 @@ namespace PepperDash.Essentials.AppServer.Messengers
/// </summary>
void PostDirectory()
{
var u = EISC.GetUshort(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryRowCount));
var u = EISC.GetUshort(JoinMap.DirectoryRowCount.JoinNumber);
var items = new List<object>();
for (uint i = 0; i < u; i++)
{
var name = EISC.GetString(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryEntriesStart) + i);
var name = EISC.GetString(JoinMap.DirectoryEntriesStart.JoinNumber + i);
var id = (i + 1).ToString();
// is folder or contact?
if (name.StartsWith("[+]"))
@@ -549,7 +548,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
{
currentDirectory = new
{
isRootDirectory = EISC.GetBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.DirectoryIsRoot)),
isRootDirectory = EISC.GetBool(JoinMap.DirectoryIsRoot.JoinNumber),
directoryResults = items
}
};
@@ -574,8 +573,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
string GetCameraMode()
{
string m;
if (EISC.GetBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraModeAuto))) m = eCameraControlMode.Auto.ToString().ToLower();
else if (EISC.GetBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraModeManual))) m = eCameraControlMode.Manual.ToString().ToLower();
if (EISC.GetBool(JoinMap.CameraModeAuto.JoinNumber)) m = eCameraControlMode.Auto.ToString().ToLower();
else if (EISC.GetBool(JoinMap.CameraModeManual.JoinNumber)) m = eCameraControlMode.Manual.ToString().ToLower();
else m = eCameraControlMode.Off.ToString().ToLower();
return m;
}
@@ -593,7 +592,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
/// </summary>
string GetSelectedCamera()
{
var num = EISC.GetUshort(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraNumberSelect));
var num = EISC.GetUshort(JoinMap.CameraNumberSelect.JoinNumber);
string m;
if (num == 100)
{
@@ -637,11 +636,11 @@ namespace PepperDash.Essentials.AppServer.Messengers
var cam = s.Substring(6);
if (cam.ToLower() == "far")
{
EISC.SetUshort(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraNumberSelect), 100);
EISC.SetUshort(JoinMap.CameraNumberSelect.JoinNumber, 100);
}
else
{
EISC.SetUshort(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.CameraNumberSelect), UInt16.Parse(cam));
EISC.SetUshort(JoinMap.CameraNumberSelect.JoinNumber, UInt16.Parse(cam));
}
}
@@ -656,7 +655,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
{
list.Add(CurrentCallItem);
}
if (EISC.GetBool(JoinMap.GetJoinForKey(SIMPLVtcJoinMap.IncomingCall))) {
if (EISC.GetBool(JoinMap.IncomingCall.JoinNumber))
{
}
return list;

View File

@@ -38,7 +38,7 @@ namespace PepperDash.Essentials.Room.MobileControl
public override string RoomName
{
get {
var name = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigRoomName)].StringValue;
var name = EISC.StringOutput[JoinMap.ConfigRoomName.JoinNumber].StringValue;
return string.IsNullOrEmpty(name) ? "Not Loaded" : name;
}
}
@@ -65,10 +65,7 @@ namespace PepperDash.Essentials.Room.MobileControl
if (reg != Crestron.SimplSharpPro.eDeviceRegistrationUnRegistrationResponse.Success)
Debug.Console(0, this, "Cannot connect EISC at IPID {0}: \r{1}", ipId, reg);
JoinMap = new MobileControlSIMPLRoomJoinMap();
// TODO: Possibly set up alternate constructor or take in joinMapKey and joinStart properties in constructor
JoinMap.OffsetJoinNumbers(1);
JoinMap = new MobileControlSIMPLRoomJoinMap(1);
SourceBridge = new MobileControlDdvc01DeviceBridge(key + "-sourceBridge", "DDVC01 source bridge", EISC);
DeviceManager.AddDevice(SourceBridge);
@@ -105,19 +102,19 @@ namespace PepperDash.Essentials.Room.MobileControl
EISC.OnlineStatusChange += (o, a) =>
{
Debug.Console(1, this, "DDVC EISC online={0}. Config is ready={1}. Use Essentials Config={2}",
a.DeviceOnLine, EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigIsReady)].BoolValue, EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigIsLocal)].BoolValue);
a.DeviceOnLine, EISC.BooleanOutput[JoinMap.ConfigIsReady.JoinNumber].BoolValue, EISC.BooleanOutput[JoinMap.ConfigIsLocal.JoinNumber].BoolValue);
if (a.DeviceOnLine && EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigIsReady)].BoolValue)
if (a.DeviceOnLine && EISC.BooleanOutput[JoinMap.ConfigIsReady.JoinNumber].BoolValue)
LoadConfigValues();
if (a.DeviceOnLine && EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigIsLocal)].BoolValue)
if (a.DeviceOnLine && EISC.BooleanOutput[JoinMap.ConfigIsLocal.JoinNumber].BoolValue)
UseEssentialsConfig();
};
// load config if it's already there
if (EISC.IsOnline && EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigIsReady)].BoolValue) // || EISC.BooleanInput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigIsReady].BoolValue)
if (EISC.IsOnline && EISC.BooleanOutput[JoinMap.ConfigIsReady.JoinNumber].BoolValue) // || EISC.BooleanInput[JoinMap.ConfigIsReady].BoolValue)
LoadConfigValues();
if (EISC.IsOnline && EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigIsLocal)].BoolValue)
if (EISC.IsOnline && EISC.BooleanOutput[JoinMap.ConfigIsLocal.JoinNumber].BoolValue)
{
UseEssentialsConfig();
}
@@ -169,36 +166,36 @@ namespace PepperDash.Essentials.Room.MobileControl
/// </summary>
void SetupFunctions()
{
Parent.AddAction(@"/room/room1/promptForCode", new Action(() => EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.PromptForCode))));
Parent.AddAction(@"/room/room1/clientJoined", new Action(() => EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ClientJoined))));
Parent.AddAction(@"/room/room1/promptForCode", new Action(() => EISC.PulseBool(JoinMap.PromptForCode.JoinNumber)));
Parent.AddAction(@"/room/room1/clientJoined", new Action(() => EISC.PulseBool(JoinMap.ClientJoined.JoinNumber)));
Parent.AddAction(@"/room/room1/status", new Action(SendFullStatus));
Parent.AddAction(@"/room/room1/source", new Action<SourceSelectMessageContent>(c =>
{
EISC.SetString(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SelectedSourceKey), c.SourceListItem);
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SourceHasChanged));
EISC.SetString(JoinMap.CurrentSourceKey.JoinNumber, c.SourceListItem);
EISC.PulseBool(JoinMap.SourceHasChanged.JoinNumber);
}));
Parent.AddAction(@"/room/room1/defaultsource", new Action(() =>
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityShare))));
EISC.PulseBool(JoinMap.ActivityShare.JoinNumber)));
Parent.AddAction(@"/room/room1/activityPhone", new Action(() =>
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityPhoneCall))));
EISC.PulseBool(JoinMap.ActivityPhoneCall.JoinNumber)));
Parent.AddAction(@"/room/room1/activityVideo", new Action(() =>
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityVideoCall))));
EISC.PulseBool(JoinMap.ActivityVideoCall.JoinNumber)));
Parent.AddAction(@"/room/room1/volumes/master/level", new Action<ushort>(u =>
EISC.SetUshort(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.MasterVolume), u)));
EISC.SetUshort(JoinMap.MasterVolume.JoinNumber, u)));
Parent.AddAction(@"/room/room1/volumes/master/muteToggle", new Action(() =>
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.MasterVolume))));
EISC.PulseBool(JoinMap.MasterVolume.JoinNumber)));
Parent.AddAction(@"/room/room1/volumes/master/privacyMuteToggle", new Action(() =>
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.PrivacyMute))));
EISC.PulseBool(JoinMap.PrivacyMute.JoinNumber)));
// /xyzxyz/volumes/master/muteToggle ---> BoolInput[1]
var volumeStart = JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart);
var volumeEnd = JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart) + JoinMap.GetJoinSpanForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart);
var volumeStart = JoinMap.VolumeJoinStart.JoinNumber;
var volumeEnd = JoinMap.VolumeJoinStart.JoinNumber + JoinMap.VolumeJoinStart.JoinSpan;
for (uint i = volumeStart; i <= volumeEnd; i++)
{
@@ -210,11 +207,11 @@ namespace PepperDash.Essentials.Room.MobileControl
}
Parent.AddAction(@"/room/room1/shutdownStart", new Action(() =>
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ShutdownStart))));
EISC.PulseBool(JoinMap.ShutdownStart.JoinNumber)));
Parent.AddAction(@"/room/room1/shutdownEnd", new Action(() =>
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ShutdownEnd))));
EISC.PulseBool(JoinMap.ShutdownEnd.JoinNumber)));
Parent.AddAction(@"/room/room1/shutdownCancel", new Action(() =>
EISC.PulseBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ShutdownCancel))));
EISC.PulseBool(JoinMap.ShutdownCancel.JoinNumber)));
}
@@ -244,21 +241,21 @@ namespace PepperDash.Essentials.Room.MobileControl
void SetupFeedbacks()
{
// Power
EISC.SetBoolSigAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.RoomIsOn), b =>
EISC.SetBoolSigAction(JoinMap.RoomIsOn.JoinNumber, b =>
PostStatusMessage(new
{
isOn = b
}));
// Source change things
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SourceHasChanged), () =>
EISC.SetSigTrueAction(JoinMap.SourceHasChanged.JoinNumber, () =>
PostStatusMessage(new
{
selectedSourceKey = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SelectedSourceKey)].StringValue
selectedSourceKey = EISC.StringOutput[JoinMap.CurrentSourceKey.JoinNumber].StringValue
}));
// Volume things
EISC.SetUShortSigAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.MasterVolume), u =>
EISC.SetUShortSigAction(JoinMap.MasterVolume.JoinNumber, u =>
PostStatusMessage(new
{
volumes = new
@@ -273,7 +270,7 @@ namespace PepperDash.Essentials.Room.MobileControl
// map MasterVolumeIsMuted join -> status/volumes/master/muted
//
EISC.SetBoolSigAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.MasterVolume), b =>
EISC.SetBoolSigAction(JoinMap.MasterVolume.JoinNumber, b =>
PostStatusMessage(new
{
volumes = new
@@ -284,7 +281,7 @@ namespace PepperDash.Essentials.Room.MobileControl
}
}
}));
EISC.SetBoolSigAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.PrivacyMute), b =>
EISC.SetBoolSigAction(JoinMap.PrivacyMute.JoinNumber, b =>
PostStatusMessage(new
{
volumes = new
@@ -296,8 +293,8 @@ namespace PepperDash.Essentials.Room.MobileControl
}
}));
var volumeStart = JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart);
var volumeEnd = JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart) + JoinMap.GetJoinSpanForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart);
var volumeStart = JoinMap.VolumeJoinStart.JoinNumber;
var volumeEnd = JoinMap.VolumeJoinStart.JoinNumber + JoinMap.VolumeJoinStart.JoinSpan;
for (uint i = volumeStart; i <= volumeEnd; i++)
{
@@ -330,7 +327,7 @@ namespace PepperDash.Essentials.Room.MobileControl
});
}
EISC.SetUShortSigAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.NumberOfAuxFaders), u =>
EISC.SetUShortSigAction(JoinMap.NumberOfAuxFaders.JoinNumber, u =>
PostStatusMessage(new {
volumes = new {
numberOfAuxFaders = u,
@@ -338,30 +335,30 @@ namespace PepperDash.Essentials.Room.MobileControl
}));
// shutdown things
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ShutdownCancel), new Action(() =>
EISC.SetSigTrueAction(JoinMap.ShutdownCancel.JoinNumber, new Action(() =>
PostMessage("/room/shutdown/", new
{
state = "wasCancelled"
})));
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ShutdownEnd), new Action(() =>
EISC.SetSigTrueAction(JoinMap.ShutdownEnd.JoinNumber, new Action(() =>
PostMessage("/room/shutdown/", new
{
state = "hasFinished"
})));
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ShutdownStart), new Action(() =>
EISC.SetSigTrueAction(JoinMap.ShutdownStart.JoinNumber, new Action(() =>
PostMessage("/room/shutdown/", new
{
state = "hasStarted",
duration = EISC.UShortOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ShutdownPromptDuration)].UShortValue
duration = EISC.UShortOutput[JoinMap.ShutdownPromptDuration.JoinNumber].UShortValue
})));
// Config things
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigIsReady), LoadConfigValues);
EISC.SetSigTrueAction(JoinMap.ConfigIsReady.JoinNumber, LoadConfigValues);
// Activity modes
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityShare), () => UpdateActivity(1));
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityPhoneCall), () => UpdateActivity(2));
EISC.SetSigTrueAction(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityVideoCall), () => UpdateActivity(3));
EISC.SetSigTrueAction(JoinMap.ActivityShare.JoinNumber, () => UpdateActivity(1));
EISC.SetSigTrueAction(JoinMap.ActivityPhoneCall.JoinNumber, () => UpdateActivity(2));
EISC.SetSigTrueAction(JoinMap.ActivityVideoCall.JoinNumber, () => UpdateActivity(3));
}
@@ -405,7 +402,7 @@ namespace PepperDash.Essentials.Room.MobileControl
Debug.Console(0, this, "Replacing Room[0] in config");
co.Rooms[0] = rm;
}
rm.Name = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigRoomName)].StringValue;
rm.Name = EISC.StringOutput[JoinMap.ConfigRoomName.JoinNumber].StringValue;
rm.Key = "room1";
rm.Type = "ddvc01";
@@ -416,13 +413,13 @@ namespace PepperDash.Essentials.Room.MobileControl
rmProps = JsonConvert.DeserializeObject<DDVC01RoomPropertiesConfig>(rm.Properties.ToString());
rmProps.Help = new EssentialsHelpPropertiesConfig();
rmProps.Help.CallButtonText = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigHelpNumber)].StringValue;
rmProps.Help.Message = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigHelpMessage)].StringValue;
rmProps.Help.CallButtonText = EISC.StringOutput[JoinMap.ConfigHelpNumber.JoinNumber].StringValue;
rmProps.Help.Message = EISC.StringOutput[JoinMap.ConfigHelpMessage.JoinNumber].StringValue;
rmProps.Environment = new EssentialsEnvironmentPropertiesConfig(); // enabled defaults to false
rmProps.RoomPhoneNumber = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigRoomPhoneNumber)].StringValue;
rmProps.RoomURI = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ConfigRoomURI)].StringValue;
rmProps.RoomPhoneNumber = EISC.StringOutput[JoinMap.ConfigRoomPhoneNumber.JoinNumber].StringValue;
rmProps.RoomURI = EISC.StringOutput[JoinMap.ConfigRoomURI.JoinNumber].StringValue;
rmProps.SpeedDials = new List<DDVC01SpeedDial>();
// This MAY need a check
@@ -430,7 +427,7 @@ namespace PepperDash.Essentials.Room.MobileControl
rmProps.VideoCodecKey = "videoCodec";
// volume control names
var volCount = EISC.UShortOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.NumberOfAuxFaders)].UShortValue;
var volCount = EISC.UShortOutput[JoinMap.NumberOfAuxFaders.JoinNumber].UShortValue;
//// use Volumes object or?
//rmProps.VolumeSliderNames = new List<string>();
@@ -475,18 +472,18 @@ namespace PepperDash.Essentials.Room.MobileControl
// add sources...
for (uint i = 0; i <= 19; i++)
{
var name = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SourceNameJoinStart) + i].StringValue;
if (EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.UseSourceEnabled)].BoolValue
&& !EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SourceIsEnabledJoinStart) + i].BoolValue)
var name = EISC.StringOutput[JoinMap.SourceNameJoinStart.JoinNumber + i].StringValue;
if (EISC.BooleanOutput[JoinMap.UseSourceEnabled.JoinNumber].BoolValue
&& !EISC.BooleanOutput[JoinMap.SourceIsEnabledJoinStart.JoinNumber + i].BoolValue)
{
continue;
}
else if(!EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.UseSourceEnabled)].BoolValue && string.IsNullOrEmpty(name))
else if(!EISC.BooleanOutput[JoinMap.UseSourceEnabled.JoinNumber].BoolValue && string.IsNullOrEmpty(name))
break;
var icon = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SourceIconJoinStart) + i].StringValue;
var key = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SourceKeyJoinStart) + i].StringValue;
var type = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SourceTypeJoinStart) + i].StringValue;
var disableShare = EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SourceShareDisableJoinStart) + i].BoolValue;
var icon = EISC.StringOutput[JoinMap.SourceIconJoinStart.JoinNumber + i].StringValue;
var key = EISC.StringOutput[JoinMap.SourceKeyJoinStart.JoinNumber + i].StringValue;
var type = EISC.StringOutput[JoinMap.SourceTypeJoinStart.JoinNumber + i].StringValue;
var disableShare = EISC.BooleanOutput[JoinMap.SourceShareDisableJoinStart.JoinNumber + i].BoolValue;
Debug.Console(0, this, "Adding source {0} '{1}'", key, name);
var newSLI = new SourceListItem{
@@ -528,14 +525,14 @@ namespace PepperDash.Essentials.Room.MobileControl
var acFavs = new List<PepperDash.Essentials.Devices.Common.Codec.CodecActiveCallItem>();
for (uint i = 0; i < 4; i++)
{
if (!EISC.GetBool(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SpeedDialVisibleStartJoin) + i))
if (!EISC.GetBool(JoinMap.SpeedDialVisibleStartJoin.JoinNumber + i))
{
break;
}
acFavs.Add(new PepperDash.Essentials.Devices.Common.Codec.CodecActiveCallItem()
{
Name = EISC.GetString(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SpeedDialNameStartJoin) + i),
Number = EISC.GetString(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SpeedDialNumberStartJoin) + i),
Name = EISC.GetString(JoinMap.SpeedDialNameStartJoin.JoinNumber + i),
Number = EISC.GetString(JoinMap.SpeedDialNumberStartJoin.JoinNumber + i),
Type = PepperDash.Essentials.Devices.Common.Codec.eCodecCallType.Audio
});
}
@@ -567,7 +564,7 @@ namespace PepperDash.Essentials.Room.MobileControl
var camsProps = new List<object>();
for (uint i = 0; i < 9; i++)
{
var name = EISC.GetString(i + JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.CameraNearNameStart));
var name = EISC.GetString(i + JoinMap.CameraNearNameStart.JoinNumber);
if (!string.IsNullOrEmpty(name))
{
camsProps.Add(new
@@ -577,7 +574,7 @@ namespace PepperDash.Essentials.Room.MobileControl
});
}
}
var farName = EISC.GetString(JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.CameraFarName));
var farName = EISC.GetString(JoinMap.CameraFarName.JoinNumber);
if (!string.IsNullOrEmpty(farName))
{
camsProps.Add(new
@@ -685,7 +682,7 @@ namespace PepperDash.Essentials.Room.MobileControl
{
if (ConfigIsLoaded)
{
var count = EISC.UShortOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.NumberOfAuxFaders)].UShortValue;
var count = EISC.UShortOutput[JoinMap.NumberOfAuxFaders.JoinNumber].UShortValue;
Debug.Console(1, this, "The Fader Count is : {0}", count);
@@ -694,8 +691,8 @@ namespace PepperDash.Essentials.Room.MobileControl
// Create auxFaders
var auxFaderDict = new Dictionary<string, Volume>();
var volumeStart = JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart);
var volumeEnd = JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart) + JoinMap.GetJoinSpanForKey(MobileControlSIMPLRoomJoinMap.VolumeJoinStart);
var volumeStart = JoinMap.VolumeJoinStart.JoinNumber;
var volumeEnd = JoinMap.VolumeJoinStart.JoinNumber + JoinMap.VolumeJoinStart.JoinSpan;
for (uint i = volumeStart; i <= count; i++)
{
@@ -711,22 +708,22 @@ namespace PepperDash.Essentials.Room.MobileControl
var volumes = new Volumes();
volumes.Master = new Volume("master",
EISC.UShortOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.MasterVolume)].UShortValue,
EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.MasterVolume)].BoolValue,
EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.MasterVolume)].StringValue,
EISC.UShortOutput[JoinMap.MasterVolume.JoinNumber].UShortValue,
EISC.BooleanOutput[JoinMap.MasterVolume.JoinNumber].BoolValue,
EISC.StringOutput[JoinMap.MasterVolume.JoinNumber].StringValue,
true,
"something.png");
volumes.Master.HasPrivacyMute = true;
volumes.Master.PrivacyMuted = EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.PrivacyMute)].BoolValue;
volumes.Master.PrivacyMuted = EISC.BooleanOutput[JoinMap.PrivacyMute.JoinNumber].BoolValue;
volumes.AuxFaders = auxFaderDict;
volumes.NumberOfAuxFaders = EISC.UShortInput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.NumberOfAuxFaders)].UShortValue;
volumes.NumberOfAuxFaders = EISC.UShortInput[JoinMap.NumberOfAuxFaders.JoinNumber].UShortValue;
PostStatusMessage(new
{
activityMode = GetActivityMode(),
isOn = EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.RoomIsOn)].BoolValue,
selectedSourceKey = EISC.StringOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.SelectedSourceKey)].StringValue,
isOn = EISC.BooleanOutput[JoinMap.RoomIsOn.JoinNumber].BoolValue,
selectedSourceKey = EISC.StringOutput[JoinMap.CurrentSourceKey.JoinNumber].StringValue,
volumes = volumes
});
}
@@ -745,9 +742,9 @@ namespace PepperDash.Essentials.Room.MobileControl
/// <returns></returns>
int GetActivityMode()
{
if (EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityPhoneCall)].BoolValue) return 2;
else if (EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityShare)].BoolValue) return 1;
else if (EISC.BooleanOutput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ActivityVideoCall)].BoolValue) return 3;
if (EISC.BooleanOutput[JoinMap.ActivityPhoneCall.JoinNumber].BoolValue) return 2;
else if (EISC.BooleanOutput[JoinMap.ActivityShare.JoinNumber].BoolValue) return 1;
else if (EISC.BooleanOutput[JoinMap.ActivityVideoCall.JoinNumber].BoolValue) return 3;
return 0;
}
@@ -824,8 +821,8 @@ namespace PepperDash.Essentials.Room.MobileControl
protected override void UserCodeChange()
{
Debug.Console(1, this, "Server user code changed: {0}", UserCode);
EISC.StringInput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.UserCodeToSystem)].StringValue = UserCode;
EISC.StringInput[JoinMap.GetJoinForKey(MobileControlSIMPLRoomJoinMap.ServerUrl)].StringValue = Parent.Config.ClientAppUrl;
EISC.StringInput[JoinMap.UserCodeToSystem.JoinNumber].StringValue = UserCode;
EISC.StringInput[JoinMap.ServerUrl.JoinNumber].StringValue = Parent.Config.ClientAppUrl;
}
}
}

View File

@@ -9,120 +9,107 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.AppServer
{
public class MobileControlSIMPLRoomJoinMap : JoinMapBase
public class MobileControlSIMPLRoomJoinMap : JoinMapBaseAdvanced
{
public const string ConfigIsLocal = "ConfigIsLocal";
public const string RoomIsOn = "RoomIsOn";
public const string PrivacyMute = "PrivacyMute";
public const string PromptForCode = "PromptForCode";
public const string ClientJoined = "ClientJoined";
public const string ActivityShare = "ActivityShare";
public const string ActivityPhoneCall = "ActivityPhoneCall";
public const string ActivityVideoCall = "ActivityVideoCall";
public const string MasterVolume = "MasterVolumeMute";
public const string VolumeJoinStart = "VolumeMutesJoinStart";
public const string ShutdownCancel = "ShutdownCancel";
public const string ShutdownEnd = "ShutdownEnd";
public const string ShutdownStart = "ShutdownStart";
public const string SourceHasChanged = "SourceHasChanged";
public const string SpeedDialVisibleStartJoin = "SpeedDialVisibleStartJoin";
public const string ConfigIsReady = "ConfigIsReady";
public const string HideVideoConfRecents = "HideVideoConfRecents";
public const string ShowCameraWhenNotInCall = "ShowCameraWhenNotInCall";
public const string UseSourceEnabled = "UseSourceEnabled";
public const string SourceShareDisableJoinStart = "SourceShareDisableJoinStart";
public const string SourceIsEnabledJoinStart = "SourceIsEnabledJoinStart";
[JoinName("MasterVolume")]
public JoinDataComplete MasterVolume = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() {Label = "Master Volume Mute Toggle/FB/Level/Label", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalogSerial });
[JoinName("VolumeJoinStart")]
public JoinDataComplete VolumeJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 8 }, new JoinMetadata() {Label = "Volume Mute Toggle/FB/Level/Label", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalogSerial });
//public const string MasterVolumeLevel = "MasterVolumeLevel";
public const string VolumeSlidersJoinStart = "VolumeSlidersJoinStart";
public const string ShutdownPromptDuration = "ShutdownPromptDuration";
public const string NumberOfAuxFaders = "NumberOfAuxFaders";
[JoinName("PrivacyMute")]
public JoinDataComplete PrivacyMute = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 }, new JoinMetadata() { Label = "Privacy Mute Toggle/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
public const string VolumeSliderNamesJoinStart = "VolumeSliderNamesJoinStart";
public const string SelectedSourceKey = "SelectedSourceKey";
public const string SpeedDialNameStartJoin = "SpeedDialNameStartJoin";
public const string SpeedDialNumberStartJoin = "SpeedDialNumberStartJoin";
public const string ConfigRoomName = "ConfigRoomName";
public const string ConfigHelpMessage = "ConfigHelpMessage";
public const string ConfigHelpNumber = "ConfigHelpNumber";
public const string ConfigRoomPhoneNumber = "ConfigRoomPhoneNumber";
public const string ConfigRoomURI = "ConfigRoomURI";
public const string UserCodeToSystem = "UserCodeToSystem";
public const string ServerUrl = "ServerUrl";
public const string RoomSpeedDialNamesJoinStart = "RoomSpeedDialNamesJoinStart";
public const string RoomSpeedDialNumberssJoinStart = "RoomSpeedDialNumberssJoinStart";
public const string SourceNameJoinStart = "SourceNameJoinStart";
public const string SourceIconJoinStart = "SourceIconJoinStart";
public const string SourceKeyJoinStart = "SourceKeyJoinStart";
public const string SourceTypeJoinStart = "SourceTypeJoinStart";
public const string CameraNearNameStart = "CameraNearNameStart";
public const string CameraFarName = "CameraFarName";
[JoinName("PromptForCode")]
public JoinDataComplete PromptForCode = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 1 }, new JoinMetadata() {Label = "Prompt User for Code", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("ClientJoined")]
public JoinDataComplete ClientJoined = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 1 }, new JoinMetadata() { Label = "Client Joined", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("ActivityShare")]
public JoinDataComplete ActivityShare = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() {Label = "Activity Share", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ActivityPhoneCall")]
public JoinDataComplete ActivityPhoneCall = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Activity Phone Call", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ActivityVideoCall")]
public JoinDataComplete ActivityVideoCall = new JoinDataComplete(new JoinData() { JoinNumber = 53, JoinSpan = 1 }, new JoinMetadata() { Label = "Activity Video Call", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
public MobileControlSIMPLRoomJoinMap()
[JoinName("ShutdownPromptDuration")]
public JoinDataComplete ShutdownPromptDuration = new JoinDataComplete(new JoinData() { JoinNumber = 61, JoinSpan = 1 }, new JoinMetadata() { Label ="Shutdown Cancel", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("ShutdownCancel")]
public JoinDataComplete ShutdownCancel = new JoinDataComplete(new JoinData() { JoinNumber = 61, JoinSpan = 1 }, new JoinMetadata() { Label ="Shutdown Cancel", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ShutdownEnd")]
public JoinDataComplete ShutdownEnd = new JoinDataComplete(new JoinData() { JoinNumber = 62, JoinSpan = 1 }, new JoinMetadata() { Label = "Shutdown End", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ShutdownStart")]
public JoinDataComplete ShutdownStart = new JoinDataComplete(new JoinData() { JoinNumber = 63, JoinSpan = 1 }, new JoinMetadata() { Label = "Shutdown Start", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceHasChanged")]
public JoinDataComplete SourceHasChanged = new JoinDataComplete(new JoinData() { JoinNumber = 71, JoinSpan = 1 }, new JoinMetadata() { Label = "Source Changed", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CurrentSourceKey")]
public JoinDataComplete CurrentSourceKey = new JoinDataComplete(new JoinData() { JoinNumber = 71, JoinSpan = 1 }, new JoinMetadata() { Label = "Key of selected source", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigIsLocal")]
public JoinDataComplete ConfigIsLocal = new JoinDataComplete(new JoinData() { JoinNumber = 100, JoinSpan = 1 }, new JoinMetadata() { Label = "Config is local to Essentials", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("NumberOfAuxFaders")]
public JoinDataComplete NumberOfAuxFaders = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Number of Auxilliary Faders", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("SpeedDialNameStartJoin")]
public JoinDataComplete SpeedDialNameStartJoin = new JoinDataComplete(new JoinData() { JoinNumber = 241, JoinSpan = 10 }, new JoinMetadata() { Label = "Speed Dial names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SpeedDialNumberStartJoin")]
public JoinDataComplete SpeedDialNumberStartJoin = new JoinDataComplete(new JoinData() { JoinNumber = 251, JoinSpan = 10 }, new JoinMetadata() { Label = "Speed Dial numbers", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SpeedDialVisibleStartJoin")]
public JoinDataComplete SpeedDialVisibleStartJoin = new JoinDataComplete(new JoinData() { JoinNumber = 261, JoinSpan = 10 }, new JoinMetadata() { Label = "Speed Dial Visible", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("RoomIsOn")]
public JoinDataComplete RoomIsOn = new JoinDataComplete(new JoinData() { JoinNumber = 301, JoinSpan = 1 }, new JoinMetadata() { Label = "Room Is On", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("UserCodeToSystem")]
public JoinDataComplete UserCodeToSystem = new JoinDataComplete(new JoinData() { JoinNumber = 401, JoinSpan = 1 }, new JoinMetadata() { Label = "User Ccde", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("ServerUrl")]
public JoinDataComplete ServerUrl = new JoinDataComplete(new JoinData() { JoinNumber = 402, JoinSpan = 1 }, new JoinMetadata() { Label ="Server URL", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigRoomName")]
public JoinDataComplete ConfigRoomName = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 1 }, new JoinMetadata() {Label = "Room Nnme", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigHelpMessage")]
public JoinDataComplete ConfigHelpMessage = new JoinDataComplete(new JoinData() { JoinNumber = 502, JoinSpan = 1 }, new JoinMetadata() { Label = "Room help message", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigHelpNumber")]
public JoinDataComplete ConfigHelpNumber = new JoinDataComplete(new JoinData() { JoinNumber = 503, JoinSpan = 1 }, new JoinMetadata() { Label = "Room help number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigRoomPhoneNumber")]
public JoinDataComplete ConfigRoomPhoneNumber = new JoinDataComplete(new JoinData() { JoinNumber = 504, JoinSpan = 1 }, new JoinMetadata() { Label = "Room phone number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigRoomURI")]
public JoinDataComplete ConfigRoomURI = new JoinDataComplete(new JoinData() { JoinNumber = 505, JoinSpan = 1 }, new JoinMetadata() { Label = "Room URI", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("ConfigIsReady")]
public JoinDataComplete ConfigIsReady = new JoinDataComplete(new JoinData() { JoinNumber = 501, JoinSpan = 1 }, new JoinMetadata() { Label = "Config info from SIMPL is ready", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("HideVideoConfRecents")]
public JoinDataComplete HideVideoConfRecents = new JoinDataComplete(new JoinData() { JoinNumber = 502, JoinSpan = 1 }, new JoinMetadata() { Label = "Hide Video Conference Recents", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("ShowCameraWhenNotInCall")]
public JoinDataComplete ShowCameraWhenNotInCall = new JoinDataComplete(new JoinData() { JoinNumber = 503, JoinSpan = 1 }, new JoinMetadata() { Label = "Show camera when not in call", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("UseSourceEnabled")]
public JoinDataComplete UseSourceEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 504, JoinSpan = 1 }, new JoinMetadata() { Label = "Use Source Enabled Joins", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceShareDisableJoinStart")]
public JoinDataComplete SourceShareDisableJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 601, JoinSpan = 20 }, new JoinMetadata() { Label = "Source is not sharable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceIsEnabledJoinStart")]
public JoinDataComplete SourceIsEnabledJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 621, JoinSpan = 20 }, new JoinMetadata() { Label = "Source is enabled", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("SourceNameJoinStart")]
public JoinDataComplete SourceNameJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 601, JoinSpan = 20 }, new JoinMetadata() { Label = "Source Names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SourceIconJoinStart")]
public JoinDataComplete SourceIconJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 621, JoinSpan = 20 }, new JoinMetadata() { Label = "Source Icons", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SourceKeyJoinStart")]
public JoinDataComplete SourceKeyJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 641, JoinSpan = 20 }, new JoinMetadata() { Label = "Source Keys", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("SourceTypeJoinStart")]
public JoinDataComplete SourceTypeJoinStart = new JoinDataComplete(new JoinData() { JoinNumber = 661, JoinSpan = 20 }, new JoinMetadata() { Label = "Source Types", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CameraNearNameStart")]
public JoinDataComplete CameraNearNameStart = new JoinDataComplete(new JoinData() { JoinNumber = 761, JoinSpan = 10 }, new JoinMetadata() { Label = "Near End Camera Names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CameraFarName")]
public JoinDataComplete CameraFarName = new JoinDataComplete(new JoinData() { JoinNumber = 770, JoinSpan = 1 }, new JoinMetadata() { Label = "Far End Camera Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
public MobileControlSIMPLRoomJoinMap(uint joinStart)
:base(joinStart)
{
Joins.Add(ConfigIsLocal, new JoinMetadata() { JoinNumber = 100, Label = "Config is local to Essentials", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(RoomIsOn, new JoinMetadata() { JoinNumber = 301, Label = "Room Is On", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(PrivacyMute, new JoinMetadata() { JoinNumber = 12, Label = "Privacy Mute Toggle/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(PromptForCode, new JoinMetadata() { JoinNumber = 41, Label = "Prompt User for Code", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(ClientJoined, new JoinMetadata() { JoinNumber = 42, Label = "Client Joined", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(ActivityShare, new JoinMetadata() { JoinNumber = 51, Label = "Activity Share", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(ActivityPhoneCall, new JoinMetadata() { JoinNumber = 52, Label = "Activity Phone Call", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(ActivityVideoCall, new JoinMetadata() { JoinNumber = 53, Label = "Activity Video Call", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(MasterVolume, new JoinMetadata() { JoinNumber = 1, Label = "Master Volume Mute Toggle/FB/Level/Label", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.DigitalAnalogSerial });
Joins.Add(VolumeJoinStart, new JoinMetadata() { JoinNumber = 2, Label = "Volume Mute Toggle/FB/Level/Label", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 8, JoinType = eJoinType.DigitalAnalogSerial });
Joins.Add(ShutdownCancel, new JoinMetadata() { JoinNumber = 61, Label = "Shutdown Cancel", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(ShutdownEnd, new JoinMetadata() { JoinNumber = 62, Label = "Shutdown End", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(ShutdownStart, new JoinMetadata() { JoinNumber = 63, Label = "ShutdownStart", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(SourceHasChanged, new JoinMetadata() { JoinNumber = 71, Label = "Source Changed", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
// Possibly move these to Audio Codec Messenger
Joins.Add(SpeedDialVisibleStartJoin, new JoinMetadata() { JoinNumber = 261, Label = "Speed Dial Visible", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 10, JoinType = eJoinType.Digital });
//
Joins.Add(ConfigIsReady, new JoinMetadata() { JoinNumber = 501, Label = "Config info from SIMPL is ready", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(HideVideoConfRecents, new JoinMetadata() { JoinNumber = 502, Label = "Hide Video Conference Recents", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(ShowCameraWhenNotInCall, new JoinMetadata() { JoinNumber = 503, Label = "Show camera when not in call", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(UseSourceEnabled, new JoinMetadata() { JoinNumber = 504, Label = "Use Source Enabled Joins", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(SourceShareDisableJoinStart, new JoinMetadata() { JoinNumber = 601, Label = "Source is not sharable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 20, JoinType = eJoinType.Digital });
Joins.Add(SourceIsEnabledJoinStart, new JoinMetadata() { JoinNumber = 621, Label = "Source is enabled", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 20, JoinType = eJoinType.Digital });
Joins.Add(ShutdownPromptDuration, new JoinMetadata() { JoinNumber = 61, Label = "Shutdown Prompt Timer Duration", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Analog });
Joins.Add(NumberOfAuxFaders, new JoinMetadata() { JoinNumber = 101, Label = "Number of Auxilliary Faders", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Analog });
Joins.Add(SelectedSourceKey, new JoinMetadata() { JoinNumber = 71, Label = "Key of selected source", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
// Possibly move these to Audio Codec Messenger
Joins.Add(SpeedDialNameStartJoin, new JoinMetadata() { JoinNumber = 241, Label = "Speed Dial names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 10, JoinType = eJoinType.Serial });
Joins.Add(SpeedDialNumberStartJoin, new JoinMetadata() { JoinNumber = 251, Label = "Speed Dial numbers", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 10, JoinType = eJoinType.Serial });
//
Joins.Add(UserCodeToSystem, new JoinMetadata() { JoinNumber = 401, Label = "User Ccde", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(ServerUrl, new JoinMetadata() { JoinNumber = 402, Label = "Server URL", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(ConfigRoomName, new JoinMetadata() { JoinNumber = 501, Label = "Room Nnme", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(ConfigHelpMessage, new JoinMetadata() { JoinNumber = 502, Label = "Room help message", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(ConfigHelpNumber, new JoinMetadata() { JoinNumber = 503, Label = "Room help number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(ConfigRoomPhoneNumber, new JoinMetadata() { JoinNumber = 504, Label = "Room phone number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(ConfigRoomURI, new JoinMetadata() { JoinNumber = 505, Label = "Room URI", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(SourceNameJoinStart, new JoinMetadata() { JoinNumber = 601, Label = "Source Names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 20, JoinType = eJoinType.Serial });
Joins.Add(SourceIconJoinStart, new JoinMetadata() { JoinNumber = 621, Label = "Source Icons", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 20, JoinType = eJoinType.Serial });
Joins.Add(SourceKeyJoinStart, new JoinMetadata() { JoinNumber = 641, Label = "Source Keys", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 20, JoinType = eJoinType.Serial });
Joins.Add(SourceTypeJoinStart, new JoinMetadata() { JoinNumber = 661, Label = "Source Types", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 20, JoinType = eJoinType.Serial });
// Possibly move these to Audio Codec Messenger
Joins.Add(CameraNearNameStart, new JoinMetadata() { JoinNumber = 761, Label = "Near End Camera Names", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 10, JoinType = eJoinType.Serial });
Joins.Add(CameraFarName, new JoinMetadata() { JoinNumber = 770, Label = "Far End Camera Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
//
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
foreach (var join in Joins)
{
join.Value.JoinNumber = join.Value.JoinNumber + joinOffset;
}
PrintJoinMapInfo();
}
}
}

View File

@@ -22,10 +22,15 @@ namespace PepperDash.Essentials.AppServer
public JoinDataComplete CurrentCallNumber = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CurrentCallName")]
public JoinDataComplete CurrentCallName = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CurrentHookStateCallName")]
[JoinName("HookState")]
public JoinDataComplete HookState = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Hook State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CallDirection")]
public JoinDataComplete CallDirection = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Direction", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("IncomingCallName")]
public JoinDataComplete IncomingCallName = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("IncomingCallNumber")]
public JoinDataComplete IncomingCallNumber = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("0")]
public JoinDataComplete Dtmf0 = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("1")]

View File

@@ -9,149 +9,133 @@ using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.AppServer
{
public class SIMPLVtcJoinMap : JoinMapBase
public class SIMPLVtcJoinMap : JoinMapBaseAdvanced
{
public const string EndCall = "EndCall";
public const string IncomingCall = "IncomingCall";
public const string IncomingAnswer = "IncomingAnswer";
public const string IncomingReject = "IncomingReject";
public const string SpeedDialStart = "SpeedDialStart";
public const string DirectorySearchBusy = "DirectorySearchBusy";
public const string DirectoryLineSelected = "DirectoryLineSelected";
public const string DirectoryEntryIsContact = "DirectoryEntryIsContact";
public const string DirectoryIsRoot = "DirectoryIsRoot";
public const string DDirectoryHasChanged = "DDirectoryHasChanged";
public const string DirectoryRoot = "DirectoryRoot";
public const string DirectoryFolderBack = "DirectoryFoldeBrack";
public const string DirectoryDialSelectedLine = "DirectoryDialSelectedLine";
[JoinName("EndCall")]
public JoinDataComplete EndCall = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 }, new JoinMetadata() { Label = "Hang Up", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncomingCall")]
public JoinDataComplete IncomingCall = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncomingAnswer")]
public JoinDataComplete IncomingAnswer = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Answer Incoming Call", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("IncomingReject")]
public JoinDataComplete IncomingReject = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Reject Incoming Call", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("SpeedDialStart")]
public JoinDataComplete SpeedDialStart = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 4 }, new JoinMetadata() { Label = "Speed Dial", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
public const string CameraTiltUp = "CameraTiltUp";
public const string CameraTiltDown = "CameraTiltDown";
public const string CameraPanLeft = "CameraPanLeft";
public const string CameraPanRight = "CameraPanRight";
public const string CameraZoomIn = "CameraZoomIn";
public const string CameraZoomOut = "CameraZoomOut";
public const string CameraPresetStart = "CameraPresetStart";
public const string CameraModeAuto = "CameraModeAuto";
public const string CameraModeManual = "CameraModeManual";
public const string CameraModeOff = "CameraModeOff";
[JoinName("DirectorySearchBusy")]
public JoinDataComplete DirectorySearchBusy = new JoinDataComplete(new JoinData() { JoinNumber = 100, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Search Busy FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryLineSelected")]
public JoinDataComplete DirectoryLineSelected = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Line Selected FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryEntryIsContact")]
public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Selected Entry Is Contact FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryIsRoot")]
public JoinDataComplete DirectoryIsRoot = new JoinDataComplete(new JoinData() { JoinNumber = 102, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory is on Root FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DDirectoryHasChanged")]
public JoinDataComplete DDirectoryHasChanged = new JoinDataComplete(new JoinData() { JoinNumber = 103, JoinSpan = 1 }, new JoinMetadata() {Label = "Directory has changed FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryRoot")]
public JoinDataComplete DirectoryRoot = new JoinDataComplete(new JoinData() { JoinNumber = 104, JoinSpan = 1 }, new JoinMetadata() { Label = "Go to Directory Root", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryFolderBack")]
public JoinDataComplete DirectoryFolderBack = new JoinDataComplete(new JoinData() { JoinNumber = 105, JoinSpan = 1 }, new JoinMetadata() { Label = "Go back one directory level", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryDialSelectedLine")]
public JoinDataComplete DirectoryDialSelectedLine = new JoinDataComplete(new JoinData() { JoinNumber = 106, JoinSpan = 1 }, new JoinMetadata() { Label = "Dial selected directory line", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
public const string CameraSelfView = "CameraSelfView";
public const string CameraLayout = "CameraLayout";
[JoinName("CameraTiltUp")]
public JoinDataComplete CameraTiltUp = new JoinDataComplete(new JoinData() { JoinNumber = 111, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Tilt Up", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraTiltDown")]
public JoinDataComplete CameraTiltDown = new JoinDataComplete(new JoinData() { JoinNumber = 112, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Tilt Down", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraPanLeft")]
public JoinDataComplete CameraPanLeft = new JoinDataComplete(new JoinData() { JoinNumber = 113, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Pan Left", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraPanRight")]
public JoinDataComplete CameraPanRight = new JoinDataComplete(new JoinData() { JoinNumber = 114, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Pan Right", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraZoomIn")]
public JoinDataComplete CameraZoomIn = new JoinDataComplete(new JoinData() { JoinNumber = 115, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Zoom In", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraZoomOut")]
public JoinDataComplete CameraZoomOut = new JoinDataComplete(new JoinData() { JoinNumber = 116, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Zoom Out", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraPresetStart")]
public JoinDataComplete CameraPresetStart = new JoinDataComplete(new JoinData() { JoinNumber = 121, JoinSpan = 5 }, new JoinMetadata() { Label = "Camera Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public const string CameraSupportsAutoMode = "CameraSupportsAutoMode";
public const string CameraSupportsOffMode = "CameraSupportsOffMode";
[JoinName("CameraModeAuto")]
public JoinDataComplete CameraModeAuto = new JoinDataComplete(new JoinData() { JoinNumber = 131, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Auto", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeManual")]
public JoinDataComplete CameraModeManual = new JoinDataComplete(new JoinData() { JoinNumber = 132, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Manual", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraModeOff")]
public JoinDataComplete CameraModeOff = new JoinDataComplete(new JoinData() { JoinNumber = 133, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Mode Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
public const string CameraNumberSelect = "CameraNumberSelect";
public const string DirectorySelectRow = "DirectorySelectRow";
public const string DirectoryRowCount = "DirectoryRowCount";
[JoinName("CameraSelfView")]
public JoinDataComplete CameraSelfView = new JoinDataComplete(new JoinData() { JoinNumber = 141, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Self View Toggle/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraLayout")]
public JoinDataComplete CameraLayout = new JoinDataComplete(new JoinData() { JoinNumber = 142, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Layout Toggle", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
public const string CurrentDialString = "CurrentDialString";
public const string CurrentCallNumber = "CurrentCallNumber";
public const string CurrentCallName = "CurrentCallName";
public const string HookState = "HookState";
public const string CallDirection = "CallDirection";
public const string IncomingCallName = "IncomingCallName";
public const string IncomingCallNumber = "IncomingCallNumber";
public const string DirectorySearchString = "DirectorySearchString";
public const string DirectoryEntriesStart = "EndCaDirectoryEntriesStartll";
public const string DirectoryEntrySelectedName = "DirectoryEntrySelectedName";
public const string DirectoryEntrySelectedNumber = "DirectoryEntrySelectedNumber";
public const string DirectorySelectedFolderName = "DirectorySelectedFolderName";
[JoinName("CameraSupportsAutoMode")]
public JoinDataComplete CameraSupportsAutoMode = new JoinDataComplete(new JoinData() { JoinNumber = 143, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Supports Auto Mode FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
[JoinName("CameraSupportsOffMode")]
public JoinDataComplete CameraSupportsOffMode = new JoinDataComplete(new JoinData() { JoinNumber = 144, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Supports Off Mode FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public const string Dtmf0 = "0";
public const string Dtmf1 = "1";
public const string Dtmf2 = "2";
public const string Dtmf3 = "3";
public const string Dtmf4 = "4";
public const string Dtmf5 = "5";
public const string Dtmf6 = "6";
public const string Dtmf7 = "7";
public const string Dtmf8 = "8";
public const string Dtmf9 = "9";
public const string DtmfStar = "*";
public const string DtmfPound = "#";
[JoinName("CameraNumberSelect")]
public JoinDataComplete CameraNumberSelect = new JoinDataComplete(new JoinData() { JoinNumber = 60, JoinSpan = 1 }, new JoinMetadata() { Label = "Camera Number Select/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectorySelectRow")]
public JoinDataComplete DirectorySelectRow = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Select Row", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("DirectoryRowCount")]
public JoinDataComplete DirectoryRowCount = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Row Count FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public SIMPLVtcJoinMap()
[JoinName("CurrentDialString")]
public JoinDataComplete CurrentDialString = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Dial String", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CurrentCallName")]
public JoinDataComplete CurrentCallName = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CurrentCallNumber")]
public JoinDataComplete CurrentCallNumber = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("HookState")]
public JoinDataComplete HookState = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Hook State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("CallDirection")]
public JoinDataComplete CallDirection = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 }, new JoinMetadata() { Label = "Current Call Direction", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("IncomingCallName")]
public JoinDataComplete IncomingCallName = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("IncomingCallNumber")]
public JoinDataComplete IncomingCallNumber = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata() { Label = "Incoming Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectorySearchString")]
public JoinDataComplete DirectorySearchString = new JoinDataComplete(new JoinData() { JoinNumber = 100, JoinSpan = 1 }, new JoinMetadata() { Label = "Directory Search String", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectoryEntriesStart")]
public JoinDataComplete DirectoryEntriesStart = new JoinDataComplete(new JoinData() { JoinNumber = 101, JoinSpan = 255 }, new JoinMetadata() { Label = "Directory Entries", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectoryEntrySelectedName")]
public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete(new JoinData() { JoinNumber = 356, JoinSpan = 1 }, new JoinMetadata() { Label = "Selected Directory Entry Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectoryEntrySelectedNumber")]
public JoinDataComplete DirectoryEntrySelectedNumber = new JoinDataComplete(new JoinData() { JoinNumber = 357, JoinSpan = 1 }, new JoinMetadata() { Label = "Selected Directory Entry Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("DirectorySelectedFolderName")]
public JoinDataComplete DirectorySelectedFolderName = new JoinDataComplete(new JoinData() { JoinNumber = 358, JoinSpan = 1 }, new JoinMetadata() { Label = "Selected Directory Folder Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
[JoinName("1")]
public JoinDataComplete Dtmf1 = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("2")]
public JoinDataComplete Dtmf2 = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("3")]
public JoinDataComplete Dtmf3 = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 3", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("4")]
public JoinDataComplete Dtmf4 = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 4", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("5")]
public JoinDataComplete Dtmf5 = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 5", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("6")]
public JoinDataComplete Dtmf6 = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 6", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("7")]
public JoinDataComplete Dtmf7 = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 7", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("8")]
public JoinDataComplete Dtmf8 = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 8", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("9")]
public JoinDataComplete Dtmf9 = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 9", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("0")]
public JoinDataComplete Dtmf0 = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF 0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("*")]
public JoinDataComplete DtmfStar = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF *", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("#")]
public JoinDataComplete DtmfPound = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 }, new JoinMetadata() { Label = "DTMF #", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
public SIMPLVtcJoinMap(uint joinStart)
:base(joinStart)
{
// TODO: Set Join metedata
Joins.Add(EndCall, new JoinMetadata() { JoinNumber = 24, Label = "Hang Up", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(IncomingCall, new JoinMetadata() { JoinNumber = 50, Label = "Incoming Call FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(IncomingAnswer, new JoinMetadata() { JoinNumber = 51, Label = "Answer Incoming Call", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(IncomingReject, new JoinMetadata() { JoinNumber = 52, Label = "Reject Incoming Call", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(SpeedDialStart, new JoinMetadata() { JoinNumber = 41, Label = "Speed Dial", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 4, JoinType = eJoinType.Digital });
Joins.Add(DirectorySearchBusy, new JoinMetadata() { JoinNumber = 100, Label = "Directory Search Busy FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DirectoryLineSelected, new JoinMetadata() { JoinNumber = 101, Label = "Directory Line Selected FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DirectoryEntryIsContact, new JoinMetadata() { JoinNumber = 101, Label = "Directory Selected Entry Is Contact FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DirectoryIsRoot, new JoinMetadata() { JoinNumber = 102, Label = "Directory is on Root FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DDirectoryHasChanged, new JoinMetadata() { JoinNumber = 103, Label = "Directory has changed FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DirectoryRoot, new JoinMetadata() { JoinNumber = 104, Label = "Go to Directory Root", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DirectoryFolderBack, new JoinMetadata() { JoinNumber = 105, Label = "Go back one directory level", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DirectoryDialSelectedLine, new JoinMetadata() { JoinNumber = 106, Label = "Dial selected directory line", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraTiltUp, new JoinMetadata() { JoinNumber = 111, Label = "Camera Tilt Up", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraTiltDown, new JoinMetadata() { JoinNumber = 112, Label = "Camera Tilt Down", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraPanLeft, new JoinMetadata() { JoinNumber = 113, Label = "Camera Pan Left", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraPanRight, new JoinMetadata() { JoinNumber = 114, Label = "Camera Pan Right", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraZoomIn, new JoinMetadata() { JoinNumber = 115, Label = "Camera Zoom In", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraZoomOut, new JoinMetadata() { JoinNumber = 116, Label = "Camera Zoom Out", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraPresetStart, new JoinMetadata() { JoinNumber = 121, Label = "Camera Presets", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 5, JoinType = eJoinType.Digital });
Joins.Add(CameraModeAuto, new JoinMetadata() { JoinNumber = 131, Label = "Camera Mode Auto", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraModeManual, new JoinMetadata() { JoinNumber = 132, Label = "Camera Mode Manual", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraModeOff, new JoinMetadata() { JoinNumber = 133, Label = "Camera Mode Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraSelfView, new JoinMetadata() { JoinNumber = 141, Label = "Camera Self View Toggle/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraLayout, new JoinMetadata() { JoinNumber = 142, Label = "Camera Layout Toggle", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraSupportsAutoMode, new JoinMetadata() { JoinNumber = 143, Label = "Camera Supports Auto Mode FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraSupportsOffMode, new JoinMetadata() { JoinNumber = 144, Label = "Camera Supports Off Mode FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(CameraNumberSelect, new JoinMetadata() { JoinNumber = 60, Label = "Camera Number Select/FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Analog });
Joins.Add(DirectorySelectRow, new JoinMetadata() { JoinNumber = 101, Label = "Directory Select Row/FB", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Analog });
Joins.Add(DirectoryRowCount, new JoinMetadata() { JoinNumber = 101, Label = "Directory Row Count FB", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Analog });
Joins.Add(CurrentDialString, new JoinMetadata() { JoinNumber = 1, Label = "Current Dial String", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(CurrentCallNumber, new JoinMetadata() { JoinNumber = 3, Label = "Current Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(CurrentCallName, new JoinMetadata() { JoinNumber = 2, Label = "Current Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(HookState, new JoinMetadata() { JoinNumber = 31, Label = "Current Hook State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(CallDirection, new JoinMetadata() { JoinNumber = 22, Label = "Current Call Direction", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(IncomingCallName, new JoinMetadata() { JoinNumber = 51, Label = "Incoming Call Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(IncomingCallNumber, new JoinMetadata() { JoinNumber = 52, Label = "Incoming Call Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(DirectorySearchString, new JoinMetadata() { JoinNumber = 100, Label = "Directory Search String", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(DirectoryEntriesStart, new JoinMetadata() { JoinNumber = 101, Label = "Directory Entries", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 255, JoinType = eJoinType.Serial });
Joins.Add(DirectoryEntrySelectedName, new JoinMetadata() { JoinNumber = 356, Label = "Selected Directory Entry Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(DirectoryEntrySelectedNumber, new JoinMetadata() { JoinNumber = 357, Label = "Selected Directory Entry Number", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(DirectorySelectedFolderName, new JoinMetadata() { JoinNumber = 358, Label = "Selected Directory Folder Name", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinSpan = 1, JoinType = eJoinType.Serial });
Joins.Add(Dtmf1, new JoinMetadata() { JoinNumber = 1, Label = "DTMF 1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf2, new JoinMetadata() { JoinNumber = 2, Label = "DTMF 2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf3, new JoinMetadata() { JoinNumber = 3, Label = "DTMF 3", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf4, new JoinMetadata() { JoinNumber = 4, Label = "DTMF 4", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf5, new JoinMetadata() { JoinNumber = 5, Label = "DTMF 5", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf6, new JoinMetadata() { JoinNumber = 6, Label = "DTMF 6", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf7, new JoinMetadata() { JoinNumber = 7, Label = "DTMF 7", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf8, new JoinMetadata() { JoinNumber = 8, Label = "DTMF 8", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf9, new JoinMetadata() { JoinNumber = 9, Label = "DTMF 9", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(Dtmf0, new JoinMetadata() { JoinNumber = 10, Label = "DTMF 0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DtmfStar, new JoinMetadata() { JoinNumber = 11, Label = "DTMF *", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
Joins.Add(DtmfPound, new JoinMetadata() { JoinNumber = 12, Label = "DTMF #", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinSpan = 1, JoinType = eJoinType.Digital });
}
public override void OffsetJoinNumbers(uint joinStart)
{
var joinOffset = joinStart - 1;
foreach (var join in Joins)
{
join.Value.JoinNumber = join.Value.JoinNumber + joinOffset;
}
PrintJoinMapInfo();
}
}
}

View File

@@ -20,6 +20,46 @@ using PepperDash.Essentials.DM;
namespace PepperDash.Essentials.Bridges
{
/// <summary>
/// Helper methods for bridges
/// </summary>
public static class BridgeHelper
{
public static void PrintJoinMap(string command)
{
string bridgeKey = "";
string deviceKey = "";
var targets = command.Split(' ');
bridgeKey = targets[0].Trim();
var bridge = DeviceManager.GetDeviceForKey(bridgeKey) as EiscApi;
if (bridge == null)
{
Debug.Console(0, "Unable to find bridge with key: '{0}'", bridgeKey);
return;
}
if (targets.Length > 1)
{
deviceKey = targets[1].Trim();
if (!string.IsNullOrEmpty(deviceKey))
{
bridge.PrintJoinMapForDevice(deviceKey);
return;
}
}
else
{
bridge.PrintJoinMaps();
}
}
}
/// <summary>
/// Base class for all bridge class variants
/// </summary>
@@ -84,6 +124,10 @@ namespace PepperDash.Essentials.Bridges
(device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is IBridgeAdvanced)
{
(device as IBridgeAdvanced).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this);
}
else if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController)
{
(device as PepperDash.Essentials.Core.Monitoring.SystemMonitorController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
@@ -99,16 +143,18 @@ namespace PepperDash.Essentials.Bridges
(device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this);
continue;
}
else if (device is PepperDash.Essentials.Core.DisplayBase)
{
(device as DisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmChassisController) {
else if (device is PepperDash.Essentials.Core.DisplayBase)
{
(device as DisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmChassisController)
{
(device as DmChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
else if (device is DmBladeChassisController) {
else if (device is DmBladeChassisController)
{
(device as DmBladeChassisController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
continue;
}
@@ -206,6 +252,36 @@ namespace PepperDash.Essentials.Bridges
}
}
/// <summary>
/// Prints all the join maps on this bridge
/// </summary>
public void PrintJoinMaps()
{
Debug.Console(0, this, "Join Maps for EISC IPID: {0}", Eisc.ID.ToString("X"));
foreach (var joinMap in JoinMaps)
{
joinMap.Value.PrintJoinMapInfo();
}
}
/// <summary>
/// Prints the join map for a device by key
/// </summary>
/// <param name="deviceKey"></param>
public void PrintJoinMapForDevice(string deviceKey)
{
var joinMap = JoinMaps[deviceKey];
if (joinMap == null)
{
Debug.Console(0, this, "Unable to find joinMap for device with key: '{0}'", deviceKey);
return;
}
joinMap.PrintJoinMapInfo();
}
/// <summary>
/// Used for debugging to trigger an action based on a join number and type
/// </summary>

View File

@@ -7,8 +7,20 @@ using Crestron.SimplSharpPro.DeviceSupport;
namespace PepperDash.Essentials.Bridges
{
/// <summary>
/// Defines a device that uses the legacy JoinMapBase for its join map
/// </summary>
[Obsolete("IBridgeAdvanced should be used going forward with JoinMapBaseAdvanced")]
public interface IBridge
{
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey);
}
/// <summary>
/// Defines a device that uses JoinMapBaseAdvanced for its join map
/// </summary>
public interface IBridgeAdvanced
{
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApi bridge);
}
}

View File

@@ -33,7 +33,6 @@ namespace PepperDash.Essentials.Bridges
[JoinName("PowerOff")]
public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 }, new JoinMetadata() { Label = "Power Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("NumberOfPresets")]
public JoinDataComplete NumberOfPresets = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata() { Label = "Tells Essentials the number of defined presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
[JoinName("PresetRecallStart")]
@@ -57,7 +56,6 @@ namespace PepperDash.Essentials.Bridges
[JoinName("SupportsPresets")]
public JoinDataComplete SupportsPresets = new JoinDataComplete(new JoinData() { JoinNumber = 57, JoinSpan = 1 }, new JoinMetadata() { Label = "Supports Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
public CameraControllerJoinMap(uint joinStart)
:base(joinStart)
{

View File

@@ -47,9 +47,12 @@ namespace PepperDash.Essentials
ConsoleAccessLevelEnum.AccessOperator);
}
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Bridges.BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
// CrestronConsole.AddNewConsoleCommand(S => { ConfigWriter.WriteConfigFile(null); }, "writeconfig", "writes the current config to a file", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s =>
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s);

View File

@@ -7,7 +7,7 @@
<ProjectGuid>{1BED5BA9-88C4-4365-9362-6F4B128071D3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PepperDash.Essentials</RootNamespace>
<RootNamespace>PepperDashEssentials</RootNamespace>
<AssemblyName>PepperDashEssentials</AssemblyName>
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92230};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
@@ -174,7 +174,6 @@
<Compile Include="ControlSystem.cs" />
<Compile Include="Factory\UiDeviceFactory.cs" />
<Compile Include="Fusion\EssentialsHuddleVtc1FusionController.cs" />
<Compile Include="PluginLoading\PluginLoading.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />

View File

@@ -8,6 +8,7 @@ using Crestron.SimplSharp.Reflection;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Plugins;
namespace PepperDash.Essentials
{
@@ -39,7 +40,6 @@ namespace PepperDash.Essentials
// The temp directory where .cplz archives will be unzipped to
static string _tempDirectory = _pluginDirectory + Global.DirectorySeparator + "temp";
static PluginLoader()
{
LoadedAssemblies = new List<LoadedAssembly>();
@@ -69,6 +69,11 @@ namespace PepperDash.Essentials
{
version = Global.AssemblyVersion;
assembly = Assembly.GetExecutingAssembly();
break;
}
case ("PepperDashEssentialsBase.dll"):
{
break;
}
case ("PepperDash_Core.dll"):
@@ -338,49 +343,21 @@ namespace PepperDash.Essentials
{
try
{
var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static);
var loadPlugin = methods.FirstOrDefault(m => m.Name.Equals("LoadPlugin"));
if (loadPlugin != null)
if (typeof(IPluginDeviceFactory).IsAssignableFrom(type))
{
Debug.Console(2, "LoadPlugin method found in {0}", type.Name);
var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static);
var minimumVersion = fields.FirstOrDefault(p => p.Name.Equals("MinimumEssentialsFrameworkVersion"));
if (minimumVersion != null)
{
Debug.Console(2, "MinimumEssentialsFrameworkVersion found");
var minimumVersionString = minimumVersion.GetValue(null) as string;
if (!string.IsNullOrEmpty(minimumVersionString))
{
var passed = Global.IsRunningMinimumVersionOrHigher(minimumVersionString);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", minimumVersionString);
continue;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", minimumVersionString);
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion found but not set. Loading plugin, but your mileage may vary.");
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion not found. Loading plugin, but your mileage may vary.");
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Adding plugin: {0}", loadedAssembly.Name);
loadPlugin.Invoke(null, null);
var plugin = (IPluginDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
LoadCustomPlugin(plugin, loadedAssembly);
}
}
else
{
var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static);
var loadPlugin = methods.FirstOrDefault(m => m.Name.Equals("LoadPlugin"));
if (loadPlugin != null)
{
LoadCustomLegacyPlugin(type, loadPlugin, loadedAssembly);
}
}
}
catch (Exception e)
{
Debug.Console(2, "Load Plugin not found. {0} is not a plugin assembly. Exception: {1}", loadedAssembly.Name, e);
@@ -400,6 +377,75 @@ namespace PepperDash.Essentials
Debug.Console(0, "Done Loading Custom Plugin Types.");
}
/// <summary>
/// Loads a
/// </summary>
/// <param name="plugin"></param>
static void LoadCustomPlugin(IPluginDeviceFactory plugin, LoadedAssembly loadedAssembly)
{
var passed = Global.IsRunningMinimumVersionOrHigher(plugin.MinimumEssentialsFrameworkVersion);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", plugin.MinimumEssentialsFrameworkVersion);
return;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", plugin.MinimumEssentialsFrameworkVersion);
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading plugin: {0}", loadedAssembly.Name);
plugin.LoadTypeFactories();
}
/// <summary>
/// Loads a a custom plugin via the legacy method
/// </summary>
/// <param name="type"></param>
/// <param name="loadPlugin"></param>
static void LoadCustomLegacyPlugin(CType type, MethodInfo loadPlugin, LoadedAssembly loadedAssembly)
{
Debug.Console(2, "LoadPlugin method found in {0}", type.Name);
var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static);
var minimumVersion = fields.FirstOrDefault(p => p.Name.Equals("MinimumEssentialsFrameworkVersion"));
if (minimumVersion != null)
{
Debug.Console(2, "MinimumEssentialsFrameworkVersion found");
var minimumVersionString = minimumVersion.GetValue(null) as string;
if (!string.IsNullOrEmpty(minimumVersionString))
{
var passed = Global.IsRunningMinimumVersionOrHigher(minimumVersionString);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", minimumVersionString);
return;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", minimumVersionString);
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion found but not set. Loading plugin, but your mileage may vary.");
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion not found. Loading plugin, but your mileage may vary.");
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading legacy plugin: {0}", loadedAssembly.Name);
loadPlugin.Invoke(null, null);
}
/// <summary>
/// Loads plugins
/// </summary>

View File

@@ -16,8 +16,7 @@ namespace PepperDash.Essentials.Core
/// <summary>
/// Serves as a generic wrapper class for all styles of IBasicCommuncation ports
/// </summary>
public class
GenericComm : ReconfigurableDevice
public class GenericComm : ReconfigurableDevice
{
EssentialsControlPropertiesConfig PropertiesConfig;
@@ -29,6 +28,13 @@ namespace PepperDash.Essentials.Core
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
CommPort = CommFactory.CreateCommForDevice(config);
}
public static IKeyed BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
return new GenericComm(dc);
}
public void SetPortConfig(string portConfig)
@@ -51,6 +57,19 @@ namespace PepperDash.Essentials.Core
ConfigWriter.UpdateDeviceConfig(config);
}
}
}
public class GenericCommFactory : Essentials.Core.EssentialsDeviceFactory<GenericComm>
{
public GenericCommFactory()
{
TypeNames = new List<string>() { "genericComm" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
return new GenericComm(dc);
}
}
}

View File

@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Defines the basic needs for an EssentialsDevice to enable it to be build by an IDeviceFactory class
/// </summary>
public abstract class EssentialsDevice : Device
{
protected EssentialsDevice(string key)
: base(key)
{
}
protected EssentialsDevice(string key, string name)
: base(key, name)
{
}
}
/// <summary>
/// Devices the basic needs for a Device Factory
/// </summary>
public abstract class EssentialsDeviceFactory<T> : IDeviceFactory where T:EssentialsDevice
{
#region IDeviceFactory Members
/// <summary>
/// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device
/// </summary>
public List<string> TypeNames { get; protected set; }
/// <summary>
/// Loads an item to the DeviceFactory.FactoryMethods dictionary for each entry in the TypeNames list
/// </summary>
public void LoadTypeFactories()
{
foreach (var typeName in TypeNames)
{
DeviceFactory.AddFactoryForType(typeName, BuildDevice);
}
}
/// <summary>
/// The method that will build the device
/// </summary>
/// <param name="dc">The device config</param>
/// <returns>An instance of the device</returns>
public abstract EssentialsDevice BuildDevice(DeviceConfig dc);
#endregion
}
/// <summary>
/// Devices the basic needs for a Device Factory
/// </summary>
public abstract class EssentialsPluginDeviceFactory<T> : EssentialsDeviceFactory<T>, IPluginDeviceFactory where T : EssentialsDevice
{
/// <summary>
/// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33")
/// </summary>
public string MinimumEssentialsFrameworkVersion { get; protected set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace PepperDash.Essentials.Core.Devices
/// <summary>
///
/// </summary>
public abstract class ReconfigurableDevice : Device
public abstract class ReconfigurableDevice : EssentialsDevice
{
public event EventHandler<EventArgs> ConfigChanged;

View File

@@ -86,5 +86,43 @@ namespace PepperDash.Essentials.Core
return null;
}
/// <summary>
/// Prints the type names fromt the FactoryMethods collection.
/// </summary>
/// <param name="command"></param>
public static void GetDeviceFactoryTypes(string filter)
{
List<string> typeNames = new List<string>();
if (!string.IsNullOrEmpty(filter))
{
typeNames = FactoryMethods.Keys.Where(k => k.Contains(filter)).ToList();
}
else
{
typeNames = FactoryMethods.Keys.ToList();
}
Debug.Console(0, "Device Types:");
foreach (var type in typeNames)
{
Debug.Console(0, "type: '{0}'", type);
}
}
}
/// <summary>
/// Responsible for loading all of the device types
/// </summary>
public class CoreDeviceFactory
{
public CoreDeviceFactory()
{
var genComm = new GenericCommFactory() as IDeviceFactory;
genComm.LoadTypeFactories();
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Defines a class that is capable of loading device types
/// </summary>
public interface IDeviceFactory
{
/// <summary>
/// Will be called when the plugin is loaded by Essentials. Must add any new types to the DeviceFactory using DeviceFactory.AddFactoryForType() for each new type
/// </summary>
void LoadTypeFactories();
}
}

View File

@@ -48,16 +48,17 @@ namespace PepperDash.Essentials.Core
if (joinMapSerialzed != null)
{
var joinMap = JsonConvert.DeserializeObject<Dictionary<string, JoinData>>(joinMapSerialzed);
var joinMapData = JsonConvert.DeserializeObject<Dictionary<string, JoinData>>(joinMapSerialzed);
if (joinMap != null)
return joinMap;
if (joinMapData != null)
return joinMapData;
else
return null;
}
else
return null;
}
}
/// <summary>
@@ -255,6 +256,8 @@ namespace PepperDash.Essentials.Core
Debug.Console(2, "No mathcing key found in join map for: '{0}'", customJoinData.Key);
}
}
PrintJoinMapInfo();
}
///// <summary>

View File

@@ -7,7 +7,7 @@
<ProjectGuid>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PepperDash.Essentials.Core</RootNamespace>
<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>
@@ -132,11 +132,13 @@
<Compile Include="Devices\CrestronProcessor.cs" />
<Compile Include="Devices\DeviceApiBase.cs" />
<Compile Include="Devices\DeviceFeedbackExtensions.cs" />
<Compile Include="Devices\EssentialsDevice.cs" />
<Compile Include="Devices\PC\InRoomPc.cs" />
<Compile Include="Devices\PC\Laptop.cs" />
<Compile Include="Devices\ReconfigurableDevice.cs" />
<Compile Include="Devices\VolumeDeviceChangeEventArgs.cs" />
<Compile Include="Factory\DeviceFactory.cs" />
<Compile Include="Factory\IDeviceFactory.cs" />
<Compile Include="Feedbacks\BoolFeedback.cs" />
<Compile Include="Feedbacks\FeedbackCollection.cs" />
<Compile Include="Feedbacks\FeedbackEventArgs.cs" />
@@ -156,7 +158,9 @@
<Compile Include="Monitoring\SystemMonitorController.cs" />
<Compile Include="Microphone Privacy\MicrophonePrivacyController.cs" />
<Compile Include="Microphone Privacy\MicrophonePrivacyControllerConfig.cs" />
<Compile Include="Plugins\PluginLoader.cs" />
<Compile Include="Presets\PresetBase.cs" />
<Compile Include="Plugins\IPluginDeviceFactory.cs" />
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
<Compile Include="Config\Comm and IR\CommFactory.cs" />
<Compile Include="Config\Comm and IR\CommunicationExtras.cs" />

View File

@@ -1,11 +0,0 @@
using PepperDash.Core;
using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Core.Plugins
{
public interface IPluginDeviceConfig
{
string MinimumEssentialsFrameworkVersion { get; }
IKeyed BuildDevice(DeviceConfig dc);
}
}

View File

@@ -0,0 +1,19 @@
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Defines a class that is capable of loading custom plugin device types
/// </summary>
public interface IPluginDeviceFactory : IDeviceFactory
{
/// <summary>
/// Required to define the minimum version for Essentials in the format xx.yy.zz
/// </summary>
string MinimumEssentialsFrameworkVersion { get; }
}
}

View File

@@ -1,19 +0,0 @@
using System;
namespace PepperDash.Essentials.Core.Plugins
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class PluginEntryPointAttribute : Attribute
{
private readonly string _uniqueKey;
public string UniqueKey {
get { return _uniqueKey; }
}
public PluginEntryPointAttribute(string key)
{
_uniqueKey = key;
}
}
}

View File

@@ -0,0 +1,493 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharp.Reflection;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials
{
/// <summary>
/// Deals with loading plugins at runtime
/// </summary>
public static class PluginLoader
{
/// <summary>
/// The complete list of loaded assemblies. Includes Essentials Framework assemblies and plugins
/// </summary>
public static List<LoadedAssembly> LoadedAssemblies { get; private set; }
/// <summary>
/// The list of assemblies loaded from the plugins folder
/// </summary>
static List<LoadedAssembly> LoadedPluginFolderAssemblies;
/// <summary>
/// The directory to look in for .cplz plugin packages
/// </summary>
static string _pluginDirectory = Global.FilePathPrefix + "plugins";
/// <summary>
/// The directory where plugins will be moved to and loaded from
/// </summary>
static string _loadedPluginsDirectoryPath = _pluginDirectory + Global.DirectorySeparator + "loadedAssemblies";
// The temp directory where .cplz archives will be unzipped to
static string _tempDirectory = _pluginDirectory + Global.DirectorySeparator + "temp";
static PluginLoader()
{
LoadedAssemblies = new List<LoadedAssembly>();
LoadedPluginFolderAssemblies = new List<LoadedAssembly>();
}
/// <summary>
/// Retrieves all the loaded assemblies from the program directory
/// </summary>
public static void AddProgramAssemblies()
{
Debug.Console(2, "Getting Assemblies loaded with Essentials");
// Get the loaded assembly filenames
var appDi = new DirectoryInfo(Global.ApplicationDirectoryPathPrefix);
var assemblyFiles = appDi.GetFiles("*.dll");
Debug.Console(2, "Found {0} Assemblies", assemblyFiles.Length);
foreach (var fi in assemblyFiles)
{
string version = string.Empty;
Assembly assembly = null;
switch (fi.Name)
{
case ("PepperDashEssentials.dll"):
{
version = Global.AssemblyVersion;
assembly = Assembly.GetExecutingAssembly();
break;
}
case ("PepperDashEssentialsBase.dll"):
{
break;
}
case ("PepperDash_Core.dll"):
{
version = PepperDash.Core.Debug.PepperDashCoreVersion;
break;
}
}
LoadedAssemblies.Add(new LoadedAssembly(fi.Name, version, assembly));
}
if (Debug.Level > 1)
{
Debug.Console(2, "Loaded Assemblies:");
foreach (var assembly in LoadedAssemblies)
{
Debug.Console(2, "Assembly: {0}", assembly.Name);
}
}
}
/// <summary>
/// Loads an assembly via Reflection and adds it to the list of loaded assemblies
/// </summary>
/// <param name="fileName"></param>
static LoadedAssembly LoadAssembly(string filePath)
{
Debug.Console(2, "Attempting to load {0}", filePath);
var assembly = Assembly.LoadFrom(filePath);
if (assembly != null)
{
var assyVersion = GetAssemblyVersion(assembly);
var loadedAssembly = new LoadedAssembly(assembly.GetName().Name, assyVersion, assembly);
LoadedAssemblies.Add(loadedAssembly);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loaded assembly '{0}', version {1}", loadedAssembly.Name, loadedAssembly.Version);
return loadedAssembly;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Unable to load assembly: '{0}'", filePath);
}
return null;
}
/// <summary>
/// Attempts to get the assembly informational version and if not possible gets the version
/// </summary>
/// <param name="assembly"></param>
/// <returns></returns>
static string GetAssemblyVersion(Assembly assembly)
{
var ver = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false);
if (ver != null && ver.Length > 0)
{
// Get the AssemblyInformationalVersion
AssemblyInformationalVersionAttribute verAttribute = ver[0] as AssemblyInformationalVersionAttribute;
return verAttribute.InformationalVersion;
}
else
{
// Get the AssemblyVersion
var version = assembly.GetName().Version;
var verStr = string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);
return verStr;
}
}
/// <summary>
/// Checks if the filename matches an already loaded assembly file's name
/// </summary>
/// <param name="filename"></param>
/// <returns>True if file already matches loaded assembly file.</returns>
public static bool CheckIfAssemblyLoaded(string name)
{
Debug.Console(2, "Checking if assembly: {0} is loaded...", name);
var loadedAssembly = LoadedAssemblies.FirstOrDefault(s => s.Name.Equals(name));
if (loadedAssembly != null)
{
Debug.Console(2, "Assembly already loaded.");
return true;
}
else
{
Debug.Console(2, "Assembly not loaded.");
return false;
}
}
/// <summary>
/// Used by console command to report the currently loaded assemblies and versions
/// </summary>
/// <param name="command"></param>
public static void ReportAssemblyVersions(string command)
{
Debug.Console(0, "Loaded Assemblies:");
foreach (var assembly in LoadedAssemblies)
{
Debug.Console(0, "{0} Version: {1}", assembly.Name, assembly.Version);
}
}
/// <summary>
/// Moves any .dll assemblies not already loaded from the plugins folder to loadedPlugins folder
/// </summary>
static void MoveDllAssemblies()
{
Debug.Console(0, "Looking for .dll assemblies from plugins folder...");
var pluginDi = new DirectoryInfo(_pluginDirectory);
var pluginFiles = pluginDi.GetFiles("*.dll");
if (pluginFiles.Length > 0)
{
if (!Directory.Exists(_loadedPluginsDirectoryPath))
{
Directory.CreateDirectory(_loadedPluginsDirectoryPath);
}
}
foreach (var pluginFile in pluginFiles)
{
try
{
Debug.Console(0, "Found .dll: {0}", pluginFile.Name);
if (!CheckIfAssemblyLoaded(pluginFile.Name))
{
string filePath = string.Empty;
filePath = _loadedPluginsDirectoryPath + Global.DirectorySeparator + pluginFile.Name;
// Check if there is a previous file in the loadedPlugins directory and delete
if (File.Exists(filePath))
{
Debug.Console(0, "Found existing file in loadedPlugins: {0} Deleting and moving new file to replace it", filePath);
File.Delete(filePath);
}
// Move the file
File.Move(pluginFile.FullName, filePath);
Debug.Console(2, "Moved {0} to {1}", pluginFile.FullName, filePath);
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Skipping assembly: {0}. There is already an assembly with that name loaded.", pluginFile.FullName);
}
}
catch (Exception e)
{
Debug.Console(2, "Error with plugin file {0} . Exception: {1}", pluginFile.FullName, e);
continue; //catching any load issues and continuing. There will be exceptions loading Crestron .dlls from the cplz Probably should do something different here
}
}
Debug.Console(0, "Done with .dll assemblies");
}
/// <summary>
/// Unzips each .cplz archive into the temp directory and moves any unloaded files into loadedPlugins
/// </summary>
static void UnzipAndMoveCplzArchives()
{
Debug.Console(0, "Looking for .cplz archives from plugins folder...");
var di = new DirectoryInfo(_pluginDirectory);
var zFiles = di.GetFiles("*.cplz");
if (zFiles.Length > 0)
{
if (!Directory.Exists(_loadedPluginsDirectoryPath))
{
Directory.CreateDirectory(_loadedPluginsDirectoryPath);
}
}
foreach (var zfi in zFiles)
{
Directory.CreateDirectory(_tempDirectory);
var tempDi = new DirectoryInfo(_tempDirectory);
Debug.Console(0, "Found cplz: {0}. Unzipping into temp plugins directory", zfi.Name);
var result = CrestronZIP.Unzip(zfi.FullName, tempDi.FullName);
Debug.Console(0, "UnZip Result: {0}", result.ToString());
var tempFiles = tempDi.GetFiles("*.dll");
foreach (var tempFile in tempFiles)
{
try
{
if (!CheckIfAssemblyLoaded(tempFile.Name))
{
string filePath = string.Empty;
filePath = _loadedPluginsDirectoryPath + Global.DirectorySeparator + tempFile.Name;
// Check if there is a previous file in the loadedPlugins directory and delete
if (File.Exists(filePath))
{
Debug.Console(0, "Found existing file in loadedPlugins: {0} Deleting and moving new file to replace it", filePath);
File.Delete(filePath);
}
// Move the file
File.Move(tempFile.FullName, filePath);
Debug.Console(2, "Moved {0} to {1}", tempFile.FullName, filePath);
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Skipping assembly: {0}. There is already an assembly with that name loaded.", tempFile.FullName);
}
}
catch (Exception e)
{
Debug.Console(2, "Assembly {0} is not a custom assembly. Exception: {1}", tempFile.FullName, e);
continue; //catching any load issues and continuing. There will be exceptions loading Crestron .dlls from the cplz Probably should do something different here
}
}
// Delete the .cplz and the temp directory
Directory.Delete(_tempDirectory, true);
zfi.Delete();
}
Debug.Console(0, "Done with .cplz archives");
}
/// <summary>
/// Attempts to load the assemblies from the loadedPlugins folder
/// </summary>
static void LoadPluginAssemblies()
{
Debug.Console(0, "Loading assemblies from loadedPlugins folder...");
var pluginDi = new DirectoryInfo(_loadedPluginsDirectoryPath);
var pluginFiles = pluginDi.GetFiles("*.dll");
Debug.Console(2, "Found {0} plugin assemblies to load", pluginFiles.Length);
foreach (var pluginFile in pluginFiles)
{
var loadedAssembly = LoadAssembly(pluginFile.FullName);
LoadedPluginFolderAssemblies.Add(loadedAssembly);
}
Debug.Console(0, "All Plugins Loaded.");
}
/// <summary>
/// Iterate the loaded assemblies and try to call the LoadPlugin method
/// </summary>
static void LoadCustomPluginTypes()
{
Debug.Console(0, "Loading Custom Plugin Types...");
foreach (var loadedAssembly in LoadedPluginFolderAssemblies)
{
// iteratate this assembly's classes, looking for "LoadPlugin()" methods
try
{
var assy = loadedAssembly.Assembly;
var types = assy.GetTypes();
foreach (var type in types)
{
try
{
if (typeof(IPluginDeviceFactory).IsAssignableFrom(type))
{
var plugin = (IPluginDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
LoadCustomPlugin(plugin, loadedAssembly);
}
else
{
var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static);
var loadPlugin = methods.FirstOrDefault(m => m.Name.Equals("LoadPlugin"));
if (loadPlugin != null)
{
LoadCustomLegacyPlugin(type, loadPlugin, loadedAssembly);
}
}
}
catch (Exception e)
{
Debug.Console(2, "Load Plugin not found. {0} is not a plugin assembly. Exception: {1}", loadedAssembly.Name, e);
continue;
}
}
}
catch (Exception e)
{
Debug.Console(2, "Error Loading Assembly: {0} Exception: (1) ", loadedAssembly.Name, e);
continue;
}
}
// plugin dll will be loaded. Any classes in plugin should have a static constructor
// that registers that class with the Core.DeviceFactory
Debug.Console(0, "Done Loading Custom Plugin Types.");
}
/// <summary>
/// Loads a
/// </summary>
/// <param name="plugin"></param>
static void LoadCustomPlugin(IPluginDeviceFactory plugin, LoadedAssembly loadedAssembly)
{
var passed = Global.IsRunningMinimumVersionOrHigher(plugin.MinimumEssentialsFrameworkVersion);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", plugin.MinimumEssentialsFrameworkVersion);
return;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", plugin.MinimumEssentialsFrameworkVersion);
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading plugin: {0}", loadedAssembly.Name);
plugin.LoadTypeFactories();
}
/// <summary>
/// Loads a a custom plugin via the legacy method
/// </summary>
/// <param name="type"></param>
/// <param name="loadPlugin"></param>
static void LoadCustomLegacyPlugin(CType type, MethodInfo loadPlugin, LoadedAssembly loadedAssembly)
{
Debug.Console(2, "LoadPlugin method found in {0}", type.Name);
var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static);
var minimumVersion = fields.FirstOrDefault(p => p.Name.Equals("MinimumEssentialsFrameworkVersion"));
if (minimumVersion != null)
{
Debug.Console(2, "MinimumEssentialsFrameworkVersion found");
var minimumVersionString = minimumVersion.GetValue(null) as string;
if (!string.IsNullOrEmpty(minimumVersionString))
{
var passed = Global.IsRunningMinimumVersionOrHigher(minimumVersionString);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", minimumVersionString);
return;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", minimumVersionString);
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion found but not set. Loading plugin, but your mileage may vary.");
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion not found. Loading plugin, but your mileage may vary.");
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading legacy plugin: {0}", loadedAssembly.Name);
loadPlugin.Invoke(null, null);
}
/// <summary>
/// Loads plugins
/// </summary>
public static void LoadPlugins()
{
if (Directory.Exists(_pluginDirectory))
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Plugins directory found, checking for plugins");
// Deal with any .dll files
MoveDllAssemblies();
// Deal with any .cplz files
UnzipAndMoveCplzArchives();
if (Directory.Exists(_loadedPluginsDirectoryPath))
{
// Load the assemblies from the loadedPlugins folder into the AppDomain
LoadPluginAssemblies();
// Load the types from any custom plugin assemblies
LoadCustomPluginTypes();
}
}
}
}
/// <summary>
/// Represents an assembly loaded at runtime and it's associated metadata
/// </summary>
public class LoadedAssembly
{
public string Name { get; private set; }
public string Version { get; private set; }
public Assembly Assembly { get; private set; }
public LoadedAssembly(string name, string version, Assembly assembly)
{
Name = name;
Version = version;
Assembly = assembly;
}
}
}

View File

@@ -1,300 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
/// <summary>
///
/// </summary>
public static class IRoutingInputsExtensions
{
/// <summary>
/// Gets any existing route for a destination, clears it, and then
/// </summary>
public static void ReleaseAndMakeRoute(this IRoutingInputs destination, IRoutingOutputs source, eRoutingSignalType signalType)
{
var sw = new Stopwatch();
sw.Start();
destination.ReleaseRoute();
if (source == null) return;
var newRoute = destination.GetRouteToSource(source, signalType);
if (newRoute == null) return;
RouteDescriptorCollection.DefaultCollection.AddRouteDescriptor(newRoute);
Debug.Console(2, destination, "Executing new route");
newRoute.ExecuteRoutes();
sw.Stop();
Debug.Console(2, destination, "Route took {0} ms", sw.ElapsedMilliseconds);
}
/// <summary>
/// Will release the existing route on the destination
/// </summary>
/// <param name="destination"></param>
/// <param name="signalType"></param>
public static void ReleaseRoute(this IRoutingInputs destination)
{
var current = RouteDescriptorCollection.DefaultCollection.RemoveRouteDescriptor(destination);
if (current != null)
{
Debug.Console(2, destination, "Releasing current route: {0}", current.Source.Key);
current.ReleaseRoutes();
}
}
/// <summary>
///
/// </summary>
/// <param name="device"></param>
/// <param name="targetSource"></param>
/// <param name="signalType"></param>
/// <returns></returns>
public static RouteDescriptor GetRouteToSource(this IRoutingInputs destination, IRoutingOutputs source, eRoutingSignalType signalType)
{
var routeTable = new RouteDescriptor (source, destination, signalType);
Debug.Console(0, destination, "Attempting to build source route from {0}***", source.Key);
if (!destination.GetRouteToSource(source, null, null, signalType, 0, routeTable))
routeTable = null;
Debug.Console(0, destination, "Route{0} discovered ***", routeTable == null ? " NOT" : "");
return routeTable;
}
/// <summary>
/// The recursive part of this. Will stop on each device, search its inputs for the
/// desired source and if not found, invoke this function for the each input port
/// hoping to find the source.
/// </summary>
/// <param name="destination"></param>
/// <param name="source"></param>
/// <param name="onSuccessOutputPort"></param>
/// <param name="alreadyCheckedDevices"></param>
/// <param name="signalType"></param>
/// <param name="cycle"></param>
/// <param name="routeTable"></param>
/// <returns>true if source is hit</returns>
static bool GetRouteToSource(this IRoutingInputs destination, IRoutingOutputs source,
RoutingOutputPort onSuccessOutputPort, List<IRoutingInputsOutputs> alreadyCheckedDevices,
eRoutingSignalType signalType, int cycle, RouteDescriptor routeTable)
{
cycle++;
Debug.Console(0, destination, "SelectInput-cycle {1}. Finding {2} route back to {0}", source.Key, cycle, signalType);
var destDevInputTies = TieLineCollection.Default.Where(t =>
t.DestinationPort.ParentDevice == destination && (t.Type == signalType || t.Type == eRoutingSignalType.AudioVideo));
// find a direct tie
var directTie = destDevInputTies.FirstOrDefault(
t => !(t.SourcePort.ParentDevice is IRoutingInputsOutputs)
&& t.DestinationPort.ParentDevice == destination
&& t.SourcePort.ParentDevice == source);
RoutingInputPort inputPort = null;
if (directTie != null) // Found a tie directly to the source
{
Debug.Console(0, destination, "Found direct tie to {0}**", source.Key);
inputPort = directTie.DestinationPort;
}
else // no direct-connect. Walk back devices.
{
Debug.Console(0, destination, "is not directly connected to {0}. Walking down tie lines", source.Key);
// No direct tie? Run back out on the inputs' attached devices...
// Only the ones that are routing devices
var attachedMidpoints = destDevInputTies.Where(t => t.SourcePort.ParentDevice is IRoutingInputsOutputs);
foreach (var inputTieToTry in attachedMidpoints)
{
Debug.Console(0, destination, "Trying to find route on {0}", inputTieToTry.SourcePort.ParentDevice.Key);
var upstreamDeviceOutputPort = inputTieToTry.SourcePort;
var upstreamRoutingDevice = upstreamDeviceOutputPort.ParentDevice as IRoutingInputsOutputs;
// Check if this previous device has already been walked
if (!(alreadyCheckedDevices != null && alreadyCheckedDevices.Contains(upstreamRoutingDevice)))
{
// haven't seen this device yet. Do it. Pass the output port to the next
// level to enable switching on success
var upstreamRoutingSuccess = upstreamRoutingDevice.GetRouteToSource(source, upstreamDeviceOutputPort,
alreadyCheckedDevices, signalType, cycle, routeTable);
if (upstreamRoutingSuccess)
{
Debug.Console(0, destination, "Upstream device route found");
inputPort = inputTieToTry.DestinationPort;
break; // Stop looping the inputs in this cycle
}
}
}
}
// we have a route on corresponding inputPort. *** Do the route ***
if (inputPort != null)
{
Debug.Console(0, destination, "adding route:");
if (onSuccessOutputPort == null)
{
// it's a sink device
routeTable.Routes.Add(new RouteSwitchDescriptor(inputPort));
}
else if (destination is IRouting)
{
routeTable.Routes.Add(new RouteSwitchDescriptor (onSuccessOutputPort, inputPort));
}
else // device is merely IRoutingInputOutputs
Debug.Console(0, destination, " No routing. Passthrough device");
Debug.Console(0, destination, "Exiting cycle {0}", cycle);
return true;
}
if(alreadyCheckedDevices == null)
alreadyCheckedDevices = new List<IRoutingInputsOutputs>();
alreadyCheckedDevices.Add(destination as IRoutingInputsOutputs);
Debug.Console(0, destination, "No route found to {0}", source.Key);
return false;
}
}
// MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE
/// <summary>
/// A collection of routes - typically the global DefaultCollection is used
/// </summary>
public class RouteDescriptorCollection
{
public static RouteDescriptorCollection DefaultCollection
{
get
{
if (_DefaultCollection == null)
_DefaultCollection = new RouteDescriptorCollection();
return _DefaultCollection;
}
}
static RouteDescriptorCollection _DefaultCollection;
List<RouteDescriptor> RouteDescriptors = new List<RouteDescriptor>();
public void AddRouteDescriptor(RouteDescriptor descriptor)
{
if (RouteDescriptors.Any(t => t.Destination == descriptor.Destination))
{
Debug.Console(1, descriptor.Destination,
"Route to [{0}] already exists in global routes table", descriptor.Source.Key);
return;
}
RouteDescriptors.Add(descriptor);
}
public RouteDescriptor GetRouteDescriptorForDestination(IRoutingInputs destination)
{
return RouteDescriptors.FirstOrDefault(rd => rd.Destination == destination);
}
/// <summary>
/// Returns the RouteDescriptor for a given destination and removes it from collection.
/// Returns null if no route with the provided destination exists.
/// </summary>
public RouteDescriptor RemoveRouteDescriptor(IRoutingInputs destination)
{
var descr = GetRouteDescriptorForDestination(destination);
if (descr != null)
RouteDescriptors.Remove(descr);
return descr;
}
}
/// <summary>
/// Represents an collection of individual route steps between Source and Destination
/// </summary>
public class RouteDescriptor
{
public IRoutingInputs Destination { get; private set; }
public IRoutingOutputs Source { get; private set; }
public eRoutingSignalType SignalType { get; private set; }
public List<RouteSwitchDescriptor> Routes { get; private set; }
public RouteDescriptor(IRoutingOutputs source, IRoutingInputs destination, eRoutingSignalType signalType)
{
Destination = destination;
Source = source;
SignalType = signalType;
Routes = new List<RouteSwitchDescriptor>();
}
public void ExecuteRoutes()
{
foreach (var route in Routes)
{
Debug.Console(2, route.ToString());
if (route.SwitchingDevice is IRoutingSinkWithSwitching)
(route.SwitchingDevice as IRoutingSinkWithSwitching).ExecuteSwitch(route.InputPort.Selector);
else if (route.SwitchingDevice is IRouting)
{
(route.SwitchingDevice as IRouting).ExecuteSwitch(route.InputPort.Selector, route.OutputPort.Selector, SignalType);
route.OutputPort.InUseTracker.AddUser(Destination, "destination");
}
}
}
public void ReleaseRoutes()
{
foreach (var route in Routes)
{
if (route.SwitchingDevice is IRouting)
{
// Pull the route from the port. Whatever is watching the output's in use tracker is
// responsible for responding appropriately.
route.OutputPort.InUseTracker.RemoveUser(Destination, "destination");
}
}
}
public override string ToString()
{
var routesText = Routes.Select(r => r.ToString()).ToArray();
return string.Format("Route table from {0} to {1}:\r{2}", Source.Key, Destination.Key, string.Join("\r", routesText));
}
}
/// <summary>
/// Represents an individual link for a route
/// </summary>
public class RouteSwitchDescriptor
{
public IRoutingInputs SwitchingDevice { get { return InputPort.ParentDevice; } }
public RoutingOutputPort OutputPort { get; set; }
public RoutingInputPort InputPort { get; set; }
public RouteSwitchDescriptor(RoutingInputPort inputPort)
{
InputPort = inputPort;
}
public RouteSwitchDescriptor(RoutingOutputPort outputPort, RoutingInputPort inputPort)
{
InputPort = inputPort;
OutputPort = outputPort;
}
public override string ToString()
{
if(OutputPort == null) // IRoutingSink
return string.Format("{0} switches to input '{1}'", SwitchingDevice.Key, InputPort.Selector);
return string.Format("{0} switches output '{1}' to input '{2}'", SwitchingDevice.Key, OutputPort.Selector, InputPort.Selector);
}
}
}

View File

@@ -1,57 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
//*******************************************************************************************
// Interfaces
public interface IRoutingInputs : IKeyed
{
RoutingPortCollection<RoutingInputPort> InputPorts { get; }
}
public interface IRoutingOutputs : IKeyed
{
RoutingPortCollection<RoutingOutputPort> OutputPorts { get; }
}
/// <summary>
/// For fixed-source endpoint devices
/// </summary>
public interface IRoutingSinkNoSwitching : IRoutingInputs
{
}
public interface IRoutingSinkWithSwitching : IRoutingSinkNoSwitching
{
//void ClearRoute();
void ExecuteSwitch(object inputSelector);
}
/// <summary>
/// For devices like RMCs, baluns, other devices with no switching.
/// </summary>
public interface IRoutingInputsOutputs : IRoutingInputs, IRoutingOutputs
{
}
public interface IRouting : IRoutingInputsOutputs
{
//void ClearRoute(object outputSelector);
void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType);
}
public interface IRoutingSource : IRoutingOutputs
{
}
}

View File

@@ -1,144 +0,0 @@
using System;
using System.Collections.Generic;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Base class for RoutingInput and Output ports
/// </summary>
public abstract class RoutingPort : IKeyed
{
public string Key { get; private set; }
public eRoutingSignalType Type { get; private set; }
public eRoutingPortConnectionType ConnectionType { get; private set; }
public readonly object Selector;
public bool IsInternal { get; private set; }
public RoutingPort(string key, eRoutingSignalType type, eRoutingPortConnectionType connType, object selector, bool isInternal)
{
Key = key;
Type = type;
ConnectionType = connType;
Selector = selector;
IsInternal = IsInternal;
}
}
public enum eRoutingSignalType
{
Audio,
Video,
AudioVideo
}
public enum eRoutingPortConnectionType
{
None, BackplaneOnly, Hdmi, Rgb, Vga, LineAudio, DigitalAudio, Sdi, Composite, Component, DmCat, DmMmFiber, DmSmFiber
}
/// <summary>
/// Basic RoutingInput with no statuses.
/// </summary>
public class RoutingInputPort : RoutingPort
{
/// <summary>
/// The IRoutingInputs object this lives on
/// </summary>
public IRoutingInputs ParentDevice { get; private set; }
/// <summary>
/// Constructor for a basic RoutingInputPort
/// </summary>
/// <param name="selector">An object used to refer to this port in the IRouting device's ExecuteSwitch method.
/// May be string, number, whatever</param>
/// <param name="parent">The IRoutingInputs object this lives on</param>
public RoutingInputPort(string key, eRoutingSignalType type, eRoutingPortConnectionType connType,
object selector, IRoutingInputs parent)
: this (key, type, connType, selector, parent, false)
{
}
/// <summary>
/// Constructor for a virtual routing input port that lives inside a device. For example
/// the ports that link a DM card to a DM matrix bus
/// </summary>
/// <param name="isInternal">true for internal ports</param>
public RoutingInputPort(string key, eRoutingSignalType type, eRoutingPortConnectionType connType,
object selector, IRoutingInputs parent, bool isInternal)
: base(key, type, connType, selector, isInternal)
{
if (parent == null)
throw new ArgumentNullException("parent");
ParentDevice = parent;
}
}
/// <summary>
/// A RoutingInputPort for devices like DM-TX and DM input cards.
/// Will provide video statistics on connected signals
/// </summary>
public class RoutingInputPortWithVideoStatuses : RoutingInputPort
{
/// <summary>
/// Video statuses attached to this port
/// </summary>
public VideoStatusOutputs VideoStatus { get; private set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="selector">An object used to refer to this port in the IRouting device's ExecuteSwitch method.
/// May be string, number, whatever</param>
/// <param name="parent">The IRoutingInputs object this lives on</param>
/// <param name="funcs">A VideoStatusFuncsWrapper used to assign the callback funcs that will get
/// the values for the various stats</param>
public RoutingInputPortWithVideoStatuses(string key,
eRoutingSignalType type, eRoutingPortConnectionType connType, object selector,
IRoutingInputs parent, VideoStatusFuncsWrapper funcs) :
base(key, type, connType, selector, parent)
{
VideoStatus = new VideoStatusOutputs(funcs);
}
}
public class RoutingOutputPort : RoutingPort
{
/// <summary>
/// The IRoutingOutputs object this port lives on
/// </summary>
public IRoutingOutputs ParentDevice { get; private set; }
public InUseTracking InUseTracker { get; private set; }
/// <summary>
/// </summary>
/// <param name="selector">An object used to refer to this port in the IRouting device's ExecuteSwitch method.
/// May be string, number, whatever</param>
/// <param name="parent">The IRoutingOutputs object this port lives on</param>
public RoutingOutputPort(string key, eRoutingSignalType type, eRoutingPortConnectionType connType,
object selector, IRoutingOutputs parent)
: this(key, type, connType, selector, parent, false)
{
}
public RoutingOutputPort(string key, eRoutingSignalType type, eRoutingPortConnectionType connType,
object selector, IRoutingOutputs parent, bool isInternal)
: base(key, type, connType, selector, isInternal)
{
if (parent == null)
throw new ArgumentNullException("parent");
ParentDevice = parent;
InUseTracker = new InUseTracking();
}
public override string ToString()
{
return ParentDevice.Key + ":" + Key;
}
}
}

View File

@@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Basically a List , with an indexer to find ports by key name
/// </summary>
public class RoutingPortCollection<T> : List<T> where T: RoutingPort
{
/// <summary>
/// Case-insensitive port lookup linked to ports' keys
/// </summary>
public T this[string key]
{
get
{
return this.FirstOrDefault(i => i.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
}
}
}
}

View File

@@ -1,142 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
public class TieLine
{
public RoutingOutputPort SourcePort { get; private set; }
public RoutingInputPort DestinationPort { get; private set; }
public int InUseCount { get { return DestinationUsingThis.Count; } }
/// <summary>
/// Gets the type of this tie line. Will either be the type of the desination port
/// or the type of OverrideType when it is set.
/// </summary>
public eRoutingSignalType Type
{
get
{
if (OverrideType.HasValue) return OverrideType.Value;
return DestinationPort.Type;
}
}
/// <summary>
/// Use this to override the Type property for the destination port. For example,
/// when the tie line is type AudioVideo, and the signal flow should be limited to
/// Audio-only or Video only, changing this type will alter the signal paths
/// available to the routing algorithm without affecting the actual Type
/// of the destination port.
/// </summary>
public eRoutingSignalType? OverrideType { get; set; }
List<IRoutingInputs> DestinationUsingThis = new List<IRoutingInputs>();
/// <summary>
/// For tie lines that represent internal links, like from cards to the matrix in a DM.
/// This property is true if SourcePort and DestinationPort IsInternal
/// property are both true
/// </summary>
public bool IsInternal { get { return SourcePort.IsInternal && DestinationPort.IsInternal; } }
public bool TypeMismatch { get { return SourcePort.Type != DestinationPort.Type; } }
public bool ConnectionTypeMismatch { get { return SourcePort.ConnectionType != DestinationPort.ConnectionType; } }
public string TypeMismatchNote { get; set; }
/// <summary>
///
/// </summary>
/// <param name="sourcePort"></param>
/// <param name="destinationPort"></param>
public TieLine(RoutingOutputPort sourcePort, RoutingInputPort destinationPort)
{
if (sourcePort == null || destinationPort == null)
throw new ArgumentNullException("source or destination port");
SourcePort = sourcePort;
DestinationPort = destinationPort;
}
/// <summary>
/// Creates a tie line with an overriding Type. See help for OverrideType property for info
/// </summary>
/// <param name="overrideType">The signal type to limit the link to. Overrides DestinationPort.Type</param>
public TieLine(RoutingOutputPort sourcePort, RoutingInputPort destinationPort, eRoutingSignalType overrideType) :
this(sourcePort, destinationPort)
{
OverrideType = overrideType;
}
public static TieLine TieLineFromStrings(string sourceKey, string sourcePortKey, string destinationKey, string destinationPortKey)
{
var sourceDev = DeviceManager.GetDeviceForKey(sourceKey) as IRoutingOutputs;
if (sourceDev == null)
{
Debug.Console(1, "WARNING: Cannot create tie line, routable source '{0}' not found", sourceKey);
return null;
}
var destDev = DeviceManager.GetDeviceForKey(destinationKey) as IRoutingInputs;
if (destDev == null)
{
Debug.Console(1, "WARNING: Cannot create tie line, routable destination '{0}' not found", destinationKey);
return null;
}
var sourcePort = sourceDev.OutputPorts[sourcePortKey];
if (sourcePort == null)
{
Debug.Console(1, "WARNING: Cannot create tie line. Source '{0}' does not contain port '{1}'", sourceKey, sourcePortKey);
return null;
}
var destPort = destDev.InputPorts[destinationPortKey];
if (destPort == null)
{
Debug.Console(1, "WARNING: Cannot create tie line. Destination '{0}' does not contain port '{1}'", destinationKey, destinationPortKey);
return null;
}
return new TieLine(sourcePort, destPort);
}
/// <summary>
/// Will link up video status from supporting inputs to connected outputs
/// </summary>
public void Activate()
{
// Now does nothing
}
public void Deactivate()
{
// Now does nothing
}
public override string ToString()
{
return string.Format("Tie line: [{0}]{1} --> [{2}]{3}", SourcePort.ParentDevice.Key, SourcePort.Key,
DestinationPort.ParentDevice.Key, DestinationPort.Key);
}
}
//********************************************************************************
public class TieLineCollection : List<TieLine>
{
public static TieLineCollection Default
{
get
{
if (_Default == null)
_Default = new TieLineCollection();
return _Default;
}
}
static TieLineCollection _Default;
}
}

View File

@@ -28,7 +28,6 @@ namespace PepperDash.Essentials.Core.Touchpanels
_Touchpanel.ButtonStateChange += new Crestron.SimplSharpPro.DeviceSupport.ButtonEventHandler(_Touchpanel_ButtonStateChange);
AddPostActivationAction(() =>
{
// Link up the button feedbacks to the specified BoolFeedbacks
@@ -40,7 +39,7 @@ namespace PepperDash.Essentials.Core.Touchpanels
{
var bKey = button.Key.ToLower();
var feedback = device.GetFeedbackProperty(feedbackConfig.BoolFeedbackName);
var feedback = device.GetFeedbackProperty(feedbackConfig.FeedbackName);
var bFeedback = feedback as BoolFeedback;
var iFeedback = feedback as IntFeedback;
@@ -72,7 +71,7 @@ namespace PepperDash.Essentials.Core.Touchpanels
}
else
{
Debug.Console(1, this, "Unable to get BoolFeedback with name: {0} from device: {1}", feedbackConfig.BoolFeedbackName, device.Key);
Debug.Console(1, this, "Unable to get BoolFeedback with name: {0} from device: {1}", feedbackConfig.FeedbackName, device.Key);
}
}
else
@@ -140,6 +139,6 @@ namespace PepperDash.Essentials.Core.Touchpanels
public class KeypadButtonFeedback
{
public string DeviceKey { get; set; }
public string BoolFeedbackName { get; set; }
public string FeedbackName { get; set; }
}
}

View File

@@ -1,159 +1,159 @@
<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="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="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
<Compile Include="AirMedia\AirMediaController.cs" />
<Compile Include="Chassis\DmBladeChassisController.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="Endpoints\Transmitters\TxInterfaces.cs" />
<Compile Include="IDmSwitch.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\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="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="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="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
<Compile Include="AirMedia\AirMediaController.cs" />
<Compile Include="Chassis\DmBladeChassisController.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="Endpoints\Transmitters\TxInterfaces.cs" />
<Compile Include="IDmSwitch.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\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="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

@@ -1,7 +1,7 @@
using System.Reflection;
using Crestron.SimplSharp.Reflection;
[assembly: System.Reflection.AssemblyTitle("Essentials_DM")]
[assembly: System.Reflection.AssemblyTitle("PepperDash_Essentials_DM")]
[assembly: System.Reflection.AssemblyCompany("PepperDash Technology Corp")]
[assembly: System.Reflection.AssemblyProduct("PepperDashEssentials")]
[assembly: System.Reflection.AssemblyCopyright("Copyright © PepperDash Technology Corp 2020")]