Adding High Level Comments

This commit is contained in:
2019-07-10 12:24:14 -05:00
parent 183febe9c0
commit d986d810bb
11 changed files with 2078 additions and 1956 deletions
+2042 -1924
View File
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,6 @@
using System;
//IP Address verification
//IMPLEMENT A ISREACHABLE METHOD TO BE ABLE TO DISPLAY ONLINE QINSTANCES
using System;
using System.Net;
namespace qController
@@ -1,4 +1,8 @@
using System;
//Class used to facilitate communication with a QInstance
//Listens for incoming messages via qReceiver (UDP) and tcpSender (TCP)
//WEIRD MESSAGE PARSING RULES NEED FIXED
using System;
using System.Linq;
using System.Threading;
using SharpOSC;
@@ -15,9 +19,6 @@ namespace qController
string Address;
int Port;
public QClient(string address, int port)
{
Address = address;
@@ -32,8 +33,10 @@ namespace qController
}
//one method for messages received whether from TCP or UDP (SAME MSG FORMAT)
private void OnMessageReceived(object source, MessageEventArgs args)
{
//try to find a better filtering process
if (!args.Message.Address.Contains("update"))
qParser.ParseMessage(args.Message);
else
@@ -102,6 +105,7 @@ namespace qController
public void ProcessUpdate(OscMessage msg)
{
Console.WriteLine("PROCESS UPDATE : " + msg.Address);
if (msg.Address.Contains("disconnect"))
{
qParser.ParseMessage(msg);
@@ -116,7 +120,7 @@ namespace qController
if (msg.Arguments.Count > 0)
{
qParser.ParseMessage(msg);
//UpdateSelectedCue();
//UpdateSelectedCue();
}
}
else if (msg.Address.Contains("workspace"))
@@ -144,7 +148,6 @@ namespace qController
Console.WriteLine("Workspace needs to be updated: " + ws_id);
}
public void Close()
{
udpSender.Close();
@@ -1,4 +1,8 @@
using System;
//Class used for overall Workspace control (ONLY REPRESENTS ONE WORKSPACE)
//Contains all necessary items to facilitate communication (sending, receiving) to a QLab workspace
//Also contains the local QWorkspace object which stores all the information that is used in displaying
//STILL NEED TO WORK ON PASSWORD PROTECTED WORKSPACES
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
@@ -1,4 +1,5 @@
//Currently deprecated would like to resurrect
//Currently unused would like to reimplement eventually
//Currently being done in qConnectionPage.xaml.cs Scan() method
using System;
using System.Collections.Generic;
@@ -1,4 +1,5 @@
using System;
using System;
using SharpOSC;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
@@ -1,4 +1,4 @@
//this class is used for receiving workspace update messages
//Class used for receiving workspace update messages
using System;
using SharpOSC;
@@ -1,4 +1,7 @@
using System;
//Class used for updating local "copy" of workspace info, cue-lists, cues, etc.
//CLEAN UP WORKSPACE LOADING STUFF STILL SENDING INDIVIDUAL REQUESTS FOR GROUP CUES?
using System;
using System.Threading;
using Xamarin.Forms;
using SharpOSC;
@@ -26,6 +29,7 @@ namespace qController
updateThread.Start();
}
//Attemp at a "keep alive" message
public void UpdateLoop()
{
active = true;
@@ -50,6 +54,7 @@ namespace qController
Console.WriteLine("Populated: " + qController.qWorkspace.IsPopulated);
if (!qController.qWorkspace.IsPopulated)
{
Console.WriteLine("IS THIS BEING CALLED");
QCue cue = qController.qWorkspace.GetEmptyGroup();
if(cue != null)
{
@@ -71,10 +76,10 @@ namespace qController
{
Console.WriteLine("Workspace group cues are already populated");
App.showToast("Workspace cues have been loaded....");
//get selected cue
qController.qClient.UpdateSelectedCue(qController.qWorkspace.workspace_id);
return;
}
//RefreshGroupCues();
//qController.qClient.UpdateSelectedCue();
}
@@ -85,23 +90,6 @@ namespace qController
qController.qClient.UpdateSpecificCue(qController.qWorkspace.workspace_id,args.PlaybackPosition);
}
public void RefreshGroupCues()
{
Console.WriteLine("Workspace group cues are not populated");
foreach (var cueList in qController.qWorkspace.data)
{
foreach (var cue in cueList.cues)
{
if (cue.type == "Group")
{
Console.WriteLine("First Group Cue Found");
qController.qClient.sendStringUDP("/workspace/" + qController.qWorkspace.workspace_id + "/cue_id/" + cue.uniqueID + "/children");
break;
}
}
}
}
public void SendThump()
{
qController.qClient.sendStringUDP("/workspace/" + qController.qWorkspace.workspace_id + "/thump");
@@ -34,6 +34,8 @@ namespace qController
//info loaded from /children
public List<QCue> cues { get; set; }
//get string for icon font from cue type
public string getIconString()
{
return QIcon.GetIconFromType(type);
+2 -1
View File
@@ -1,4 +1,5 @@
using System;
//General information about a QLab Workspace
using System;
namespace qController
{
public class QInfo
@@ -1,4 +1,6 @@
using System;
//Class pertains to the local copy of a workspace, with methods for fetching/updating information inside
using System;
using System.Collections.Generic;
namespace qController