-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move display message interface and types outside ocpp as we want to u…
…se it for other than ocpp messages as well. Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
- Loading branch information
Showing
4 changed files
with
177 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters