Skip to content

Commit

Permalink
Introduce Moveable item as concept. (#625)
Browse files Browse the repository at this point in the history
This also means that door get a new signal for position.

Signed-off-by: Erik Jaegervall <[email protected]>
  • Loading branch information
erikbosch authored Sep 13, 2023
1 parent 8745f3a commit 2a01c70
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 101 deletions.
20 changes: 4 additions & 16 deletions spec/Body/Body.vspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,25 @@ RefuelPosition:
#
Hood:
type: branch
description: Hood status.
description: Hood status. Start position for Hood is Closed.
comment: The hood is the hinged cover over the engine compartment of a motor vehicles.
Depending on vehicle, it can be either in the front or back of the vehicle.
Luggage compartments are in VSS called trunks, even if they are located at the front of the vehicle.

Hood.IsOpen:
datatype: boolean
type: actuator
description: Hood open or closed. True = Open. False = Closed.

#include ../include/MovableItem.vspec Hood

#
# Trunk description
#
Trunk:
type: branch
instances: ["Front", "Rear"]
description: Trunk status.
description: Trunk status. Start position for Trunk is Closed.
comment: A trunk is a luggage compartment in a vehicle.
Depending on vehicle, it can be either in the front or back of the vehicle.
Some vehicles may have trunks both at the front and at the rear of the vehicle.

Trunk.IsOpen:
datatype: boolean
type: actuator
description: Trunk open or closed. True = Open. False = Closed.

Trunk.IsLocked:
datatype: boolean
type: actuator
description: Is trunk locked or unlocked. True = Locked. False = Unlocked.
#include ../include/LockableMovableItem.vspec Trunk

Trunk.IsLightOn:
datatype: boolean
Expand Down
10 changes: 6 additions & 4 deletions spec/Cabin/Cabin.vspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
##
RearShade:
type: branch
description: Rear window shade.
description: Rear window shade. Open = Retracted, Closed = Deployed.
Start position for RearShade is Open/Retracted.

# Include the same shade spec used for sunroof and side windows.
#include SingleShade.vspec RearShade
#include ../include/MovableItem.vspec RearShade

##
# HVAC signals
Expand Down Expand Up @@ -65,10 +66,11 @@ Sunroof.Switch:

Sunroof.Shade:
type: branch
description: Sun roof shade status.
description: Sun roof shade status. Open = Retracted, Closed = Deployed.
Start position for Sunroof.Shade is Open/Retracted.

# Include shade specification also used by side and rear window.
#include SingleShade.vspec Sunroof.Shade
#include ../include/MovableItem.vspec Sunroof.Shade

#
# Rear-view mirror signals
Expand Down
21 changes: 7 additions & 14 deletions spec/Cabin/SingleDoor.vspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,19 @@
#

#
# Definition of a single door
# Definition of a single door. Start position for Door is Closed.
#
IsOpen:
datatype: boolean
type: actuator
description: Is door open or closed

IsLocked:
datatype: boolean
type: actuator
description: Is door locked or unlocked. True = Locked. False = Unlocked.

#include ../include/LockableMovableItem.vspec

#
# Window description
#
Window:
type: branch
description: Door window status
description: Door window status. Start position for Window is Closed.

#include SingleWindow.vspec Window
#include ../include/MovableItem.vspec Window

#
# Child lock active for door
Expand All @@ -44,9 +36,10 @@ IsChildLockActive:
#
Shade:
type: branch
description: Side window shade
description: Side window shade. Open = Retracted, Closed = Deployed.
Start position for Shade is Open/Retracted.

# Include the standard shade definition used by sunroof
# and rear shade.

#include SingleShade.vspec Shade
#include ../include/MovableItem.vspec Shade
23 changes: 0 additions & 23 deletions spec/Cabin/SingleShade.vspec

This file was deleted.

17 changes: 0 additions & 17 deletions spec/Cabin/SingleSliderSwitch.vspec

This file was deleted.

27 changes: 0 additions & 27 deletions spec/Cabin/SingleWindow.vspec

This file was deleted.

18 changes: 18 additions & 0 deletions spec/include/LockableMovableItem.vspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# (C) 2023 Robert Bosch GmbH
# (C) 2018 Volvo Cars
# (C) 2016 Jaguar Land Rover
#
# All files and artifacts in this repository are licensed under the
# provisions of the license provided by the LICENSE file in this repository.
#

#
# Add-on to MovableItems that also are lockable

IsLocked:
datatype: boolean
type: actuator
description: Is item locked or unlocked. True = Locked. False = Unlocked.

#include MovableItem.vspec
40 changes: 40 additions & 0 deletions spec/include/MovableItem.vspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# (C) 2018 Volvo Cars
# (C) 2016 Jaguar Land Rover
#
# All files and artifacts in this repository are licensed under the
# provisions of the license provided by the LICENSE file in this repository.
#

#
# Generic signals to control movable items such as door, sunroof, window, blind, etc.
# The meaning of Open/Close and Start/End position is item dependent and shall better be
# described by the item using MovableItem.
#
# Start position is typically the "default position", where doors/windows/sunroofs are typically closed,
# but shades/blinders are typically open/retracted.
#
# For Shade/Blinders and similar items:
# "Open" means the Shade/blinder is fully retracted and does not obstruct light
# "Close" means the Shade/blinder is fully deployed and obstruct light as much as possible
#

IsOpen:
datatype: boolean
type: actuator
description: Is item open or closed? True = Fully or partially open. False = Fully closed.

Position:
datatype: uint8
type: actuator
min: 0
max: 100
unit: percent
description: Item position. 0 = Start position 100 = End position.
comment: Relationship between Open/Close and Start/End position is item dependent.

Switch:
datatype: string
type: actuator
allowed: ['INACTIVE', 'CLOSE', 'OPEN', 'ONE_SHOT_CLOSE', 'ONE_SHOT_OPEN']
description: Switch controlling sliding action such as window, sunroof, or blind.

0 comments on commit 2a01c70

Please sign in to comment.