Skip to content

Commit

Permalink
Merge pull request #11 from arnebp/master
Browse files Browse the repository at this point in the history
Release v.0.9.77.6
  • Loading branch information
arnebp authored Nov 23, 2016
2 parents 985613d + 075fd09 commit 132784b
Show file tree
Hide file tree
Showing 18 changed files with 210 additions and 299 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Change Log #
---

Version 0.9.77.3 (2016-09-26)
Version 0.9.77.6 (2016-11-23)
---
- Fixed default network state
- Merged request/response value classes
- Improved initialization process

Version 0.9.77.5 (2016-09-26)
---
- Added support for listening to any calibration state change (ICalibrationStateListener)
- Runtime 'debug mode' now controlled through GazeManager.DebugMode
Expand Down
26 changes: 10 additions & 16 deletions sdk/GazeApiManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal class GazeApiManager
{
#region Constants

internal const string DEFAULT_SERVER_HOST = "localhost";
internal const string DEFAULT_SERVER_HOST = "127.0.0.1";
internal const int DEFAULT_SERVER_PORT = 6555;

#endregion
Expand Down Expand Up @@ -198,7 +198,7 @@ public void CancelAllRequests()
{
lock (_RequestQueue)
{
foreach(RequestBase<ResponseBase> r in _RequestQueue.GetList())
foreach(IRequest r in _RequestQueue.GetList())
{
r.Cancel();
}
Expand All @@ -214,7 +214,7 @@ public void RequestTracker(GazeManager.ApiVersion version)
Request(tsr);
}

public virtual void RequestAllStates()
public virtual Object[] RequestAllStates()
{
TrackerGetRequest tgr = new TrackerGetRequest();

Expand All @@ -234,6 +234,8 @@ public virtual void RequestAllStates()
};

Request(tgr);

return tgr.AsyncLock;
}

public void RequestCalibrationStates()
Expand Down Expand Up @@ -279,12 +281,10 @@ public void RequestTrackerState()
Request(tgr);
}

public Object RequestCalibrationStart(int pointcount)
public Object[] RequestCalibrationStart(int pointcount)
{
CalibrationStartRequest csr = new CalibrationStartRequest(pointcount);

csr.AsyncLock = new Object();

Request(csr);

return csr.AsyncLock;
Expand All @@ -304,14 +304,12 @@ public void RequestCalibrationPointEnd()
Request(cpe);
}

public Object RequestCalibrationAbort()
public Object[] RequestCalibrationAbort()
{
RequestBase<ResponseBase> ca = new RequestBase<ResponseBase>();
ca.Category = Protocol.CATEGORY_CALIBRATION;
ca.Request = Protocol.CALIBRATION_REQUEST_ABORT;

ca.AsyncLock = new Object();

Request(ca);

return ca.AsyncLock;
Expand All @@ -326,7 +324,7 @@ public void RequestCalibrationClear()
Request(cc);
}

public Object RequestScreenSwitch(int screenIndex, int screenResW, int screenResH, float screenPsyW, float screenPsyH)
public Object[] RequestScreenSwitch(int screenIndex, int screenResW, int screenResH, float screenPsyW, float screenPsyH)
{
TrackerSetRequest tsr = new TrackerSetRequest();

Expand All @@ -336,23 +334,19 @@ public Object RequestScreenSwitch(int screenIndex, int screenResW, int screenRes
tsr.Values.ScreenPhysicalWidth = screenPsyW;
tsr.Values.ScreenPhysicalHeight = screenPsyH;

tsr.AsyncLock = new Object();

Request(tsr);

return tsr.AsyncLock;
}

public Object RequestFrame()
public Object[] RequestFrame()
{
TrackerGetRequest tgr = new TrackerGetRequest();

tgr.Values = new String[] {
Protocol.TRACKER_FRAME
};

tgr.AsyncLock = new Object();

Request(tgr);

return tgr.AsyncLock;
Expand Down Expand Up @@ -470,7 +464,7 @@ private void Work()
}
else if (null != (response = _NetworkLayer.ParseIncomingProcessResponse(json, value)))
{
// We allow the network layer extensions to optinally handle the process reponse
// We allow the network layer extensions to optionally handle the process reponse
}
else
{
Expand Down
Loading

0 comments on commit 132784b

Please sign in to comment.