mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
fix(MockVC): various fixes for local testing
update MockVC and EssentialsVideoCodecUiDriver updates to Cisco classes to address some exceptions at startup with EssentialsVideoCodecUiDriver
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ControlSystem>
|
<ControlSystem>
|
||||||
<Name>192.168.10.1</Name>
|
<Name>Test RMC3</Name>
|
||||||
<Address>auto 192.168.10.1</Address>
|
<Address>auto 192.168.1.40;username crestron</Address>
|
||||||
<ProgramSlot>Program01</ProgramSlot>
|
<ProgramSlot>Program01</ProgramSlot>
|
||||||
<Storage>Internal Flash</Storage>
|
<Storage>Internal Flash</Storage>
|
||||||
</ControlSystem>
|
</ControlSystem>
|
||||||
@@ -448,10 +448,10 @@ namespace PepperDash.Essentials
|
|||||||
// and the LastMeetingDismissed != this meeting
|
// and the LastMeetingDismissed != this meeting
|
||||||
|
|
||||||
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
|
var lastMeetingDismissed = meetings.FirstOrDefault(m => m.Id == LastMeetingDismissedId);
|
||||||
Debug.Console(1, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
|
//Debug.Console(1, "*#* Room on: {0}, lastMeetingDismissedId: {1} {2} *#*",
|
||||||
CurrentRoom.OnFeedback.BoolValue,
|
// CurrentRoom.OnFeedback.BoolValue,
|
||||||
LastMeetingDismissedId,
|
// LastMeetingDismissedId,
|
||||||
lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToShortTimeString() : "");
|
// lastMeetingDismissed != null ? lastMeetingDismissed.StartTime.ToShortTimeString() : "");
|
||||||
|
|
||||||
var meeting = meetings.LastOrDefault(m => m.Joinable);
|
var meeting = meetings.LastOrDefault(m => m.Joinable);
|
||||||
if (CurrentRoom.OnFeedback.BoolValue
|
if (CurrentRoom.OnFeedback.BoolValue
|
||||||
|
|||||||
@@ -123,12 +123,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
||||||
|
|
||||||
// If the codec is ready, then get the values we want, otherwise wait
|
|
||||||
if (Codec.IsReady)
|
|
||||||
Codec_IsReady();
|
|
||||||
else
|
|
||||||
codec.IsReadyChange += (o, a) => Codec_IsReady();
|
|
||||||
|
|
||||||
//InCall = new BoolFeedback(() => false);
|
//InCall = new BoolFeedback(() => false);
|
||||||
LocalPrivacyIsMuted = new BoolFeedback(() => false);
|
LocalPrivacyIsMuted = new BoolFeedback(() => false);
|
||||||
|
|
||||||
@@ -199,6 +193,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500,
|
triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500,
|
||||||
StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress);
|
StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress);
|
||||||
|
|
||||||
|
// If the codec is ready, then get the values we want, otherwise wait
|
||||||
|
if (Codec.IsReady)
|
||||||
|
Codec_IsReady();
|
||||||
|
else
|
||||||
|
codec.IsReadyChange += (o, a) => Codec_IsReady();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -518,7 +520,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
VCControlsInterlock.StatusChanged += new EventHandler<StatusChangedEventArgs>(VCControlsInterlock_StatusChanged);
|
VCControlsInterlock.StatusChanged += new EventHandler<StatusChangedEventArgs>(VCControlsInterlock_StatusChanged);
|
||||||
|
|
||||||
|
|
||||||
var codecOffCameras = Codec as IHasCameraOff;
|
var codecOffCameras = Codec as IHasCameraOff;
|
||||||
|
|
||||||
var supportsCameraOffMode = Codec.SupportsCameraOff;
|
var supportsCameraOffMode = Codec.SupportsCameraOff;
|
||||||
@@ -529,6 +530,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
if (codecAutoCameras != null && supportsAutoCameraMode)
|
if (codecAutoCameras != null && supportsAutoCameraMode)
|
||||||
{
|
{
|
||||||
|
|
||||||
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
|
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
|
||||||
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
|
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
|
||||||
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
|
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
|
||||||
@@ -558,6 +560,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manual button always visible
|
// Manual button always visible
|
||||||
@@ -569,6 +572,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
if (codecOffCameras != null && supportsCameraOffMode)
|
if (codecOffCameras != null && supportsCameraOffMode)
|
||||||
{
|
{
|
||||||
|
|
||||||
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true;
|
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true;
|
||||||
codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]);
|
codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]);
|
||||||
CameraModeList.SetItemButtonAction(3, (b) => codecOffCameras.CameraOff());
|
CameraModeList.SetItemButtonAction(3, (b) => codecOffCameras.CameraOff());
|
||||||
@@ -596,6 +600,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -352,8 +352,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
CallHistory = new CodecCallHistory();
|
CallHistory = new CodecCallHistory();
|
||||||
|
|
||||||
|
if (props.Favorites != null)
|
||||||
if (props.Favorites != null)
|
|
||||||
{
|
{
|
||||||
CallFavorites = new CodecCallFavorites();
|
CallFavorites = new CodecCallFavorites();
|
||||||
CallFavorites.Favorites = props.Favorites;
|
CallFavorites.Favorites = props.Favorites;
|
||||||
@@ -369,9 +368,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
CodecSchedule = new CodecScheduleAwareness();
|
CodecSchedule = new CodecScheduleAwareness();
|
||||||
|
|
||||||
//Set Feedback Actions
|
|
||||||
SetFeedbackActions();
|
|
||||||
|
|
||||||
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
|
||||||
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
@@ -406,6 +402,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
BrandingEnabled = props.UiBranding.Enable;
|
BrandingEnabled = props.UiBranding.Enable;
|
||||||
|
|
||||||
_brandingUrl = props.UiBranding.BrandingUrl;
|
_brandingUrl = props.UiBranding.BrandingUrl;
|
||||||
|
|
||||||
|
//Set Feedback Actions
|
||||||
|
SetFeedbackActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetFeedbackActions()
|
private void SetFeedbackActions()
|
||||||
@@ -429,11 +428,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Error setting MainVideuMute Action: {0}", ex);
|
Debug.Console(0, this, "Error setting MainVideoMute Action: {0}", ex);
|
||||||
|
|
||||||
if (ex.InnerException != null)
|
if (ex.InnerException != null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Error setting MainVideuMute Action: {0}", ex);
|
Debug.Console(0, this, "Error setting MainVideoMute Action: {0}", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1879,17 +1878,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (CodecStatus.Status.SIP != null && CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null)
|
try
|
||||||
{
|
{
|
||||||
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
|
if (CodecStatus.Status.SIP != null && CodecStatus.Status.SIP.AlternateURI != null)
|
||||||
|
{
|
||||||
|
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
|
||||||
|
}
|
||||||
|
else if (CodecStatus.Status.UserInterface != null &&
|
||||||
|
CodecStatus.Status.UserInterface.ContactInfo != null && CodecStatus.Status.UserInterface.ContactInfo != null)
|
||||||
|
{
|
||||||
|
return CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return string.Empty;
|
||||||
}
|
}
|
||||||
else if (CodecStatus.Status.UserInterface != null &&
|
catch (Exception e)
|
||||||
CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value != null)
|
|
||||||
{
|
{
|
||||||
return CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value;
|
Debug.Console(2, "Error getting SipUri: {0}", e);
|
||||||
}
|
|
||||||
else
|
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public SpeakerTrack()
|
public SpeakerTrack()
|
||||||
{
|
{
|
||||||
Status = new Status2();
|
Status = new Status2();
|
||||||
|
Availability = new Availability();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -416,8 +416,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
m.MinutesBeforeMeeting = 5;
|
m.MinutesBeforeMeeting = 5;
|
||||||
m.Id = i.ToString();
|
m.Id = i.ToString();
|
||||||
m.Organizer = "Employee " + 1;
|
m.Organizer = "Employee " + 1;
|
||||||
m.StartTime = DateTime.Now.AddMinutes(6).AddHours(i);
|
m.StartTime = DateTime.Now.AddMinutes(5).AddHours(i);
|
||||||
m.EndTime = DateTime.Now.AddHours(i).AddMinutes(16);
|
m.EndTime = DateTime.Now.AddHours(i).AddMinutes(50);
|
||||||
m.Title = "Meeting " + i;
|
m.Title = "Meeting " + i;
|
||||||
m.Calls.Add(new Call() { Number = i + "meeting@fake.com"});
|
m.Calls.Add(new Call() { Number = i + "meeting@fake.com"});
|
||||||
_CodecSchedule.Meetings.Add(m);
|
_CodecSchedule.Meetings.Add(m);
|
||||||
@@ -583,6 +583,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
CameraAutoModeIsOnFeedback = new BoolFeedback(() => _CameraAutoModeIsOn);
|
CameraAutoModeIsOnFeedback = new BoolFeedback(() => _CameraAutoModeIsOn);
|
||||||
|
|
||||||
|
SupportsCameraAutoMode = true;
|
||||||
|
|
||||||
CameraAutoModeIsOnFeedback.FireUpdate();
|
CameraAutoModeIsOnFeedback.FireUpdate();
|
||||||
|
|
||||||
DeviceManager.AddDevice(internalCamera);
|
DeviceManager.AddDevice(internalCamera);
|
||||||
@@ -590,7 +592,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
NearEndPresets = new List<CodecRoomPreset>(15); // Fix the capacity to emulate Cisco
|
NearEndPresets = new List<CodecRoomPreset>(15); // Fix the capacity to emulate Cisco
|
||||||
|
|
||||||
NearEndPresets = PropertiesConfig.Presets;
|
if (PropertiesConfig.Presets != null && PropertiesConfig.Presets.Count > 0)
|
||||||
|
{
|
||||||
|
NearEndPresets = PropertiesConfig.Presets;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= NearEndPresets.Capacity; i++)
|
||||||
|
{
|
||||||
|
var label = string.Format("Near End Preset {0}", i);
|
||||||
|
NearEndPresets.Add(new CodecRoomPreset(i, label, true, false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FarEndRoomPresets = new List<CodecRoomPreset>(15); // Fix the capacity to emulate Cisco
|
FarEndRoomPresets = new List<CodecRoomPreset>(15); // Fix the capacity to emulate Cisco
|
||||||
|
|
||||||
|
|||||||
@@ -18,5 +18,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
[JsonProperty("presets")]
|
[JsonProperty("presets")]
|
||||||
public List<CodecRoomPreset> Presets { get; set; }
|
public List<CodecRoomPreset> Presets { get; set; }
|
||||||
|
|
||||||
|
public MockVcPropertiesConfig()
|
||||||
|
{
|
||||||
|
Favorites = new List<CodecActiveCallItem>();
|
||||||
|
Presets = new List<CodecRoomPreset>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user