Giter VIP home page Giter VIP logo

Comments (5)

wonsuk73 avatar wonsuk73 commented on July 30, 2024

@crea7or, for better understanding of your idea do you have any proposal?

from automotive.

erikbosch avatar erikbosch commented on July 30, 2024

@crea7or - are you looking for something like below, a possibility to use "post" on branch level and instead of just giving a value give a path/value array as argument. so that you e.g. could set both PerformanceMode and GearChangeMode in the same request

 POST /Vehicle/Drivetrain/Transmission   HTTP/1.1
            Host:127.0.0.1:1337
            Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiSm9obiBEb2UifQ.xuEv8qrfXu424LZk8bVgr9MQJUIrp1rHcPyZw_KSsds
            {
              // Path relatives to /Vehicle/Drivetrain/Transmission (or full?)
              “data”:[{“path”:”PerformanceMode”, "value": "sport"},{“path”:”GearChangeMode”, "value": "manual"}]
            }

from automotive.

crea7or avatar crea7or commented on July 30, 2024

@erikbosch yep, but prefer full paths like this, because in theory signals from the one frame can be in the different roots:

{
  "action": "set?",
  "data": [
    {
      "path": "Vehicle/Drivetrain/Transmission/PerformanceMode",
      "value": "sport"
    },
    {
      "path": "Vehicle/Drivetrain/Transmission/GearChangeMode",
      "value": "manual"
    }
  ],
  "requestId": "5687"
}

from automotive.

crea7or avatar crea7or commented on July 30, 2024

If one set command will be in priority, one value set can be just an object instead of an array of the objects:

{
  "action": "set",
  "data": 
    {
      "path": "Vehicle/Drivetrain/Transmission/PerformanceMode",
      "value": "sport"
    },
  "requestId": "5687"
}

from automotive.

crea7or avatar crea7or commented on July 30, 2024

Another idea is to specify root node(branch) like this:

{
  "action": "set",
  "data": [
    {
      "path": "PerformanceMode",
      "value": "sport"
    },
    {
      "path": "Gear",
      "value": "2"
    }
  ],
  "requestId": "5687",
  "root": "Vehicle/Drivetrain/Transmission"
}

This syntax will help us to subscribe to the branches to work with them as with composite types.

from automotive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.