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

Write-only methods contain a VALUE attribute #32

Open
jangxx opened this issue Jan 24, 2023 · 0 comments
Open

Write-only methods contain a VALUE attribute #32

jangxx opened this issue Jan 24, 2023 · 0 comments

Comments

@jangxx
Copy link

jangxx commented Jan 24, 2023

Nodes with their ACCESS attribute set to write-only still return a VALUE attribute. For example:

{
  "DESCRIPTION": "root node",
  "FULL_PATH": "/",
  "ACCESS": 0,
  "CONTENTS": {
    "input": {
      "FULL_PATH": "/input",
      "ACCESS": 0,
      "CONTENTS": {
        "MoveForward": {
          "DESCRIPTION": "Moves you forward while the input equals 1..",
          "FULL_PATH": "/input/MoveForward",
          "ACCESS": 2, // <-- ACCESS indicates write-only...
          "TYPE": "T",
          "VALUE": [ // <-- ...but the VALUE attribute is still present
            false
          ]
        },
        // [ ... ]
     }
   }
}

This violates the proposal however:

VALUE The value stored with this string is an array that should contain one JSON item for each of the types described in the "TYPES" attribute (the structure of this array is described in greater detail in "Other notes on attributes"). Each item in the array should be a JSON representation of the corresponding OSC value type (a table is provided above with JSON equivalents for OSC data types).

  • If a query is performed for the "VALUE" attribute, but the "ACCESS" attribute indicates that the OSC method isn't readable, the query should return a 204 (no content/inappropriate request).
  • If a query is performed for the "VALUE" attribute, but the OSC method does not yet have a value, the query should return an empty JSON object.

(relevant part highlighted in italics)

ref: https://github.com/Vidvox/OSCQueryProposal#optional-attributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant