mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-08 17:24:47 +00:00
Added VC Mock and some interaction in UI layer
This commit is contained in:
@@ -59,12 +59,12 @@ namespace PepperDash.Essentials
|
||||
|
||||
|
||||
// CODEC TESTING
|
||||
GenericSshClient TestCodecClient = new GenericSshClient("TestCodec-1--SshClient", "10.11.50.135", 22, "crestron", "2H3Zu&OvgXp6");
|
||||
//GenericSshClient TestCodecClient = new GenericSshClient("TestCodec-1--SshClient", "10.11.50.135", 22, "crestron", "2H3Zu&OvgXp6");
|
||||
|
||||
PepperDash.Essentials.Devices.VideoCodec.Cisco.CiscoCodec TestCodec =
|
||||
new PepperDash.Essentials.Devices.VideoCodec.Cisco.CiscoCodec("TestCodec-1", "Cisco Spark Room Kit", TestCodecClient, 8080);
|
||||
//PepperDash.Essentials.Devices.VideoCodec.Cisco.CiscoCodec TestCodec =
|
||||
// new PepperDash.Essentials.Devices.VideoCodec.Cisco.CiscoCodec("TestCodec-1", "Cisco Spark Room Kit", TestCodecClient, 8080);
|
||||
|
||||
TestCodec.CustomActivate();
|
||||
//TestCodec.CustomActivate();
|
||||
|
||||
// CODEC TESTING
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace PepperDash.Essentials.Fusion
|
||||
{
|
||||
public class EssentialsHuddleSpaceFusionSystemController : Device
|
||||
{
|
||||
//public event EventHandler<ScheduleChangeEventArgs> ScheduleChange;
|
||||
//public event EventHandler<MeetingChangeEventArgs> MeetingEndWarning;
|
||||
//public event EventHandler<MeetingChangeEventArgs> NextMeetingBeginWarning;
|
||||
public event EventHandler<ScheduleChangeEventArgs> ScheduleChange;
|
||||
public event EventHandler<MeetingChangeEventArgs> MeetingEndWarning;
|
||||
public event EventHandler<MeetingChangeEventArgs> NextMeetingBeginWarning;
|
||||
|
||||
FusionRoom FusionRoom;
|
||||
EssentialsHuddleSpaceRoom Room;
|
||||
@@ -41,10 +41,10 @@ namespace PepperDash.Essentials.Fusion
|
||||
StringSigData CurrentRoomSourceNameSig;
|
||||
|
||||
#region System Info Sigs
|
||||
StringSigData SystemName;
|
||||
StringSigData Model;
|
||||
StringSigData SerialNumber;
|
||||
StringSigData Uptime;
|
||||
//StringSigData SystemName;
|
||||
//StringSigData Model;
|
||||
//StringSigData SerialNumber;
|
||||
//StringSigData Uptime;
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -788,6 +788,15 @@ namespace PepperDash.Essentials.Fusion
|
||||
|
||||
if (!IsRegisteredForSchedulePushNotifications)
|
||||
PollTimer.Reset(SchedulePollInterval, SchedulePollInterval);
|
||||
|
||||
// Fire Schedule Change Event
|
||||
var handler = ScheduleChange;
|
||||
|
||||
if (handler != null)
|
||||
{
|
||||
handler(this, new ScheduleChangeEventArgs() { Schedule = CurrentSchedule });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -806,20 +815,26 @@ namespace PepperDash.Essentials.Fusion
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prints today's schedule to console for debugging
|
||||
/// </summary>
|
||||
void PrintTodaysSchedule()
|
||||
{
|
||||
if (CurrentSchedule.Meetings.Count > 0)
|
||||
if (Debug.Level > 1)
|
||||
{
|
||||
Debug.Console(1, this, "Today's Schedule for '{0}'\n", Room.Name);
|
||||
|
||||
foreach (Event e in CurrentSchedule.Meetings)
|
||||
if (CurrentSchedule.Meetings.Count > 0)
|
||||
{
|
||||
Debug.Console(1, this, "Subject: {0}", e.Subject);
|
||||
Debug.Console(1, this, "Organizer: {0}", e.Organizer);
|
||||
Debug.Console(1, this, "MeetingID: {0}", e.MeetingID);
|
||||
Debug.Console(1, this, "Start Time: {0}", e.dtStart);
|
||||
Debug.Console(1, this, "End Time: {0}", e.dtEnd);
|
||||
Debug.Console(1, this, "Duration: {0}\n", e.DurationInMinutes);
|
||||
Debug.Console(1, this, "Today's Schedule for '{0}'\n", Room.Name);
|
||||
|
||||
foreach (Event e in CurrentSchedule.Meetings)
|
||||
{
|
||||
Debug.Console(1, this, "Subject: {0}", e.Subject);
|
||||
Debug.Console(1, this, "Organizer: {0}", e.Organizer);
|
||||
Debug.Console(1, this, "MeetingID: {0}", e.MeetingID);
|
||||
Debug.Console(1, this, "Start Time: {0}", e.dtStart);
|
||||
Debug.Console(1, this, "End Time: {0}", e.dtEnd);
|
||||
Debug.Console(1, this, "Duration: {0}\n", e.DurationInMinutes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -888,13 +903,8 @@ namespace PepperDash.Essentials.Fusion
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void UsageTracker_DeviceUsageEnded(object sender, DeviceUsageEventArgs e)
|
||||
<<<<<<< HEAD
|
||||
{
|
||||
var device = sender as Device;
|
||||
=======
|
||||
{
|
||||
var deviceTracker = sender as UsageTracking;
|
||||
>>>>>>> origin/feature/fusion-nyu
|
||||
|
||||
var configDevice = ConfigReader.ConfigObject.Devices.Where(d => d.Key.Equals(deviceTracker.Parent));
|
||||
|
||||
@@ -960,6 +970,7 @@ namespace PepperDash.Essentials.Fusion
|
||||
string attrName = null;
|
||||
uint attrNum = Convert.ToUInt32(keyNum);
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
if (dev is BasicTriListWithSmartObject)
|
||||
@@ -971,13 +982,32 @@ namespace PepperDash.Essentials.Fusion
|
||||
}
|
||||
// add xpanel here
|
||||
|
||||
if (dev is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics)
|
||||
//if (dev is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics)
|
||||
//{
|
||||
// if (attrNum > 10)
|
||||
// continue;
|
||||
// attrName = "Online - XPanel " + attrNum;
|
||||
// attrNum += 160;
|
||||
//}
|
||||
=======
|
||||
if (dev is EssentialsTouchpanelController)
|
||||
{
|
||||
if (attrNum > 10)
|
||||
continue;
|
||||
attrName = "Online - XPanel " + attrNum;
|
||||
attrNum += 160;
|
||||
}
|
||||
if ((dev as EssentialsTouchpanelController).Panel is Crestron.SimplSharpPro.DeviceSupport.TswFt5Button)
|
||||
{
|
||||
if (attrNum > 10)
|
||||
continue;
|
||||
attrName = "Online - Touch Panel " + attrNum;
|
||||
attrNum += 150;
|
||||
}
|
||||
else if ((dev as EssentialsTouchpanelController).Panel is Crestron.SimplSharpPro.UI.XpanelForSmartGraphics)
|
||||
{
|
||||
if (attrNum > 10)
|
||||
continue;
|
||||
attrName = "Online - XPanel " + attrNum;
|
||||
attrNum += 160;
|
||||
}
|
||||
}
|
||||
>>>>>>> origin/feature/cisco-spark
|
||||
|
||||
//else
|
||||
if (dev is DisplayBase)
|
||||
|
||||
@@ -9,6 +9,7 @@ using PepperDash.Core;
|
||||
using PepperDash.Essentials;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.SmartObjects;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||
|
||||
namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
@@ -20,7 +21,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// </summary>
|
||||
public class EssentialsCiscoSparkUiDriver : PanelDriverBase
|
||||
{
|
||||
object Codec;
|
||||
VideoCodecBase Codec;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -51,12 +52,17 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
SmartObjectNumeric DialKeypad;
|
||||
|
||||
// These are likely temp until we get a keyboard built
|
||||
StringFeedback DialStringFeedback;
|
||||
StringBuilder DialStringBuilder = new StringBuilder();
|
||||
BoolFeedback DialStringBackspaceVisibleFeedback;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="triList"></param>
|
||||
/// <param name="codec"></param>
|
||||
public EssentialsCiscoSparkUiDriver(BasicTriListWithSmartObject triList, object codec)
|
||||
public EssentialsCiscoSparkUiDriver(BasicTriListWithSmartObject triList, VideoCodecBase codec)
|
||||
: base(triList)
|
||||
{
|
||||
Codec = codec;
|
||||
@@ -76,6 +82,15 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
StagingButtonFeedbackInterlock = new JoinedSigInterlock(triList);
|
||||
StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCRecentsVisible);
|
||||
|
||||
DialStringFeedback = new StringFeedback(() => DialStringBuilder.ToString());
|
||||
DialStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.KeyboardText]);
|
||||
|
||||
DialStringBackspaceVisibleFeedback = new BoolFeedback(() => DialStringBuilder.Length > 0);
|
||||
DialStringBackspaceVisibleFeedback
|
||||
.LinkInputSig(TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible]);
|
||||
|
||||
Codec.InCallFeedback.OutputChange += new EventHandler<EventArgs>(InCallFeedback_OutputChange);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -104,7 +119,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
void SetupCallStagingPopover()
|
||||
{
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingDirectoryPress, ShowDirectory);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, () => { });
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingKeypadPress, ShowKeypad);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents);
|
||||
}
|
||||
@@ -117,20 +132,20 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
if(TriList.SmartObjects.Contains(UISmartObjectJoin.VCDialKeypad))
|
||||
{
|
||||
DialKeypad = new SmartObjectNumeric(TriList.SmartObjects[UISmartObjectJoin.VCDialKeypad], true);
|
||||
DialKeypad.Digit0.SetSigFalseAction(() => ___DialPlaceholder___(0));
|
||||
DialKeypad.Digit1.SetSigFalseAction(() => ___DialPlaceholder___(1));
|
||||
DialKeypad.Digit2.SetSigFalseAction(() => ___DialPlaceholder___(2));
|
||||
DialKeypad.Digit3.SetSigFalseAction(() => ___DialPlaceholder___(3));
|
||||
DialKeypad.Digit4.SetSigFalseAction(() => ___DialPlaceholder___(4));
|
||||
DialKeypad.Digit5.SetSigFalseAction(() => ___DialPlaceholder___(5));
|
||||
DialKeypad.Digit6.SetSigFalseAction(() => ___DialPlaceholder___(6));
|
||||
DialKeypad.Digit7.SetSigFalseAction(() => ___DialPlaceholder___(7));
|
||||
DialKeypad.Digit8.SetSigFalseAction(() => ___DialPlaceholder___(8));
|
||||
DialKeypad.Digit9.SetSigFalseAction(() => ___DialPlaceholder___(9));
|
||||
DialKeypad.Digit0.SetSigFalseAction(() => DialKeypadPress("0"));
|
||||
DialKeypad.Digit1.SetSigFalseAction(() => DialKeypadPress("1"));
|
||||
DialKeypad.Digit2.SetSigFalseAction(() => DialKeypadPress("2"));
|
||||
DialKeypad.Digit3.SetSigFalseAction(() => DialKeypadPress("3"));
|
||||
DialKeypad.Digit4.SetSigFalseAction(() => DialKeypadPress("4"));
|
||||
DialKeypad.Digit5.SetSigFalseAction(() => DialKeypadPress("5"));
|
||||
DialKeypad.Digit6.SetSigFalseAction(() => DialKeypadPress("6"));
|
||||
DialKeypad.Digit7.SetSigFalseAction(() => DialKeypadPress("7"));
|
||||
DialKeypad.Digit8.SetSigFalseAction(() => DialKeypadPress("8"));
|
||||
DialKeypad.Digit9.SetSigFalseAction(() => DialKeypadPress("9"));
|
||||
DialKeypad.Misc1SigName = "*";
|
||||
DialKeypad.Misc1.SetSigFalseAction(() => { });
|
||||
DialKeypad.Misc1.SetSigFalseAction(() => DialKeypadPress("*"));
|
||||
DialKeypad.Misc2SigName = "#";
|
||||
DialKeypad.Misc2.SetSigFalseAction(() => { });
|
||||
DialKeypad.Misc2.SetSigFalseAction(() => DialKeypadPress("#"));
|
||||
}
|
||||
else
|
||||
Debug.Console(0, "Trilist {0:x2}, VC dial keypad object {1} not found. Check SGD file or VTP",
|
||||
@@ -166,24 +181,55 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress);
|
||||
}
|
||||
|
||||
void CallHasStarted()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void ConnectPress()
|
||||
{
|
||||
|
||||
// Header icon
|
||||
// Add end call button to stage
|
||||
// Volume bar needs to have mic mute
|
||||
if (Codec.InCallFeedback.BoolValue)
|
||||
Codec.EndCall();
|
||||
else
|
||||
Codec.Dial(DialStringBuilder.ToString());
|
||||
}
|
||||
|
||||
void CallHasEnded()
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
void InCallFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
// Header icon
|
||||
// Remove end call
|
||||
// Volume bar no mic mute (or hidden if no source?)
|
||||
if (Codec.InCallFeedback.BoolValue) // Call is starting
|
||||
{
|
||||
// Header icon
|
||||
// Add end call button to stage
|
||||
// Volume bar needs to have mic mute
|
||||
}
|
||||
else // ending
|
||||
{
|
||||
// Header icon
|
||||
// Remove end call
|
||||
// Volume bar no mic mute (or hidden if no source?)
|
||||
}
|
||||
}
|
||||
|
||||
void ___DialPlaceholder___(int i)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="i"></param>
|
||||
void DialKeypadPress(string i)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
DialStringBuilder.Append(i);
|
||||
DialStringFeedback.FireUpdate();
|
||||
TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible].BoolValue =
|
||||
DialStringBuilder.Length > 0;
|
||||
}
|
||||
|
||||
void DialKeypadBackspacePress()
|
||||
{
|
||||
DialStringBuilder.Remove(DialStringBuilder.Length - 1, 1);
|
||||
DialStringFeedback.FireUpdate();
|
||||
TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible].BoolValue =
|
||||
DialStringBuilder.Length > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user