Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum values are not serialized to strings with SignalR #41

Open
martinkonopka opened this issue Mar 27, 2019 · 0 comments
Open

Enum values are not serialized to strings with SignalR #41

martinkonopka opened this issue Mar 27, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@martinkonopka
Copy link
Member

When reading data using the SignalR and GazeHub from GazeAccess plugin, validity codes are serialized as integers, not strings, even though the StringEnumConverter should be used. See below for example result in the SignalR client. Seems to be similar to this question in StackOverflow.

SignalR output:

{
  "TrackerTicks": 63689320326053870,
  "Validity": 17,
  "LeftEye": {
    "Validity": 1,
    "GazePoint2D": {
      "X": 0.200390625,
      "Y": 0.7930555555555555
    },
    "GazePoint3D": {
      "X": -155.19765625000002,
      "Y": 76.30106838676664,
      "Z": 10.912965460618338
    },
    "EyePosition3D": {
      "X": 0,
      "Y": 50,
      "Z": 634
    },
    "EyePosition3DRelative": {
      "X": 0.427537739276886,
      "Y": 0.35594475269317627,
      "Z": 0.6200730204582214
    },
    "PupilDiameter": 2.6
  },
  "RightEye": {
    "Validity": 1,
    "GazePoint2D": {
      "X": 0.200390625,
      "Y": 0.7930555555555555
    },
    "GazePoint3D": {
      "X": -155.19765625000002,
      "Y": 76.30106838676664,
      "Z": 10.912965460618338
    },
    "EyePosition3D": {
      "X": 0,
      "Y": 50,
      "Z": 634
    },
    "EyePosition3DRelative": {
      "X": 0.427537739276886,
      "Y": 0.35594475269317627,
      "Z": 0.6200730204582214
    },
    "PupilDiameter": 2.6
  },
  "Timestamp": "2019-03-27T21:52:06.0538696+01:00"
}

GET /api/gaze output:

{
  "trackerTicks": 63689321268009837,
  "validity": "Both",
  "leftEye": {
    "validity": "Valid",
    "gazePoint2D": {
      "x": 0.25703125,
      "y": 0.041666666666666664
    },
    "gazePoint3D": {
      "x": -125.8578125,
      "y": 305.06915883223218,
      "z": 94.177822470664978
    },
    "eyePosition3D": {
      "x": 0.0,
      "y": 50.0,
      "z": 634.0
    },
    "eyePosition3DRelative": {
      "x": 0.427537739276886,
      "y": 0.35594475269317627,
      "z": 0.62007302045822144
    },
    "pupilDiameter": 2.6
  },
  "rightEye": {
    "validity": "Valid",
    "gazePoint2D": {
      "x": 0.25703125,
      "y": 0.041666666666666664
    },
    "gazePoint3D": {
      "x": -125.8578125,
      "y": 305.06915883223218,
      "z": 94.177822470664978
    },
    "eyePosition3D": {
      "x": 0.0,
      "y": 50.0,
      "z": 634.0
    },
    "eyePosition3DRelative": {
      "x": 0.427537739276886,
      "y": 0.35594475269317627,
      "z": 0.62007302045822144
    },
    "pupilDiameter": 2.6
  },
  "timestamp": "2019-03-27T22:07:48.0098371"
}
@martinkonopka martinkonopka added the bug Something isn't working label Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant