mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Merge branch 'main' into feature/add-fusion-joinmaps
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -28,6 +28,33 @@ namespace PepperDash.Essentials
|
|||||||
private Dictionary<string, string> _currentPresets;
|
private Dictionary<string, string> _currentPresets;
|
||||||
private ScheduledEventGroup _roomScheduledEventGroup;
|
private ScheduledEventGroup _roomScheduledEventGroup;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
protected override Func<bool> IsWarmingFeedbackFunc
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return () =>
|
||||||
|
{
|
||||||
|
return _displays.All(kv => kv.Value.IsWarmingUpFeedback.BoolValue);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
protected override Func<bool> IsCoolingFeedbackFunc
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return () =>
|
||||||
|
{
|
||||||
|
return _displays.All(kv => kv.Value.IsCoolingDownFeedback.BoolValue);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public EssentialsTechRoom(DeviceConfig config) : base(config)
|
public EssentialsTechRoom(DeviceConfig config) : base(config)
|
||||||
{
|
{
|
||||||
_config = config.Properties.ToObject<EssentialsTechRoomConfig>();
|
_config = config.Properties.ToObject<EssentialsTechRoomConfig>();
|
||||||
@@ -111,7 +138,12 @@ namespace PepperDash.Essentials
|
|||||||
foreach (var display in _displays)
|
foreach (var display in _displays)
|
||||||
{
|
{
|
||||||
display.Value.PowerIsOnFeedback.OutputChange +=
|
display.Value.PowerIsOnFeedback.OutputChange +=
|
||||||
(sender, args) => RoomPowerIsOnFeedback.InvokeFireUpdate();
|
(sender, args) =>
|
||||||
|
{
|
||||||
|
RoomPowerIsOnFeedback.InvokeFireUpdate();
|
||||||
|
IsWarmingUpFeedback.InvokeFireUpdate();
|
||||||
|
IsCoolingDownFeedback.InvokeFireUpdate();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,8 +261,16 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
CrestronInvoke.BeginInvoke((o) =>
|
CrestronInvoke.BeginInvoke((o) =>
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "There are {0} actions to execute for this event.", eventConfig.Actions.Count);
|
||||||
|
|
||||||
foreach (var a in eventConfig.Actions)
|
foreach (var a in eventConfig.Actions)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this,
|
||||||
|
@"Attempting to run action:
|
||||||
|
DeviceKey: {0}
|
||||||
|
MethodName: {1}
|
||||||
|
Params: {2}"
|
||||||
|
, a.DeviceKey, a.MethodName, a.Params);
|
||||||
DeviceJsonApi.DoDeviceAction(a);
|
DeviceJsonApi.DoDeviceAction(a);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -239,6 +279,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
public void RoomPowerOn()
|
public void RoomPowerOn()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Room Powering On");
|
||||||
|
|
||||||
var dummySource = DeviceManager.GetDeviceForKey(_config.DummySourceKey) as IRoutingOutputs;
|
var dummySource = DeviceManager.GetDeviceForKey(_config.DummySourceKey) as IRoutingOutputs;
|
||||||
|
|
||||||
if (dummySource == null)
|
if (dummySource == null)
|
||||||
@@ -255,6 +297,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
public void RoomPowerOff()
|
public void RoomPowerOff()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "Room Powering Off");
|
||||||
|
|
||||||
foreach (var display in _displays)
|
foreach (var display in _displays)
|
||||||
{
|
{
|
||||||
display.Value.PowerOff();
|
display.Value.PowerOff();
|
||||||
@@ -281,16 +325,6 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
#region Overrides of EssentialsRoomBase
|
#region Overrides of EssentialsRoomBase
|
||||||
|
|
||||||
protected override Func<bool> IsWarmingFeedbackFunc
|
|
||||||
{
|
|
||||||
get { return () => false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override Func<bool> IsCoolingFeedbackFunc
|
|
||||||
{
|
|
||||||
get { return () => false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override Func<bool> OnFeedbackFunc
|
protected override Func<bool> OnFeedbackFunc
|
||||||
{
|
{
|
||||||
get { return () => RoomPowerIsOn; }
|
get { return () => RoomPowerIsOn; }
|
||||||
@@ -358,6 +392,8 @@ namespace PepperDash.Essentials
|
|||||||
feedback.Value.FireUpdate();
|
feedback.Value.FireUpdate();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
@@ -366,6 +402,8 @@ namespace PepperDash.Essentials
|
|||||||
var tuner = setTopBox;
|
var tuner = setTopBox;
|
||||||
|
|
||||||
trilist.SetStringSigAction(joinMap.CurrentPreset.JoinNumber + i, s => _tunerPresets.Dial(s, tuner.Value));
|
trilist.SetStringSigAction(joinMap.CurrentPreset.JoinNumber + i, s => _tunerPresets.Dial(s, tuner.Value));
|
||||||
|
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bridge API using EISC
|
/// Bridge API using EISC
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EiscApiAdvanced : BridgeApi
|
public class EiscApiAdvanced : BridgeApi, ICommunicationMonitor
|
||||||
{
|
{
|
||||||
public EiscApiPropertiesConfig PropertiesConfig { get; private set; }
|
public EiscApiPropertiesConfig PropertiesConfig { get; private set; }
|
||||||
|
|
||||||
@@ -98,8 +98,23 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
|
|
||||||
Eisc.SigChange += Eisc_SigChange;
|
Eisc.SigChange += Eisc_SigChange;
|
||||||
|
|
||||||
|
CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, Eisc, 120000, 300000);
|
||||||
|
|
||||||
AddPostActivationAction(LinkDevices);
|
AddPostActivationAction(LinkDevices);
|
||||||
AddPostActivationAction(LinkRooms);
|
AddPostActivationAction(LinkRooms);
|
||||||
|
AddPostActivationAction(RegisterEisc);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CustomActivate()
|
||||||
|
{
|
||||||
|
CommunicationMonitor.Start();
|
||||||
|
return base.CustomActivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Deactivate()
|
||||||
|
{
|
||||||
|
CommunicationMonitor.Stop();
|
||||||
|
return base.Deactivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LinkDevices()
|
private void LinkDevices()
|
||||||
@@ -137,8 +152,6 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
bridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this);
|
bridge.LinkToApi(Eisc, d.JoinStart, d.JoinMapKey, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RegisterEisc();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RegisterEisc()
|
private void RegisterEisc()
|
||||||
@@ -182,8 +195,6 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
|
|
||||||
rm.LinkToApi(Eisc, room.JoinStart, room.JoinMapKey, this);
|
rm.LinkToApi(Eisc, room.JoinStart, room.JoinMapKey, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
RegisterEisc();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -324,6 +335,12 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
Debug.Console(2, this, "Error in Eisc_SigChange handler: {0}", e);
|
Debug.Console(2, this, "Error in Eisc_SigChange handler: {0}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Implementation of ICommunicationMonitor
|
||||||
|
|
||||||
|
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EiscApiPropertiesConfig
|
public class EiscApiPropertiesConfig
|
||||||
|
|||||||
@@ -505,17 +505,23 @@ namespace PepperDash.Essentials.Core.Monitoring
|
|||||||
ProgramInfo.RegistrationState = Program.RegistrationState;
|
ProgramInfo.RegistrationState = Program.RegistrationState;
|
||||||
|
|
||||||
ProgramStartedFeedback = new BoolFeedback(() => Program.OperatingState == eProgramOperatingState.Start);
|
ProgramStartedFeedback = new BoolFeedback(() => Program.OperatingState == eProgramOperatingState.Start);
|
||||||
|
ProgramStartedFeedback.FireUpdate();
|
||||||
|
|
||||||
ProgramStoppedFeedback = new BoolFeedback(() => Program.OperatingState == eProgramOperatingState.Stop);
|
ProgramStoppedFeedback = new BoolFeedback(() => Program.OperatingState == eProgramOperatingState.Stop);
|
||||||
|
ProgramStoppedFeedback.FireUpdate();
|
||||||
|
|
||||||
ProgramRegisteredFeedback =
|
ProgramRegisteredFeedback =
|
||||||
new BoolFeedback(() => Program.RegistrationState == eProgramRegistrationState.Register);
|
new BoolFeedback(() => Program.RegistrationState == eProgramRegistrationState.Register);
|
||||||
|
ProgramRegisteredFeedback.FireUpdate();
|
||||||
|
|
||||||
ProgramUnregisteredFeedback =
|
ProgramUnregisteredFeedback =
|
||||||
new BoolFeedback(() => Program.RegistrationState == eProgramRegistrationState.Unregister);
|
new BoolFeedback(() => Program.RegistrationState == eProgramRegistrationState.Unregister);
|
||||||
|
ProgramUnregisteredFeedback.FireUpdate();
|
||||||
|
|
||||||
ProgramNameFeedback = new StringFeedback(() => ProgramInfo.ProgramFile);
|
ProgramNameFeedback = new StringFeedback(() => ProgramInfo.ProgramFile);
|
||||||
ProgramCompileTimeFeedback = new StringFeedback(() => ProgramInfo.CompileTime);
|
ProgramCompileTimeFeedback = new StringFeedback(() => ProgramInfo.CompileTime);
|
||||||
CrestronDataBaseVersionFeedback = new StringFeedback(() => ProgramInfo.CrestronDb);
|
CrestronDataBaseVersionFeedback = new StringFeedback(() => ProgramInfo.CrestronDb);
|
||||||
EnvironmentVersionFeedback = new StringFeedback(() => ProgramInfo.Environment);
|
EnvironmentVersionFeedback = new StringFeedback(() => ProgramInfo.Environment);
|
||||||
|
|
||||||
AggregatedProgramInfoFeedback = new StringFeedback(() => JsonConvert.SerializeObject(ProgramInfo));
|
AggregatedProgramInfoFeedback = new StringFeedback(() => JsonConvert.SerializeObject(ProgramInfo));
|
||||||
|
|
||||||
GetProgramInfo();
|
GetProgramInfo();
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<tags>crestron 3series 4series</tags>
|
<tags>crestron 3series 4series</tags>
|
||||||
<repository type="git" url="https://github.com/PepperDash/Essentials"/>
|
<repository type="git" url="https://github.com/PepperDash/Essentials"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="PepperDashCore" version="[1.0.43, 1.1.0)"/>
|
<dependency id="PepperDashCore" version="[1.0.44, 1.1.0)"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|||||||
@@ -266,14 +266,13 @@ namespace PepperDash.Essentials.Core.Presets
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
_fileOps.Enter();
|
_fileOps.Enter();
|
||||||
var json = JsonConvert.SerializeObject(PresetsList);
|
var pl = new PresetsList {Channels = PresetsList, Name = Name};
|
||||||
|
var json = JsonConvert.SerializeObject(pl, Formatting.Indented);
|
||||||
|
|
||||||
using (var file = File.Open(_filePath, FileMode.Truncate))
|
using (var file = File.Open(_filePath, FileMode.Truncate))
|
||||||
{
|
{
|
||||||
file.Write(json, Encoding.UTF8);
|
file.Write(json, Encoding.UTF8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
{
|
{
|
||||||
_dge = device;
|
_dge = device;
|
||||||
_dgeEthernetInfo = _dge.ExtenderEthernetReservedSigs;
|
_dgeEthernetInfo = _dge.ExtenderEthernetReservedSigs;
|
||||||
_dgeEthernetInfo.DeviceExtenderSigChange += (extender, args) => UpdateDeviceInfo();
|
//_dgeEthernetInfo.DeviceExtenderSigChange += (extender, args) => UpdateDeviceInfo();
|
||||||
_dgeEthernetInfo.Use();
|
_dgeEthernetInfo.Use();
|
||||||
|
|
||||||
DeviceInfo = new DeviceInfo();
|
DeviceInfo = new DeviceInfo();
|
||||||
|
|
||||||
_dge.OnlineStatusChange += (currentDevice, args) => { if (args.DeviceOnLine) UpdateDeviceInfo(); };
|
//_dge.OnlineStatusChange += (currentDevice, args) => { if (args.DeviceOnLine) UpdateDeviceInfo(); };
|
||||||
|
|
||||||
_dc = dc;
|
_dc = dc;
|
||||||
|
|
||||||
|
|||||||
@@ -259,29 +259,35 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.Auto, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(eVst.Auto, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn1.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(HdmiIn1.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(HdmiIn2.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(HdmiIn2.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(DisplayPortIn.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(DisplayPortIn.Selector, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
ExecuteSwitch(eVst.AllDisabled, null, eRoutingSignalType.Audio | eRoutingSignalType.Video);
|
ExecuteSwitch(eVst.AllDisabled, null, type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Unable to execute numeric switch to input {0}", input);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -289,6 +295,9 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Attempting to switch InputSelector {0}", ((eVst)inputSelector).ToString());
|
||||||
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
Tx.VideoSource = (eVst)inputSelector;
|
Tx.VideoSource = (eVst)inputSelector;
|
||||||
|
|
||||||
@@ -299,6 +308,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key);
|
Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key);
|
||||||
//Tx.AudioSource = (eAst)inputSelector;
|
//Tx.AudioSource = (eAst)inputSelector;
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Exception in ExecuteSwitch: {0}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
KeypadAccessoryButton1Label = "-";
|
KeypadAccessoryButton1Label = "-";
|
||||||
|
|
||||||
HasKeypadAccessoryButton2 = true;
|
HasKeypadAccessoryButton2 = true;
|
||||||
KeypadAccessoryButton2Command = "NumericEnter";
|
KeypadAccessoryButton2Command = "KEYPAD_ENTER";
|
||||||
KeypadAccessoryButton2Label = "Enter";
|
KeypadAccessoryButton2Label = "Enter";
|
||||||
|
|
||||||
AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected void SetIsReady()
|
protected void SetIsReady()
|
||||||
{
|
{
|
||||||
CrestronInvoke.BeginInvoke( (o) =>
|
CrestronInvoke.BeginInvoke((o) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -529,7 +529,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
||||||
|
|
||||||
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort) codec.Participants.CurrentParticipants.Count);
|
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,7 +564,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
stringIndex += maxStrings;
|
stringIndex += maxStrings;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (meetingIndex < maxParticipants*offset)
|
while (meetingIndex < maxParticipants * offset)
|
||||||
{
|
{
|
||||||
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false);
|
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false);
|
||||||
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false);
|
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false);
|
||||||
@@ -596,6 +596,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
trilist.SetBoolSigAction(joinMap.SourceShareAutoStart.JoinNumber, (b) => AutoShareContentWhileInCall = b);
|
trilist.SetBoolSigAction(joinMap.SourceShareAutoStart.JoinNumber, (b) => AutoShareContentWhileInCall = b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
|
||||||
|
private List<Meeting> _currentMeetings = new List<Meeting>();
|
||||||
|
|
||||||
private void LinkVideoCodecScheduleToApi(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
private void LinkVideoCodecScheduleToApi(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||||
{
|
{
|
||||||
trilist.SetSigFalseAction(joinMap.UpdateMeetings.JoinNumber, codec.GetSchedule);
|
trilist.SetSigFalseAction(joinMap.UpdateMeetings.JoinNumber, codec.GetSchedule);
|
||||||
@@ -605,10 +608,39 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
codec.CodecSchedule.MeetingWarningMinutes = i;
|
codec.CodecSchedule.MeetingWarningMinutes = i;
|
||||||
});
|
});
|
||||||
|
|
||||||
codec.CodecSchedule.MeetingsListHasChanged += (sender, args) => UpdateMeetingsList(codec, trilist, joinMap);
|
// TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
|
||||||
|
trilist.SetSigFalseAction(joinMap.DialMeeting1.JoinNumber, () =>
|
||||||
|
{
|
||||||
|
var mtg = 1;
|
||||||
|
var index = mtg - 1;
|
||||||
|
Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}",
|
||||||
|
mtg, joinMap.DialMeeting1.JoinNumber, index, _currentMeetings[index].Id, _currentMeetings[index].Title);
|
||||||
|
if (_currentMeetings[index] != null)
|
||||||
|
Dial(_currentMeetings[index]);
|
||||||
|
});
|
||||||
|
// TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
|
||||||
|
trilist.SetSigFalseAction(joinMap.DialMeeting2.JoinNumber, () =>
|
||||||
|
{
|
||||||
|
var mtg = 2;
|
||||||
|
var index = mtg - 1;
|
||||||
|
Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}",
|
||||||
|
mtg, joinMap.DialMeeting2.JoinNumber, index, _currentMeetings[index].Id, _currentMeetings[index].Title);
|
||||||
|
if (_currentMeetings[index] != null)
|
||||||
|
Dial(_currentMeetings[index]);
|
||||||
|
});
|
||||||
|
// TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
|
||||||
|
trilist.SetSigFalseAction(joinMap.DialMeeting3.JoinNumber, () =>
|
||||||
|
{
|
||||||
|
var mtg = 3;
|
||||||
|
var index = mtg - 1;
|
||||||
|
Debug.Console(1, this, "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}",
|
||||||
|
mtg, joinMap.DialMeeting3.JoinNumber, index, _currentMeetings[index].Id, _currentMeetings[index].Title);
|
||||||
|
if (_currentMeetings[index] != null)
|
||||||
|
Dial(_currentMeetings[index]);
|
||||||
|
});
|
||||||
|
|
||||||
codec.CodecSchedule.MeetingEventChange +=
|
codec.CodecSchedule.MeetingsListHasChanged += (sender, args) => UpdateMeetingsList(codec, trilist, joinMap);
|
||||||
(sender, args) =>
|
codec.CodecSchedule.MeetingEventChange += (sender, args) =>
|
||||||
{
|
{
|
||||||
if (args.ChangeType == eMeetingEventChangeType.MeetingStartWarning)
|
if (args.ChangeType == eMeetingEventChangeType.MeetingStartWarning)
|
||||||
{
|
{
|
||||||
@@ -620,30 +652,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
private void UpdateMeetingsList(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
private void UpdateMeetingsList(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||||
{
|
{
|
||||||
var currentTime = DateTime.Now;
|
var currentTime = DateTime.Now;
|
||||||
var currentMeetings =
|
|
||||||
codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList();
|
|
||||||
|
|
||||||
var meetingsData = UpdateMeetingsListXSig(currentMeetings);
|
// TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
|
||||||
|
// - changed var currentMeetings >> field _currentMeetings
|
||||||
|
//_currentMeetings.Clear();
|
||||||
|
_currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList();
|
||||||
|
|
||||||
|
// TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
|
||||||
|
// - moved the trilist.SetSigFlaseAction(joinMap.DialMeeting1..3.JoinNumber) lambda's to LinkVideoCodecScheduleToApi
|
||||||
|
|
||||||
|
var meetingsData = UpdateMeetingsListXSig(_currentMeetings);
|
||||||
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
|
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
|
||||||
|
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count);
|
||||||
trilist.SetSigFalseAction(joinMap.DialMeeting1.JoinNumber, () =>
|
|
||||||
{
|
|
||||||
if(codec.CodecSchedule.Meetings[0] != null)
|
|
||||||
Dial(codec.CodecSchedule.Meetings[0]);
|
|
||||||
});
|
|
||||||
trilist.SetSigFalseAction(joinMap.DialMeeting2.JoinNumber, () =>
|
|
||||||
{
|
|
||||||
if (codec.CodecSchedule.Meetings[1] != null)
|
|
||||||
Dial(codec.CodecSchedule.Meetings[1]);
|
|
||||||
});
|
|
||||||
trilist.SetSigFalseAction(joinMap.DialMeeting3.JoinNumber, () =>
|
|
||||||
{
|
|
||||||
if (codec.CodecSchedule.Meetings[2] != null)
|
|
||||||
Dial(codec.CodecSchedule.Meetings[2]);
|
|
||||||
});
|
|
||||||
|
|
||||||
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)currentMeetings.Count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string UpdateMeetingsListXSig(List<Meeting> meetings)
|
private string UpdateMeetingsListXSig(List<Meeting> meetings)
|
||||||
@@ -652,11 +672,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
const int maxDigitals = 2;
|
const int maxDigitals = 2;
|
||||||
const int maxStrings = 7;
|
const int maxStrings = 7;
|
||||||
const int offset = maxDigitals + maxStrings;
|
const int offset = maxDigitals + maxStrings;
|
||||||
var digitalIndex = maxStrings*maxMeetings; //15
|
var digitalIndex = maxStrings * maxMeetings; //15
|
||||||
var stringIndex = 0;
|
var stringIndex = 0;
|
||||||
var meetingIndex = 0;
|
var meetingIndex = 0;
|
||||||
|
|
||||||
var tokenArray = new XSigToken[maxMeetings*offset];
|
var tokenArray = new XSigToken[maxMeetings * offset];
|
||||||
/*
|
/*
|
||||||
* Digitals
|
* Digitals
|
||||||
* IsJoinable - 1
|
* IsJoinable - 1
|
||||||
@@ -669,19 +689,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
* Start Time - 4
|
* Start Time - 4
|
||||||
* End Date - 5
|
* End Date - 5
|
||||||
* End Time - 6
|
* End Time - 6
|
||||||
|
* Id - 7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
foreach(var meeting in meetings)
|
foreach (var meeting in meetings)
|
||||||
{
|
{
|
||||||
var currentTime = DateTime.Now;
|
var currentTime = DateTime.Now;
|
||||||
|
|
||||||
if(meeting.StartTime < currentTime && meeting.EndTime < currentTime) continue;
|
if (meeting.StartTime < currentTime && meeting.EndTime < currentTime) continue;
|
||||||
|
|
||||||
if (meetingIndex >= maxMeetings*offset)
|
if (meetingIndex >= maxMeetings * offset)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Max Meetings reached");
|
Debug.Console(2, this, "Max Meetings reached");
|
||||||
break;}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
//digitals
|
//digitals
|
||||||
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, meeting.Joinable);
|
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, meeting.Joinable);
|
||||||
@@ -702,10 +724,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
stringIndex += maxStrings;
|
stringIndex += maxStrings;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (meetingIndex < maxMeetings*offset)
|
while (meetingIndex < maxMeetings * offset)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Clearing unused data. Meeting Index: {0} MaxMeetings * Offset: {1}",
|
Debug.Console(2, this, "Clearing unused data. Meeting Index: {0} MaxMeetings * Offset: {1}",
|
||||||
meetingIndex, maxMeetings*offset);
|
meetingIndex, maxMeetings * offset);
|
||||||
|
|
||||||
//digitals
|
//digitals
|
||||||
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false);
|
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false);
|
||||||
@@ -745,7 +767,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
codec.DirectoryResultReturned += (sender, args) =>
|
codec.DirectoryResultReturned += (sender, args) =>
|
||||||
{
|
{
|
||||||
trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort) args.Directory.CurrentDirectoryResults.Count);
|
trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)args.Directory.CurrentDirectoryResults.Count);
|
||||||
|
|
||||||
var clearBytes = XSigHelpers.ClearOutputs();
|
var clearBytes = XSigHelpers.ClearOutputs();
|
||||||
|
|
||||||
@@ -787,7 +809,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
var contactIndex = 1;
|
var contactIndex = 1;
|
||||||
var tokenArray = new XSigToken[directory.CurrentDirectoryResults.Count];
|
var tokenArray = new XSigToken[directory.CurrentDirectoryResults.Count];
|
||||||
|
|
||||||
foreach(var entry in directory.CurrentDirectoryResults)
|
foreach (var entry in directory.CurrentDirectoryResults)
|
||||||
{
|
{
|
||||||
var arrayIndex = contactIndex - 1;
|
var arrayIndex = contactIndex - 1;
|
||||||
|
|
||||||
@@ -800,7 +822,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isRoot && String.IsNullOrEmpty(entry.FolderId)) continue;
|
if (isRoot && String.IsNullOrEmpty(entry.FolderId)) continue;
|
||||||
|
|
||||||
tokenArray[arrayIndex] = new XSigSerialToken(contactIndex, entry.Name);
|
tokenArray[arrayIndex] = new XSigSerialToken(contactIndex, entry.Name);
|
||||||
|
|
||||||
@@ -826,7 +848,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
Debug.Console(1, this, "Call Direction: {0}", args.CallItem.Direction);
|
Debug.Console(1, this, "Call Direction: {0}", args.CallItem.Direction);
|
||||||
Debug.Console(1, this, "Call is incoming: {0}", args.CallItem.Direction == eCodecCallDirection.Incoming);
|
Debug.Console(1, this, "Call is incoming: {0}", args.CallItem.Direction == eCodecCallDirection.Incoming);
|
||||||
trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming && args.CallItem.Status != eCodecCallStatus.Disconnected);
|
trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming && args.CallItem.Status == eCodecCallStatus.Ringing);
|
||||||
|
|
||||||
if (args.CallItem.Direction == eCodecCallDirection.Incoming)
|
if (args.CallItem.Direction == eCodecCallDirection.Incoming)
|
||||||
{
|
{
|
||||||
@@ -847,7 +869,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
var digitalIndex = maxStrings * maxCalls;
|
var digitalIndex = maxStrings * maxCalls;
|
||||||
var arrayIndex = 0;
|
var arrayIndex = 0;
|
||||||
|
|
||||||
var tokenArray = new XSigToken[maxCalls*offset]; //set array size for number of calls * pieces of info
|
var tokenArray = new XSigToken[maxCalls * offset]; //set array size for number of calls * pieces of info
|
||||||
|
|
||||||
foreach (var call in ActiveCalls)
|
foreach (var call in ActiveCalls)
|
||||||
{
|
{
|
||||||
@@ -1048,7 +1070,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
codec.CameraSelected += (sender, args) =>
|
codec.CameraSelected += (sender, args) =>
|
||||||
{
|
{
|
||||||
var i = (ushort) codec.Cameras.FindIndex((c) => c.Key == args.SelectedCamera.Key);
|
var i = (ushort)codec.Cameras.FindIndex((c) => c.Key == args.SelectedCamera.Key);
|
||||||
|
|
||||||
if (codec is IHasCodecRoomPresets)
|
if (codec is IHasCodecRoomPresets)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1655,6 +1655,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
public override void Dial(Meeting meeting)
|
public override void Dial(Meeting meeting)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this,"Dialing meeting.Id: {0} Title: {1}", meeting.Id, meeting.Title);
|
||||||
SendText(string.Format("zCommand Dial Start meetingNumber: {0}", meeting.Id));
|
SendText(string.Format("zCommand Dial Start meetingNumber: {0}", meeting.Id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.0.43" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
<package id="PepperDashCore" version="1.0.44" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user