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

VSS / VSC integration of operations and signals for the same function #83

Open
gunnarx opened this issue Jan 31, 2022 · 2 comments
Open

Comments

@gunnarx
Copy link
Collaborator

gunnarx commented Jan 31, 2022

  • Can we allow signal actuation and RPC actuation to exist for the same function?
  • Is it possible to describe semantics for VSC that include VSS signals,
    while VSS signals behavior is defined in VSS (e.g. that writing to an actuator is seen as a target-value, and reading is current-value)

Consider also:

  • Methods that take parameter (e.g. row-number, seat-number) and modify the corresponding VSS signals (.Row1, .Row2 etc.)

Go through some examples to figure out how to do this.

@erikbosch
Copy link
Contributor

I think this is quite aligned with what we discussed recently, that VSC can be used for more advanced control of execution. Something like the seat service can be good example. Theoretically you can control e.g. horizontal position and recline directly by VSS-signals. But then you do not really get any feedback if the requested change could not be executed. And the movement may not be optimal or even unsafe for the driver. So it might be so that only e.g. the vehicle computer is allowed to set the VSS actuators, others must change them through services.

VSC services could be a way to encapsulate business logic. Like in the hypothetical example below. Recline and position are depending on each other, and a service could control conditions and movement to give a good user example. The service implementation itself may use VSS, but even if we would standardize "move_seat" the implementation shall most likely not be standardized, as it would be very vehicle specific.

int move_seat(int recline, int pos){
  if (pos + sin(recline) * 500 > 340) {
    return  invalid_argument; // no room for wanted configuration
  }
  start_time = now();
  while ((Seat.Pos.Get() != pos) || (Seat.Recline.Get() != recline)) {
    if (Vehicle.Speed.Get() > 5) {
      return incorrect_state;
    }
    Seat.Pos.Set(Seat.Pos.Get() + 0.05 * (pos-Seat.Pos.Get());
    Seat.Recline.Set(Seat.Recline.Get() + 0.08 * (recline-Seat.Recline.Get());
    sleep(1);
    if (30 > now() - start_time) {
      return expired; // We have to give up at some time
    }
  }
  return completed;
}

@gunnarx
Copy link
Collaborator Author

gunnarx commented Aug 14, 2023

Since this is a question for the definition of the language/interface-model that is now IFEX project, the issue will be transferred from Vehicle Service Catalog project to IFEX project.

@gunnarx gunnarx transferred this issue from COVESA/vehicle_service_catalog Aug 14, 2023
This was referenced Aug 14, 2023
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

2 participants