Skip to content

Commit

Permalink
Move display message interface and types outside ocpp as we want to u…
Browse files Browse the repository at this point in the history
…se it for other than ocpp messages as well.

Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
  • Loading branch information
maaikez committed Jul 8, 2024
1 parent d956f22 commit e907501
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 171 deletions.
73 changes: 73 additions & 0 deletions interfaces/display_message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
description: >-
This interface allows to add / remove / change messages that should be showed on the display.
cmds:
set_display_message:
description: >-
Command to set or replace a display message.
arguments:
request:
description: >-
Request to set a display message
$ref: /display_message#/DisplayMessage
result:
description: >-
Response to the set display message request.
type: object
properties:
status:
description: Whether the charging station is able to display the message
$ref: /display_message#/DisplayMessageStatusEnum
status_info:
description: Detailed status information
$ref: /ocpp#/StatusInfoType
required:
- status
get_display_messages:
description: Command to get one or more display messages.
arguments:
request:
description: The request for display messages
type: object
properties:
id:
description: If provided the Charging Station shall return Display Messages of the given ids.
type: array
items:
type: integer
priority:
description: If provided the Charging Station shall return Display Messages with the given priority only.
$ref: /display_message#/MessagePriorityEnum
state:
description: If provided the Charging Station shall return Display Messages with the given state only.
$ref: /display_message#/MessageStateEnum
response:
description: The display messages or an empty array if there are none
type: object
properties:
status_info:
description: Detailed status information
$ref: /ocpp#/StatusInfoType
messages:
description: Requested messages, if any
type: array
items:
$ref: /display_message#/DisplayMessage
clear_display_message:
description: Command to remove a display message
request:
description: The request to clear a message
type: object
properties:
id:
description: Id of display message that should be removed from the charging station
type: integer
response:
description: Response on the clear message request
type: object
properties:
status:
$ref: /display_message#/ClearMessageResponseEnum
status_info:
$ref: /ocpp#/StatusInfoType
required:
- status
70 changes: 0 additions & 70 deletions interfaces/ocpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,76 +102,6 @@ cmds:
items:
type: object
$ref: /ocpp#/ComponentVariable
set_display_message:
description: >-
Command to set or replace a display message.
arguments:
request:
description: >-
DisplayMessage request, like done in OCPP 2.0.1, also used for 1.6 as DisplayMessage is not implemented there.
$ref: /ocpp#/DisplayMessage
result:
description: >-
Response to the set display message request, as specified in OCPP 2.0.1.
type: object
properties:
status:
description: Whether the charging station is able to display the message
$ref: /ocpp#/DisplayMessageStatusEnum
status_info:
description: Detailed status information
$ref: /ocpp#/StatusInfoType
required:
- status
get_display_messages:
description: Command to get one or more display messages.
arguments:
request:
description: The request for display messages
type: object
properties:
id:
description: If provided the Charging Station shall return Display Messages of the given ids.
type: array
items:
type: integer
priority:
description: If provided the Charging Station shall return Display Messages with the given priority only.
$ref: /ocp#/MessagePriorityEnum
state:
description: If provided the Charging Station shall return Display Messages with the given state only.
$ref: /ocpp#/MessageStateEnum
response:
description: The display messages or an empty array if there are none
type: object
properties:
status_info:
description: Detailed status information
$ref: /ocpp#/StatusInfoType
messages:
description: Requested messages, if any
type: array
items:
$ref: /ocpp#/DisplayMessage
clear_display_message:
description: Command to remove a display message
request:
description: The request to clear a message
type: object
properties:
id:
description: Id of display message that should be removed from the charging station
type: integer
response:
description: Response on the clear message request
type: object
properties:
status:
$ref: /ocpp#/ClearMessageResponseEnum
status_info:
$ref: /ocpp#/StatusInfoType
required:
- status
vars:
ocpp_transaction_event:
description: Emits events related to OCPP transactions
Expand Down
104 changes: 104 additions & 0 deletions types/display_message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
description: >-
Message to show on a display
types:
MessageContent:
description: Contains message details
required:
- format
- content
type: object
properties:
format:
type: string
$ref: /display_message#/MessageFormat
language:
type: string
content:
type: string
MessageFormat:
description: Format of the message to be displayed
type: string
enum:
- ASCII
- HTML
- URI
- UTF8
MessagePriorityEnum:
description: Priority of the message
type: string
enum:
- AlwaysFront
- InFront
- NormalCycle
MessageStateEnum:
description: During what state the message should be shown
type: string
enum:
- Charging
- Faulted
- Idle
- Unavailable
DisplayMessageStatusEnum:
description: Response on a display message request
type: string
enum:
- Accepted
- NotSupportedMessageFormat
- Rejected
- NotSupportedPriority
- NotSupportedState
- UnknownTransaction
ClearMessageResponseEnum:
description: Response on a clear display message request
type: string
enum:
- Accepted
- Unknown
DisplayMessage:
description: Message to show on a display
type: object
additionalProperties: false
properties:
id:
description: The message id
type: integer
priority:
description: Priority of the message
$ref: /display_message#/MessagePriorityEnum
state:
description: >-
During what state should this message be shown. When omitted, this message should be shown in any state of
the Charging Station
$ref: /display_message#/MessageStateEnum
timestamp_from:
description: >-
From what date-time should this message be shown. If omitted: directly.
type: string
format: date-time
timestamp_to:
description: >-
Until what date-time should this message be shoen, after this date/time this message SHALL be removed.
type: string
format: date-time
transaction_id:
description: >-
During which transaction shall this message be shown. Message SHALL be removed by the Charging Station
after transaction has ended.
type: string
minLength: 0
maxLength: 36
message:
$ref: /display_message#/MessageContent
description: The message to show
message_format:
description: The format of the message
$ref: /display_message#/MessageFormat
display:
description: >-
When a Charging Station has multiple Displays, this field can be used to define to which Display this message
belongs.
$ref: /display_message#/Component
required:
- id
- priority
- message
101 changes: 0 additions & 101 deletions types/ocpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,107 +113,6 @@ types:
- Started
- Updated
- Ended
MessageContent:
description: Contains message details
required:
- format
- content
type: object
properties:
format:
type: string
$ref: /ocpp#/MessageFormat
language:
type: string
content:
type: string
MessageFormat:
description: Format of the message to be displayed
type: string
enum:
- ASCII
- HTML
- URI
- UTF8
MessagePriorityEnum:
description: Priority of the message
type: string
enum:
- AlwaysFront
- InFront
- NormalCycle
MessageStateEnum:
description: During what state the message should be shown
type: string
enum:
- Charging
- Faulted
- Idle
- Unavailable
DisplayMessageStatusEnum:
description: Response on a display message request
type: string
enum:
- Accepted
- NotSupportedMessageFormat
- Rejected
- NotSupportedPriority
- NotSupportedState
- UnknownTransaction
ClearMessageResponseEnum:
description: Response on a clear display message request
type: string
enum:
- Accepted
- Unknown
DisplayMessage:
description: Message to show on a display
type: object
additionalProperties: false
properties:
id:
description: The message id
type: integer
priority:
description: Priority of the message
$ref: /ocp#/MessagePriorityEnum
state:
description: >-
During what state should this message be shown. When omitted, this message should be shown in any state of
the Charging Station
$ref: /ocpp#/MessageStateEnum
timestamp_from:
description: >-
From what date-time should this message be shown. If omitted: directly.
type: string
format: date-time
timestamp_to:
description: >-
Until what date-time should this message be shoen, after this date/time this message SHALL be removed.
type: string
format: date-time
transaction_id:
description: >-
During which transaction shall this message be shown. Message SHALL be removed by the Charging Station
after transaction has ended.
type: string
minLength: 0
maxLength: 36
message:
$ref: /ocpp#/MessageContent
description: The message to show
message_format:
description: The format of the message
$ref: /ocpp#/MessageFormat
display:
description: >-
When a Charging Station has multiple Displays, this field can be used to define to which Display this message
belongs.
$ref: /ocpp#/Component
required:
- id
- priority
- message
OcppTransactionEventResponse:
description: Information that can be returned with a OCPP TransactionEventResponse
type: object
Expand Down

0 comments on commit e907501

Please sign in to comment.