How to Check for Active Server?

Forum for C#/Windows development

How to Check for Active Server?

Postby john » 22 Mar 2014, 07:15

Hello,

I'm setting up the basics of an app that would check for and start the TET server process, then activate the server prior to calibration. I have the server process portion working, but is there a suggested method for the activation portion? My idea was to check whether the TET server is already activated (e.g. to see whether the process started by GazeManager.Instance.Activate(...) has already been completed/is working) and then skip activating it again if it's already working.

I see there is a variable called isActive in IGazeApiReponseListener, but I'm not sure a) if it's what I need, b) if it's part of the intended SDK use, or c) exactly how to get to it. There are also some tracking states in the GazeManager, but those appear to be related to whether the cable/server is connected, not whether the activation succeeded.

Thanks,
John
john
 
Posts: 12
Joined: 28 Feb 2014, 18:08

Re: How to Check for Active Server?

Postby leonardomack » 06 Apr 2014, 21:49

Do you have your own server? Or you are using the eye tribe one?
leonardomack
 
Posts: 3
Joined: 27 Mar 2014, 16:40

Re: How to Check for Active Server?

Postby john » 08 Apr 2014, 14:22

leonardomack wrote:Do you have your own server? Or you are using the eye tribe one?


I'm using the official one. For now, I just put in a global flag to disallow multiple activations of the unit (the data flow seems to get broken if the unit is activated again after already active). Of course, it would be nicer if the unit itself knew that it was already active and its status could be queried to prevent another activation.
john
 
Posts: 12
Joined: 28 Feb 2014, 18:08

Re: How to Check for Active Server?

Postby Anders » 15 Apr 2014, 15:56

Hi John

We have just released new SDKs for C# and Java that address this issue. GazeManager now has a IsActivated() method that will only return true once the connection to the server has been establisher _and_ the SDK has initialised itself.

Also, there is now an option list 'listen' for the connection state between SDK and server using interface IConnectionStateListener.

Hope this helps.

BR,
Anders
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

Re: How to Check for Active Server?

Postby john » 15 Apr 2014, 16:52

Anders wrote:Hi John

We have just released new SDKs for C# and Java that address this issue. GazeManager now has a IsActivated() method that will only return true once the connection to the server has been establisher _and_ the SDK has initialised itself.

Also, there is now an option list 'listen' for the connection state between SDK and server using interface IConnectionStateListener.

Hope this helps.

BR,
Anders


Hi Anders,

That is great news. I will check out the new implementation.

Thanks,
John
john
 
Posts: 12
Joined: 28 Feb 2014, 18:08

Re: How to Check for Active Server?

Postby john » 15 Apr 2014, 17:20

Anders wrote:Hi John

We have just released new SDKs for C# and Java that address this issue. GazeManager now has a IsActivated() method that will only return true once the connection to the server has been establisher _and_ the SDK has initialised itself.

Also, there is now an option list 'listen' for the connection state between SDK and server using interface IConnectionStateListener.

Hope this helps.

BR,
Anders


Hi Anders,

Where can I get the latest TETCSharpClient.dll (or otherwise update my project to use the latest SDK)? I didn't find the dll in the GitHub release for the C# client and previously got the dll from the GitHub sample projects that haven't been updated yet.

Thanks,
John
john
 
Posts: 12
Joined: 28 Feb 2014, 18:08

Re: How to Check for Active Server?

Postby Anders » 16 Apr 2014, 07:16

You should go to our github and see the tet-csharp-client repo.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

Re: How to Check for Active Server?

Postby john » 16 Apr 2014, 14:58

Anders wrote:You should go to our github and see the tet-csharp-client repo.


Hi Anders,

I have already downloaded the new version of the client. However, without the updated TETCSharpClient.dll file, which is referenced as the first step here (http://dev.theeyetribe.com/csharp/), I cannot make use of the new features.

Thanks,
John
john
 
Posts: 12
Joined: 28 Feb 2014, 18:08

Re: How to Check for Active Server?

Postby john » 16 Apr 2014, 15:27

john wrote:
Anders wrote:You should go to our github and see the tet-csharp-client repo.


Hi Anders,

I have already downloaded the new version of the client. However, without the updated TETCSharpClient.dll file, which is referenced as the first step here (http://dev.theeyetribe.com/csharp/), I cannot make use of the new features.

Thanks,
John


Building the GitHub project in Visual Studio yielded the updated client and json dlls to be included in a project. The documentation is misleading on this point, since it implies that the dlls already exist somewhere and gives no directions that a build is required.

The behavior of the EyeTribe Server looks much improved over the prior versions. It would hang if I tried to connect/activate/calibrate in rapid succession before. Now, it appears to connect and activate very quickly. When I try to overload it by going through the connect/activate/calibrate process too quickly, it seems to sort itself out in a few seconds by disconnecting and reconnecting automatically.

John
john
 
Posts: 12
Joined: 28 Feb 2014, 18:08

Re: How to Check for Active Server?

Postby Martin » 29 Apr 2014, 15:58

Hi John.

Thanks for the feedback.

The GitHub repository has been updated to include a precompiled binary (see Releases).

I've let the team know that you've noticed the improvements. We're continuously making it more robust through internal testing and external feedback.

Let us know if there's some things we should address further.
Martin
 
Posts: 567
Joined: 29 Oct 2013, 15:20


Return to C#