From 0ef010ed1ebdbb3f8cbe2365969929cbc59ff6f9 Mon Sep 17 00:00:00 2001 From: Sebastiaan la Fleur Date: Mon, 29 Jul 2024 09:53:24 +0200 Subject: [PATCH 1/4] 38: Update the dev requirements/dependencies. --- dev-requirements.txt | 167 ++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 105 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 2ef5346..1ab4ec7 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -6,29 +6,25 @@ # alabaster==0.7.13 # via sphinx -argcomplete==3.1.2 +argcomplete==3.4.0 # via datamodel-code-generator -astroid==3.0.1 +astroid==3.2.4 # via pylint -attrs==23.1.0 - # via jsonschema -babel==2.13.1 +babel==2.15.0 # via sphinx -black==23.10.1 +black==24.4.2 # via datamodel-code-generator -build==1.0.3 +build==1.2.1 # via pip-tools -cachetools==5.3.2 +cachetools==5.4.0 # via tox -certifi==2023.7.22 +certifi==2024.7.4 # via requests cfgv==3.4.0 # via pre-commit chardet==5.2.0 - # via - # prance - # tox -charset-normalizer==3.3.1 + # via tox +charset-normalizer==3.3.2 # via requests click==8.1.7 # via @@ -37,171 +33,135 @@ click==8.1.7 # s2-python (setup.cfg) colorama==0.4.6 # via tox -coverage[toml]==7.3.2 - # via pytest-cov -datamodel-code-generator==0.22.1 +coverage[toml]==7.6.0 + # via + # coverage + # pytest-cov +datamodel-code-generator==0.25.8 # via s2-python (setup.cfg) -dill==0.3.7 +dill==0.3.8 # via pylint -distlib==0.3.7 +distlib==0.3.8 # via virtualenv -dnspython==2.4.2 +dnspython==2.6.1 # via email-validator -docutils==0.18.1 +docutils==0.20.1 # via # sphinx # sphinx-rtd-theme # sphinx-tabs -email-validator==2.1.0.post1 +email-validator==2.2.0 # via pydantic -exceptiongroup==1.1.3 +exceptiongroup==1.2.2 # via pytest -filelock==3.13.0 +filelock==3.15.4 # via # tox # virtualenv -genson==1.2.2 +genson==1.3.0 # via datamodel-code-generator -identify==2.5.31 +identify==2.6.0 # via pre-commit -idna==3.4 +idna==3.7 # via # email-validator # requests imagesize==1.4.1 # via sphinx -importlib-metadata==6.8.0 +importlib-metadata==8.2.0 # via # build # sphinx -importlib-resources==5.13.0 - # via - # jsonschema - # openapi-spec-validator inflect==5.6.2 # via datamodel-code-generator iniconfig==2.0.0 # via pytest -isort==5.12.0 +isort==5.13.2 # via # datamodel-code-generator # pylint -jinja2==3.1.2 +jinja2==3.1.4 # via # datamodel-code-generator # sphinx -jsonschema==4.17.3 - # via - # jsonschema-spec - # openapi-schema-validator - # openapi-spec-validator -jsonschema-spec==0.1.6 - # via openapi-spec-validator -lazy-object-proxy==1.9.0 - # via openapi-spec-validator -markupsafe==2.1.3 +markupsafe==2.1.5 # via jinja2 mccabe==0.7.0 # via pylint -mypy==1.6.1 +mypy==1.11.0 # via s2-python (setup.cfg) mypy-extensions==1.0.0 # via # black # mypy -nodeenv==1.8.0 +nodeenv==1.9.1 # via pre-commit -openapi-schema-validator==0.4.4 - # via openapi-spec-validator -openapi-spec-validator==0.5.7 - # via datamodel-code-generator -packaging==23.2 +packaging==24.1 # via # black # build # datamodel-code-generator - # prance # pyproject-api # pytest # sphinx # tox -pathable==0.4.3 - # via jsonschema-spec -pathspec==0.11.2 +pathspec==0.12.1 # via black -pip-tools==7.3.0 +pip-tools==7.4.1 # via s2-python (setup.cfg) -pkgutil-resolve-name==1.3.10 - # via jsonschema -platformdirs==3.11.0 +platformdirs==4.2.2 # via # black # pylint # tox # virtualenv -pluggy==1.3.0 +pluggy==1.5.0 # via # pytest # tox -prance==23.6.21.0 - # via datamodel-code-generator pre-commit==3.5.0 # via s2-python (setup.cfg) -pydantic[email]==1.10.13 +pydantic[email]==1.10.17 # via # datamodel-code-generator # s2-python (setup.cfg) -pygments==2.16.1 +pygments==2.18.0 # via # sphinx # sphinx-tabs -pylint==3.0.2 +pylint==3.2.6 # via s2-python (setup.cfg) -pyproject-api==1.6.1 +pyproject-api==1.7.1 # via tox -pyproject-hooks==1.0.0 - # via build -pyrsistent==0.20.0 - # via jsonschema -pysnooper==1.2.0 - # via datamodel-code-generator -pytest==7.4.3 +pyproject-hooks==1.1.0 + # via + # build + # pip-tools +pytest==8.3.2 # via # pytest-cov # pytest-timer # s2-python (setup.cfg) -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via pytest-cover pytest-cover==3.0.0 # via pytest-coverage pytest-coverage==0.0 # via s2-python (setup.cfg) -pytest-timer==0.0.11 +pytest-timer==1.0.0 # via s2-python (setup.cfg) -pytz==2023.3.post1 +pytz==2024.1 # via # babel # s2-python (setup.cfg) pyyaml==6.0.1 # via - # jsonschema-spec + # datamodel-code-generator # pre-commit -requests==2.31.0 - # via - # jsonschema-spec - # prance - # sphinx -rfc3339-validator==0.1.4 - # via openapi-schema-validator -ruamel-yaml==0.18.3 - # via prance -ruamel-yaml-clib==0.2.8 - # via ruamel-yaml +requests==2.32.3 + # via sphinx six==1.16.0 - # via - # prance - # rfc3339-validator - # sphinxcontrib-httpdomain + # via sphinxcontrib-httpdomain snowballstemmer==2.2.0 # via sphinx sphinx==7.1.2 @@ -217,9 +177,9 @@ sphinx-copybutton==0.5.2 # via s2-python (setup.cfg) sphinx-fontawesome==0.0.6 # via s2-python (setup.cfg) -sphinx-rtd-theme==1.3.0 +sphinx-rtd-theme==2.0.0 # via s2-python (setup.cfg) -sphinx-tabs==3.4.4 +sphinx-tabs==3.4.5 # via s2-python (setup.cfg) sphinxcontrib-applehelp==1.0.4 # via sphinx @@ -248,34 +208,31 @@ tomli==2.0.1 # pip-tools # pylint # pyproject-api - # pyproject-hooks # pytest # tox -tomlkit==0.12.1 +tomlkit==0.13.0 # via pylint -tox==4.11.3 +tox==4.16.0 # via s2-python (setup.cfg) -types-pytz==2023.3.1.1 +types-pytz==2024.1.0.20240417 # via s2-python (setup.cfg) -typing-extensions==4.8.0 +typing-extensions==4.12.2 # via # astroid # black # mypy # pydantic # pylint -urllib3==2.0.7 +urllib3==2.2.2 # via requests -virtualenv==20.24.6 +virtualenv==20.26.3 # via # pre-commit # tox -wheel==0.41.3 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 - # via - # importlib-metadata - # importlib-resources +zipp==3.19.2 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip From e3d327192cb8fdb83049880d29377dcf242f11e9 Mon Sep 17 00:00:00 2001 From: Sebastiaan la Fleur Date: Mon, 29 Jul 2024 09:53:38 +0200 Subject: [PATCH 2/4] 38: Update S2 definitions to 0.0.2-beta. --- specification/openapi.yml | 2930 ++++++++++++++++++------------------- 1 file changed, 1385 insertions(+), 1545 deletions(-) diff --git a/specification/openapi.yml b/specification/openapi.yml index 781fea5..5990367 100644 --- a/specification/openapi.yml +++ b/specification/openapi.yml @@ -1,1196 +1,1081 @@ +openapi: 3.0.0 +info: + title: s2-ws-json schema's in OpenAPI + version: main + description: "NB: S2-WS-JSON IS NOT A REST API, SO THIS FILE CANNOT BE USED TO GENERATE AN S2-WS-JSON ENDPOINT! S2-ws-json uses WebSockets for communication. An AsyincAPI and JSON-Schema specification is provided as well. This file is provided for developers who prefer OpenAPI code generators for generating data classes in their programming language. In that case you still need to impement the code for using WebSockets yourself." +paths: + /fake: + get: + responses: + '404': + description: "Do not use. An openAPI specification needs at least one path to be valid." components: schemas: - Commodity: - description: 'GAS: Identifier for Commodity GAS - - HEAT: Identifier for Commodity HEAT - - ELECTRICITY: Identifier for Commodity ELECTRICITY - - OIL: Identifier for Commodity OIL' - enum: - - GAS - - HEAT - - ELECTRICITY - - OIL - CommodityQuantity: - description: 'ELECTRIC.POWER.L1: Electric power described in Watt on phase 1. If a device utilizes only one phase it should always use L1. - - ELECTRIC.POWER.L2: Electric power described in Watt on phase 2. Only applicable for 3 phase devices. - - ELECTRIC.POWER.L3: Electric power described in Watt on phase 3. Only applicable for 3 phase devices. - - ELECTRIC.POWER.3_PHASE_SYMMETRIC: Electric power described in Watt on when power is equally shared among the three phases. Only applicable for 3 phase devices. - - NATURAL_GAS.FLOW_RATE: Gas flow rate described in liters per second - - HYDROGEN.FLOW_RATE: Gas flow rate described in grams per second - - HEAT.TEMPERATURE: Heat described in degrees Celsius - - HEAT.FLOW_RATE: Flow rate of heat carrying gas or liquid in liters per second - - HEAT.THERMAL_POWER: Thermal power in Watt - - OIL.FLOW_RATE: Oil flow rate described in liters per hour' - enum: - - ELECTRIC.POWER.L1 - - ELECTRIC.POWER.L2 - - ELECTRIC.POWER.L3 - - ELECTRIC.POWER.3_PHASE_SYMMETRIC - - NATURAL_GAS.FLOW_RATE - - HYDROGEN.FLOW_RATE - - HEAT.TEMPERATURE - - HEAT.FLOW_RATE - - HEAT.THERMAL_POWER - - OIL.FLOW_RATE - ControlType: - description: 'POWER_ENVELOPE_BASED_CONTROL: Identifier for the Power Envelope Based Control type - - POWER_PROFILE_BASED_CONTROL: Identifier for the Power Profile Based Control type - - OPERATION_MODE_BASED_CONTROL: Identifier for the Operation Mode Based Control type - - FILL_RATE_BASED_CONTROL: Identifier for the Demand Driven Based Control type - - DEMAND_DRIVEN_BASED_CONTROL: Identifier for the Fill Rate Based Control type - - NOT_CONTROLABLE: Identifier that is to be used if no control is possible. Resources of this type can still provide measurements and forecast - - NO_SELECTION: Identifier that is to be used if no control type is or has been selected. ' - enum: - - POWER_ENVELOPE_BASED_CONTROL - - POWER_PROFILE_BASED_CONTROL - - OPERATION_MODE_BASED_CONTROL - - FILL_RATE_BASED_CONTROL - - DEMAND_DRIVEN_BASED_CONTROL - - NOT_CONTROLABLE - - NO_SELECTION + Duration: + type: integer + minimum: 0 + description: "Duration in milliseconds" + ID: + type: string + pattern: "[a-zA-Z0-9\\-_:]{2,64}" + description: "UUID" Currency: - description: Currency used when this resource gives cost information - enum: - - AED - - ANG - - AUD - - CHE - - CHF - - CHW - - EUR - - GBP - - LBP - - LKR - - LRD - - LSL - - LYD - - MAD - - MDL - - MGA - - MKD - - MMK - - MNT - - MOP - - MRO - - MUR - - MVR - - MWK - - MXN - - MXV - - MYR - - MZN - - NAD - - NGN - - NIO - - NOK - - NPR - - NZD - - OMR - - PAB - - PEN - - PGK - - PHP - - PKR - - PLN - - PYG - - QAR - - RON - - RSD - - RUB - - RWF - - SAR - - SBD - - SCR - - SDG - - SEK - - SGD - - SHP - - SLL - - SOS - - SRD - - SSP - - STD - - SYP - - SZL - - THB - - TJS - - TMT - - TND - - TOP - - TRY - - TTD - - TWD - - TZS - - UAH - - UGX - - USD - - USN - - UYI - - UYU - - UZS - - VEF - - VND - - VUV - - WST - - XAG - - XAU - - XBA - - XBB - - XBC - - XBD - - XCD - - XOF - - XPD - - XPF - - XPT - - XSU - - XTS - - XUA - - XXX - - YER - - ZAR - - ZMW - - ZWL + enum: [AED,ANG,AUD,CHE,CHF,CHW,EUR,GBP,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRO,MUR,MVR,MWK,MXN,MXV,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLL,SOS,SRD,SSP,STD,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,USN,UYI,UYU,UZS,VEF,VND,VUV,WST,XAG,XAU,XBA,XBB,XBC,XBD,XCD,XOF,XPD,XPF,XPT,XSU,XTS,XUA,XXX,YER,ZAR,ZMW,ZWL] + SessionRequestType: type: string - DDBC_ActuatorDescription: - additionalProperties: false - properties: - diagnostic_label: - description: Human readable name/description of the actuator. This element is only intended for diagnostic purposes and not for HMI applications. - type: string - id: - $ref: '#/components/schemas/ID' - description: ID of this DDBC.ActuatorDescription. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - operation_modes: - description: List of all Operation Modes that are available for this actuator. There shall be at least one DDBC.OperationMode. - items: - $ref: '#/components/schemas/DDBC_OperationMode' - maxItems: 100 - minItems: 1 - type: array - supported_commodites: - description: Commodities supported by the operation modes of this actuator. There shall be at least one commodity - items: - $ref: '#/components/schemas/Commodity' - maxItems: 4 - minItems: 1 - type: array - timers: - description: List of Timers associated with Transitions for this Actuator. Can be empty. - items: - $ref: '#/components/schemas/Timer' - maxItems: 1000 - minItems: 0 - type: array - transitions: - description: List of Transitions between Operation Modes. Shall contain at least one Transition. - items: - $ref: '#/components/schemas/Transition' - maxItems: 1000 - minItems: 0 - type: array + enum: ["RECONNECT", "TERMINATE"] + description: | + RECONNECT: Please reconnect the WebSocket session. Once reconnected, it starts from scratch with a handshake. + TERMINATE: Disconnect the session (client can try to reconnecting with exponential backoff) + RevokableObjects: + type: string + enum: ["PEBC.PowerConstraints", "PEBC.EnergyConstraint", "PEBC.Instruction", "PPBC.PowerProfileDefinition", "PPBC.ScheduleInstruction", "PPBC.StartInterruptionInstruction", "PPBC.EndInterruptionInstruction", "OMBC.SystemDescription", "OMBC.Instruction", "FRBC.SystemDescription", "FRBC.Instruction", "DDBC.SystemDescription", "DDBC.Instruction"] + description: | + PEBC.PowerConstraints: Object type PEBC.PowerConstraints + PEBC.EnergyConstraint: Object type PEBC.EnergyConstraint + PEBC.Instruction: Object type PEBC.Instruction + PPBC.PowerProfileDefinition: Object type PPBC.PowerProfileDefinition + PPBC.ScheduleInstruction: Object type PPBC.ScheduleInstruction + PPBC.StartInterruptionInstruction: Object type PPBC.StartInterruptionInstruction + PPBC.EndInterruptionInstruction: Object type PPBC.EndInterruptionInstruction + OMBC.SystemDescription: Object type OMBC.SystemDescription + OMBC.Instruction: Object type OMBC.Instruction + FRBC.SystemDescription: Object type FRBC.SystemDescription + FRBC.Instruction: Object type FRBC.Instruction + DDBC.SystemDescription: Object type DDBC.SystemDescription + DDBC.Instruction: Object type DDBC.Instruction + EnergyManagementRole: + type: string + enum: ["CEM", "RM"] + description: | + CEM: Customer Energy Manager + RM: Resource Manager + ReceptionStatusValues: + type: string + enum: ["INVALID_DATA", "INVALID_MESSAGE", "INVALID_CONTENT", "TEMPORARY_ERROR", "PERMANENT_ERROR", "OK"] + description: | + INVALID_DATA: Message not understood (e.g. not valid JSON, no message_id found). Consequence: Message is ignored, proceed if possible + INVALID_MESSAGE: Message was not according to schema. Consequence: Message is ignored, proceed if possible + INVALID_CONTENT: Message contents is invalid (e.g. contains a non-existing ID). Somewhat equivalent to BAD_REQUEST in HTTP.. Consequence: Message is ignored, proceed if possible. + TEMPORARY_ERROR: Receiver encountered an error. Consequence: Try to send to message again + PERMANENT_ERROR: Receiver encountered an error which it cannot recover from. Consequence: Disconnect. + OK: Message processed normally. Consequence: Proceed normally. + PowerValue: + type: object required: - - id - - supported_commodites - - operation_modes - - transitions - - timers - DDBC_ActuatorStatus: - additionalProperties: false + - commodity_quantity + - value properties: - active_operation_mode_id: - $ref: '#/components/schemas/ID' - description: The operation mode that is presently active for this actuator. - actuator_id: - $ref: '#/components/schemas/ID' - description: ID of the actuator this messages refers to - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: DDBC.ActuatorStatus - type: string - operation_mode_factor: - description: The number indicates the factor with which the DDBC.OperationMode is configured. The factor should be greater than or equal to 0 and less or equal to 1. + commodity_quantity: + $ref: '#/components/schemas/CommodityQuantity' + description: "The power quantity the value refers to" + value: type: number - previous_operation_mode_id: - $ref: '#/components/schemas/ID' - description: ID of the DDBC,OperationMode that was active before the present one. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of. - transition_timestamp: - description: Time at which the transition from the previous DDBC.OperationMode to the active DDBC.OperationMode was initiated. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of. - format: date-time - type: string - required: - - message_type - - message_id - - actuator_id - - active_operation_mode_id - - operation_mode_factor - DDBC_AverageDemandRateForecast: + description: "Power value expressed in the unit associated with the CommodityQuantity" additionalProperties: false - properties: - elements: - description: Elements of the profile. Elements must be placed in chronological order. - items: - $ref: '#/components/schemas/DDBC_AverageDemandRateForecastElement' - maxItems: 288 - minItems: 1 - type: array - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: DDBC.AverageDemandRateForecast - type: string - start_time: - description: Start time of the profile. - format: date-time - type: string + PowerForecastValue: + type: object required: - - message_type - - message_id - - start_time - - elements - DDBC_AverageDemandRateForecastElement: - additionalProperties: false + - value_expected + - commodity_quantity properties: - demand_rate_expected: - description: The most likely value for the demand rate; the expected increase or decrease of the fill_level per second + value_upper_limit: type: number - demand_rate_lower_68PPR: - description: The lower limit of the range with a 68 % probability that the demand rate is within that range + description: "The upper boundary of the range with 100 % certainty the power value is in it" + value_upper_95PPR: type: number - demand_rate_lower_95PPR: - description: The lower limit of the range with a 95 % probability that the demand rate is within that range + description: "The upper boundary of the range with 95 % certainty the power value is in it" + value_upper_68PPR: type: number - demand_rate_lower_limit: - description: The lower limit of the range with a 100 % probability that the demand rate is within that range + description: "The upper boundary of the range with 68 % certainty the power value is in it" + value_expected: type: number - demand_rate_upper_68PPR: - description: The upper limit of the range with a 68 % probability that the demand rate is within that range + description: "The expected power value." + value_lower_68PPR: type: number - demand_rate_upper_95PPR: - description: The upper limit of the range with a 95 % probability that the demand rate is within that range + description: "The lower boundary of the range with 68 % certainty the power value is in it" + value_lower_95PPR: type: number - demand_rate_upper_limit: - description: The upper limit of the range with a 100 % probability that the demand rate is within that range + description: "The lower boundary of the range with 95 % certainty the power value is in it" + value_lower_limit: type: number - duration: - $ref: '#/components/schemas/Duration' - description: Duration of the element + description: "The lower boundary of the range with 100 % certainty the power value is in it" + commodity_quantity: + $ref: '#/components/schemas/CommodityQuantity' + description: "The power quantity the value refers to" + additionalProperties: false + PowerRange: + type: object required: - - duration - - demand_rate_expected - DDBC_Instruction: + - start_of_range + - end_of_range + - commodity_quantity + properties: + start_of_range: + type: number + description: "Power value that defines the start of the range." + end_of_range: + type: number + description: "Power value that defines the end of the range." + commodity_quantity: + $ref: '#/components/schemas/CommodityQuantity' + description: "The power quantity the values refer to" additionalProperties: false + NumberRange: + type: object + required: + - start_of_range + - end_of_range + properties: + start_of_range: + type: number + description: "Number that defines the start of the range" + end_of_range: + type: number + description: "Number that defines the end of the range" + additionalProperties: false + Role: + type: object + required: + - role + - commodity + properties: + role: + $ref: '#/components/schemas/RoleType' + description: "Role type of the Resource Manager for the given commodity" + commodity: + $ref: '#/components/schemas/Commodity' + description: "Commodity the role refers to." + additionalProperties: false + Transition: + type: object + required: + - id + - from + - to + - start_timers + - blocking_timers + - abnormal_condition_only properties: - abnormal_condition: - description: Indicates if this is an instruction during an abnormal condition - type: boolean - actuator_id: - $ref: '#/components/schemas/ID' - description: ID of the actuator this Instruction belongs to. - execution_time: - description: Indicates the moment the execution of the instruction shall start - format: date-time - type: string id: $ref: '#/components/schemas/ID' - description: Identifier of this DDBC.Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - message_id: + description: "ID of the Transition. Must be unique in the scope of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in which it is used." + from: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: DDBC.Instruction - type: string - operation_mode_factor: - description: The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1. - type: number - operation_mode_id: + description: "ID of the OperationMode (exact type differs per ControlType) that should be switched from." + to: $ref: '#/components/schemas/ID' - description: ID of the DDBC.OperationMode + description: "ID of the OperationMode (exact type differs per ControlType) that will be switched to." + start_timers: + type: array + minItems: 0 + maxItems: 1000 + items: + $ref: '#/components/schemas/ID' + description: "List of IDs of Timers that will be (re)started when this transition is initiated" + blocking_timers: + type: array + minItems: 0 + maxItems: 1000 + items: + $ref: '#/components/schemas/ID' + description: "List of IDs of Timers that block this Transition from initiating while at least one of these Timers is not yet finished" + transition_costs: + type: number + description: "Absolute costs for going through this Transition in the currency as described in the ResourceManagerDetails." + transition_duration: + $ref: '#/components/schemas/Duration' + description: "Indicates the time between the initiation of this Transition, and the time at which the device behaves according to the Operation Mode which is defined in the ‘to’ data element. When no value is provided it is assumed the transition duration is negligible." + abnormal_condition_only: + type: boolean + description: "Indicates if this Transition may only be used during an abnormal condition (see Clause )" + additionalProperties: false + Timer: + type: object required: - - message_type - - message_id - id - - execution_time - - abnormal_condition - - actuator_id - - operation_mode_id - - operation_mode_factor - DDBC_OperationMode: - additionalProperties: false + - duration properties: - Id: + id: $ref: '#/components/schemas/ID' - description: ID of this operation mode. Must be unique in the scope of the DDBC.ActuatorDescription in which it is used. - abnormal_condition_only: - description: Indicates if this DDBC.OperationMode may only be used during an abnormal condition. - type: boolean + description: "ID of the Timer. Must be unique in the scope of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in which it is used." diagnostic_label: - description: Human readable name/description of the DDBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications. type: string - power_ranges: - description: The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity. - items: - $ref: '#/components/schemas/PowerRange' - maxItems: 10 - minItems: 1 + description: "Human readable name/description of the Timer. This element is only intended for diagnostic purposes and not for HMI applications." + duration: + $ref: '#/components/schemas/Duration' + description: "The time it takes for the Timer to finish after it has been started" + additionalProperties: false + PowerForecastElement: + type: object + required: + - duration + - power_values + properties: + duration: + $ref: '#/components/schemas/Duration' + description: "Duration of the PowerForecastElement" + power_values: type: array - running_costs: - $ref: '#/components/schemas/NumberRange' - description: Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor. - supply_range: - $ref: '#/components/schemas/NumberRange' - description: The supply rate this DDBC.OperationMode can deliver for the CEM to match the demand rate. The start of the NumberRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/PowerForecastValue' + description: "The values of power that are expected for the given period of time. There shall be at least one PowerForecastValue, and at most one PowerForecastValue per CommodityQuantity." + additionalProperties: false + PEBC.AllowedLimitRange: + type: object required: - - Id - - power_ranges - - supply_range + - commodity_quantity + - limit_type + - range_boundary - abnormal_condition_only - DDBC_SystemDescription: - additionalProperties: false properties: - actuators: - description: List of all available actuators in the system. Must contain at least one DDBC.ActuatorAggregated. - items: - $ref: '#/components/schemas/DDBC_ActuatorDescription' - maxItems: 10 - minItems: 1 - type: array - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: DDBC.SystemDescription - type: string - present_demand_rate: + commodity_quantity: + $ref: '#/components/schemas/CommodityQuantity' + description: "Type of power quantity this PEBC.AllowedLimitRange applies to" + limit_type: + $ref: '#/components/schemas/PEBC.PowerEnvelopeLimitType' + description: "Indicates if this ranges applies to the upper limit or the lower limit" + range_boundary: $ref: '#/components/schemas/NumberRange' - description: Present demand rate that needs to be satisfied by the system - provides_average_demand_rate_forecast: - description: Indicates whether the Resource Manager could provide a demand rate forecast through the DDBC.AverageDemandRateForecast. + description: "Boundaries of the power range of this PEBC.AllowedLimitRange. The CEM is allowed to choose values within this range for the power envelope for the limit as described in limit_type. The start of the range shall be smaller or equal than the end of the range. " + abnormal_condition_only: type: boolean - valid_from: - description: Moment this DDBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past. - format: date-time - type: string - required: - - message_type - - message_id - - valid_from - - actuators - - present_demand_rate - - provides_average_demand_rate_forecast - DDBC_TimerStatus: + description: "Indicates if this PEBC.AllowedLimitRange may only be used during an abnormal condition" additionalProperties: false + PEBC.PowerEnvelope: + type: object + required: + - id + - commodity_quantity + - power_envelope_elements properties: - actuator_id: - $ref: '#/components/schemas/ID' - description: The ID of the actuator the timer belongs to - finished_at: - description: Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past. - format: date-time - type: string - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: DDBC.TimerStatus - type: string - timer_id: + id: $ref: '#/components/schemas/ID' - description: The ID of the timer this message refers to + description: "Identifier of this PEBC.PowerEnvelope. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + commodity_quantity: + $ref: '#/components/schemas/CommodityQuantity' + description: "Type of power quantity this PEBC.PowerEnvelope applies to" + power_envelope_elements: + type: array + minItems: 1 + maxItems: 288 + items: + $ref: '#/components/schemas/PEBC.PowerEnvelopeElement' + description: "The elements of this PEBC.PowerEnvelope. Shall contain at least one element. Elements must be placed in chronological order." + additionalProperties: false + PEBC.PowerEnvelopeElement: + type: object required: - - message_type - - message_id - - timer_id - - actuator_id - - finished_at - Duration: - description: Duration in milliseconds - minimum: 0 - type: integer - EnergyManagementRole: - description: 'CEM: Customer Energy Manager - - RM: Resource Manager' - enum: - - CEM - - RM - FRBC_ActuatorDescription: + - duration + - upper_limit + - lower_limit + properties: + duration: + $ref: '#/components/schemas/Duration' + description: "The duration of the element" + upper_limit: + type: number + description: "Upper power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or below the upper_limit. The upper_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type UPPER_LIMIT." + lower_limit: + type: number + description: "Lower power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or above the lower_limit. The lower_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type LOWER_LIMIT." additionalProperties: false + PPBC.PowerSequenceContainer: + type: object + required: + - id + - power_sequences properties: - diagnostic_label: - description: Human readable name/description for the actuator. This element is only intended for diagnostic purposes and not for HMI applications. - type: string id: $ref: '#/components/schemas/ID' - description: ID of the Actuator. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - operation_modes: - description: Provided FRBC.OperationModes associated with this actuator - items: - $ref: '#/components/schemas/FRBC_OperationMode' - maxItems: 100 - minItems: 1 + description: "ID of the PPBC.PowerSequenceContainer. Must be unique in the scope of the PPBC.PowerProfileDefinition in which it is used." + power_sequences: type: array - supported_commodities: - description: List of all supported Commodities. - items: - $ref: '#/components/schemas/Commodity' - maxItems: 4 minItems: 1 - type: array - timers: - description: List of Timers associated with this actuator - items: - $ref: '#/components/schemas/Timer' - maxItems: 1000 - minItems: 0 - type: array - transitions: - description: Possible transitions between FRBC.OperationModes associated with this actuator. + maxItems: 288 items: - $ref: '#/components/schemas/Transition' - maxItems: 1000 - minItems: 0 - type: array + $ref: '#/components/schemas/PPBC.PowerSequence' + description: "List of alternative Sequences where one could be chosen by the CEM" + additionalProperties: false + PPBC.PowerSequence: + type: object required: - id - - supported_commodities - - operation_modes - - transitions - - timers - FRBC_ActuatorStatus: - additionalProperties: false + - elements + - is_interruptible + - abnormal_condition_only properties: - active_operation_mode_id: - $ref: '#/components/schemas/ID' - description: ID of the FRBC.OperationMode that is presently active. - actuator_id: - $ref: '#/components/schemas/ID' - description: ID of the actuator this messages refers to - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: FRBC.ActuatorStatus - type: string - operation_mode_factor: - description: The number indicates the factor with which the FRBC.OperationMode is configured. The factor should be greater than or equal than 0 and less or equal to 1. - type: number - previous_operation_mode_id: + id: $ref: '#/components/schemas/ID' - description: ID of the FRBC.OperationMode that was active before the present one. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of. - transition_timestamp: - description: Time at which the transition from the previous FRBC.OperationMode to the active FRBC.OperationMode was initiated. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of. - format: date-time - type: string - required: - - message_type - - message_id - - actuator_id - - active_operation_mode_id - - operation_mode_factor - FRBC_FillLevelTargetProfile: - additionalProperties: false - properties: + description: "ID of the PPBC.PowerSequence. Must be unique in the scope of the PPBC.PowerSequnceContainer in which it is used." elements: - description: List of different fill levels that have to be targeted within a given duration. There shall be at least one element. Elements must be placed in chronological order. - items: - $ref: '#/components/schemas/FRBC_FillLevelTargetProfileElement' - maxItems: 288 - minItems: 1 type: array - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: FRBC.FillLevelTargetProfile - type: string - start_time: - description: Time at which the FRBC.FillLevelTargetProfile starts. - format: date-time - type: string - required: - - message_type - - message_id - - start_time - - elements - FRBC_FillLevelTargetProfileElement: + minItems: 1 + maxItems: 288 + items: + $ref: '#/components/schemas/PPBC.PowerSequenceElement' + description: "List of PPBC.PowerSequenceElements. Shall contain at least one element. Elements must be placed in chronological order." + is_interruptible: + type: boolean + description: "Indicates whether the option of pausing a sequence is available." + max_pause_before: + $ref: '#/components/schemas/Duration' + description: "The maximum duration for which a device can be paused between the end of the previous running sequence and the start of this one" + abnormal_condition_only: + type: boolean + description: "Indicates if this PPBC.PowerSequence may only be used during an abnormal condition" additionalProperties: false + PPBC.PowerSequenceElement: + type: object + required: + - duration + - power_values properties: duration: $ref: '#/components/schemas/Duration' - description: The duration of the element. - fill_level_range: - $ref: '#/components/schemas/NumberRange' - description: The target range in which the fill_level must be for the time period during which the element is active. The start of the range must be smaller or equal to the end of the range. The CEM must take best-effort actions to proactively achieve this target. - required: - - duration - - fill_level_range - FRBC_Instruction: + description: "Duration of the PPBC.PowerSequenceElement." + power_values: + type: array + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/PowerForecastValue' + description: "The value of power and deviations for the given duration. The array should contain at least one PowerForecastValue and at most one PowerForecastValue per CommodityQuantity." additionalProperties: false + PPBC.PowerSequenceContainerStatus: + type: object + required: + - power_profile_id + - sequence_container_id + - status properties: - abnormal_condition: - description: Indicates if this is an instruction during an abnormal condition. - type: boolean - actuator_id: - $ref: '#/components/schemas/ID' - description: ID of the actuator this instruction belongs to. - execution_time: - description: Time when instruction should be executed. - format: date-time - type: string - id: + power_profile_id: $ref: '#/components/schemas/ID' - description: ID of the instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - message_id: + description: "ID of the PPBC.PowerProfileDefinition of which the data element ‘sequence_container_id’ refers to. " + sequence_container_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: FRBC.Instruction - type: string - operation_mode: + description: "ID of the PPBC.PowerSequenceContainer this PPBC.PowerSequenceContainerStatus provides information about." + selected_sequence_id: $ref: '#/components/schemas/ID' - description: ID of the FRBC.OperationMode that should be activated. - operation_mode_factor: - description: The number indicates the factor with which the FRBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1. - type: number + description: "ID of selected PPBC.PowerSequence. When no ID is given, no sequence was selected yet." + progress: + $ref: '#/components/schemas/Duration' + description: "Time that has passed since the selected sequence has started. A value must be provided, unless no sequence has been selected or the selected sequence hasn’t started yet." + status: + $ref: '#/components/schemas/PPBC.PowerSequenceStatus' + description: "Status of the selected PPBC.PowerSequence" + additionalProperties: false + OMBC.OperationMode: + type: object required: - - message_type - - message_id - id - - actuator_id - - operation_mode - - operation_mode_factor - - execution_time - - abnormal_condition - FRBC_LeakageBehaviour: - additionalProperties: false + - power_ranges + - abnormal_condition_only properties: - elements: - description: List of elements that model the leakage behaviour of the buffer. The fill_level_ranges of the elements must be contiguous. - items: - $ref: '#/components/schemas/FRBC_LeakageBehaviourElement' - maxItems: 288 - minItems: 1 - type: array - message_id: + id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: FRBC.LeakageBehaviour - type: string - valid_from: - description: Moment this FRBC.LeakageBehaviour starts to be valid. If the FRBC.LeakageBehaviour is immediately valid, the DateTimeStamp should be now or in the past. - format: date-time + description: "ID of the OBMC.OperationMode. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + diagnostic_label: type: string - required: - - message_type - - message_id - - valid_from - - elements - FRBC_LeakageBehaviourElement: - additionalProperties: false - properties: - fill_level_range: + description: "Human readable name/description of the OMBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications." + power_ranges: + type: array + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/PowerRange' + description: "The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity." + running_costs: $ref: '#/components/schemas/NumberRange' - description: The fill level range for which this FRBC.LeakageBehaviourElement applies. The start of the range must be less than the end of the range. - leakage_rate: - description: Indicates how fast the momentary fill level will decrease per second due to leakage within the given range of the fill level. - type: number - required: - - fill_level_range - - leakage_rate - FRBC_OperationMode: - additionalProperties: false - properties: + description: "Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails , excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor." abnormal_condition_only: - description: Indicates if this FRBC.OperationMode may only be used during an abnormal condition type: boolean + description: "Indicates if this OMBC.OperationMode may only be used during an abnormal condition." + additionalProperties: false + FRBC.ActuatorDescription: + type: object + required: + - id + - supported_commodities + - operation_modes + - transitions + - timers + properties: + id: + $ref: '#/components/schemas/ID' + description: "ID of the Actuator. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." diagnostic_label: - description: Human readable name/description of the FRBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications. type: string - elements: - description: List of FRBC.OperationModeElements, which describe the properties of this FRBC.OperationMode depending on the fill_level. The fill_level_ranges of the items in the Array must be contiguous. + description: "Human readable name/description for the actuator. This element is only intended for diagnostic purposes and not for HMI applications." + supported_commodities: + type: array + minItems: 1 + maxItems: 4 items: - $ref: '#/components/schemas/FRBC_OperationModeElement' - maxItems: 100 + $ref: '#/components/schemas/Commodity' + description: "List of all supported Commodities." + operation_modes: + type: array minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/FRBC.OperationMode' + description: "Provided FRBC.OperationModes associated with this actuator" + transitions: type: array - id: - $ref: '#/components/schemas/ID' - description: ID of the FRBC.OperationMode. Must be unique in the scope of the FRBC.ActuatorDescription in which it is used. + minItems: 0 + maxItems: 1000 + items: + $ref: '#/components/schemas/Transition' + description: "Possible transitions between FRBC.OperationModes associated with this actuator." + timers: + type: array + minItems: 0 + maxItems: 1000 + items: + $ref: '#/components/schemas/Timer' + description: "List of Timers associated with this actuator" + additionalProperties: false + FRBC.OperationMode: + type: object required: - id - elements - abnormal_condition_only - FRBC_OperationModeElement: + properties: + id: + $ref: '#/components/schemas/ID' + description: "ID of the FRBC.OperationMode. Must be unique in the scope of the FRBC.ActuatorDescription in which it is used." + diagnostic_label: + type: string + description: "Human readable name/description of the FRBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications." + elements: + type: array + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/FRBC.OperationModeElement' + description: "List of FRBC.OperationModeElements, which describe the properties of this FRBC.OperationMode depending on the fill_level. The fill_level_ranges of the items in the Array must be contiguous." + abnormal_condition_only: + type: boolean + description: "Indicates if this FRBC.OperationMode may only be used during an abnormal condition" additionalProperties: false + FRBC.OperationModeElement: + type: object + required: + - fill_level_range + - fill_rate + - power_ranges properties: fill_level_range: $ref: '#/components/schemas/NumberRange' - description: The range of the fill level for which this FRBC.OperationModeElement applies. The start of the NumberRange shall be smaller than the end of the NumberRange. + description: "The range of the fill level for which this FRBC.OperationModeElement applies. The start of the NumberRange shall be smaller than the end of the NumberRange." fill_rate: $ref: '#/components/schemas/NumberRange' - description: 'Indicates the change in fill_level per second. The lower_boundary of the NumberRange is associated with an operation_mode_factor of 0, the upper_boundary is associated with an operation_mode_factor of 1. ' + description: "Indicates the change in fill_level per second. The lower_boundary of the NumberRange is associated with an operation_mode_factor of 0, the upper_boundary is associated with an operation_mode_factor of 1. " power_ranges: - description: The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity. + type: array + minItems: 1 + maxItems: 10 items: $ref: '#/components/schemas/PowerRange' - maxItems: 10 - minItems: 1 - type: array + description: "The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity." running_costs: $ref: '#/components/schemas/NumberRange' - description: Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor. + description: "Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor." + additionalProperties: false + FRBC.StorageDescription: + type: object required: + - provides_leakage_behaviour + - provides_fill_level_target_profile + - provides_usage_forecast - fill_level_range - - fill_rate - - power_ranges - FRBC_StorageDescription: - additionalProperties: false properties: diagnostic_label: - description: Human readable name/description of the storage (e.g. hot water buffer or battery). This element is only intended for diagnostic purposes and not for HMI applications. type: string + description: "Human readable name/description of the storage (e.g. hot water buffer or battery). This element is only intended for diagnostic purposes and not for HMI applications." fill_level_label: - description: Human readable description of the (physical) units associated with the fill_level (e.g. degrees Celsius or percentage state of charge). This element is only intended for diagnostic purposes and not for HMI applications. type: string - fill_level_range: - $ref: '#/components/schemas/NumberRange' - description: 'The range in which the fill_level should remain. It is expected of the CEM to keep the fill_level within this range. When the fill_level is not within this range, the Resource Manager can ignore instructions from the CEM (except during abnormal conditions). ' - provides_fill_level_target_profile: - description: Indicates whether the Storage could provide a target profile for the fill level through the FRBC.FillLevelTargetProfile. - type: boolean + description: "Human readable description of the (physical) units associated with the fill_level (e.g. degrees Celsius or percentage state of charge). This element is only intended for diagnostic purposes and not for HMI applications." provides_leakage_behaviour: - description: Indicates whether the Storage could provide details of power leakage behaviour through the FRBC.LeakageBehaviour. type: boolean + description: "Indicates whether the Storage could provide details of power leakage behaviour through the FRBC.LeakageBehaviour." + provides_fill_level_target_profile: + type: boolean + description: "Indicates whether the Storage could provide a target profile for the fill level through the FRBC.FillLevelTargetProfile." provides_usage_forecast: - description: Indicates whether the Storage could provide a UsageForecast through the FRBC.UsageForecast. type: boolean + description: "Indicates whether the Storage could provide a UsageForecast through the FRBC.UsageForecast." + fill_level_range: + $ref: '#/components/schemas/NumberRange' + description: "The range in which the fill_level should remain. It is expected of the CEM to keep the fill_level within this range. When the fill_level is not within this range, the Resource Manager can ignore instructions from the CEM (except during abnormal conditions). " + additionalProperties: false + FRBC.LeakageBehaviourElement: + type: object required: - - provides_leakage_behaviour - - provides_fill_level_target_profile - - provides_usage_forecast - fill_level_range - FRBC_StorageStatus: + - leakage_rate + properties: + fill_level_range: + $ref: '#/components/schemas/NumberRange' + description: "The fill level range for which this FRBC.LeakageBehaviourElement applies. The start of the range must be less than the end of the range." + leakage_rate: + type: number + description: "Indicates how fast the momentary fill level will decrease per second due to leakage within the given range of the fill level. A positive value indicates that the fill level decreases over time due to leakage." additionalProperties: false + FRBC.UsageForecastElement: + type: object + required: + - duration + - usage_rate_expected properties: - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: FRBC.StorageStatus - type: string - present_fill_level: - description: Present fill level of the Storage + duration: + $ref: '#/components/schemas/Duration' + description: "Indicator for how long the given usage_rate is valid." + usage_rate_upper_limit: + type: number + description: "The upper limit of the range with a 100 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage." + usage_rate_upper_95PPR: + type: number + description: "The upper limit of the range with a 95 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage." + usage_rate_upper_68PPR: type: number + description: "The upper limit of the range with a 68 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage." + usage_rate_expected: + type: number + description: "The most likely value for the usage rate; the expected increase or decrease of the fill_level per second. A positive value indicates that the fill level will decrease due to usage." + usage_rate_lower_68PPR: + type: number + description: "The lower limit of the range with a 68 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage." + usage_rate_lower_95PPR: + type: number + description: "The lower limit of the range with a 95 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage." + usage_rate_lower_limit: + type: number + description: "The lower limit of the range with a 100 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage." + additionalProperties: false + FRBC.FillLevelTargetProfileElement: + type: object required: - - message_type - - message_id - - present_fill_level - FRBC_SystemDescription: + - duration + - fill_level_range + properties: + duration: + $ref: '#/components/schemas/Duration' + description: "The duration of the element." + fill_level_range: + $ref: '#/components/schemas/NumberRange' + description: "The target range in which the fill_level must be for the time period during which the element is active. The start of the range must be smaller or equal to the end of the range. The CEM must take best-effort actions to proactively achieve this target." additionalProperties: false + DDBC.ActuatorDescription: + type: object + required: + - id + - supported_commodites + - operation_modes + - transitions + - timers properties: - actuators: - description: Details of all Actuators. + id: + $ref: '#/components/schemas/ID' + description: "ID of this DDBC.ActuatorDescription. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + diagnostic_label: + type: string + description: "Human readable name/description of the actuator. This element is only intended for diagnostic purposes and not for HMI applications." + supported_commodites: + type: array + minItems: 1 + maxItems: 4 items: - $ref: '#/components/schemas/FRBC_ActuatorDescription' - maxItems: 10 + $ref: '#/components/schemas/Commodity' + description: "Commodities supported by the operation modes of this actuator. There shall be at least one commodity" + operation_modes: + type: array minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/DDBC.OperationMode' + description: "List of all Operation Modes that are available for this actuator. There shall be at least one DDBC.OperationMode." + transitions: type: array - message_id: + minItems: 0 + maxItems: 1000 + items: + $ref: '#/components/schemas/Transition' + description: "List of Transitions between Operation Modes. Shall contain at least one Transition." + timers: + type: array + minItems: 0 + maxItems: 1000 + items: + $ref: '#/components/schemas/Timer' + description: "List of Timers associated with Transitions for this Actuator. Can be empty." + additionalProperties: false + DDBC.OperationMode: + type: object + required: + - Id + - power_ranges + - supply_range + - abnormal_condition_only + properties: + Id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: FRBC.SystemDescription - type: string - storage: - $ref: '#/components/schemas/FRBC_StorageDescription' - description: Details of the storage. - valid_from: - description: Moment this FRBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past. - format: date-time + description: "ID of this operation mode. Must be unique in the scope of the DDBC.ActuatorDescription in which it is used." + diagnostic_label: type: string + description: "Human readable name/description of the DDBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications." + power_ranges: + type: array + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/PowerRange' + description: "The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity." + supply_range: + $ref: '#/components/schemas/NumberRange' + description: "The supply rate this DDBC.OperationMode can deliver for the CEM to match the demand rate. The start of the NumberRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1." + running_costs: + $ref: '#/components/schemas/NumberRange' + description: "Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor." + abnormal_condition_only: + type: boolean + description: "Indicates if this DDBC.OperationMode may only be used during an abnormal condition." + additionalProperties: false + DDBC.AverageDemandRateForecastElement: + type: object + required: + - duration + - demand_rate_expected + properties: + duration: + $ref: '#/components/schemas/Duration' + description: "Duration of the element" + demand_rate_upper_limit: + type: number + description: "The upper limit of the range with a 100 % probability that the demand rate is within that range" + demand_rate_upper_95PPR: + type: number + description: "The upper limit of the range with a 95 % probability that the demand rate is within that range" + demand_rate_upper_68PPR: + type: number + description: "The upper limit of the range with a 68 % probability that the demand rate is within that range" + demand_rate_expected: + type: number + description: "The most likely value for the demand rate; the expected increase or decrease of the fill_level per second" + demand_rate_lower_68PPR: + type: number + description: "The lower limit of the range with a 68 % probability that the demand rate is within that range" + demand_rate_lower_95PPR: + type: number + description: "The lower limit of the range with a 95 % probability that the demand rate is within that range" + demand_rate_lower_limit: + type: number + description: "The lower limit of the range with a 100 % probability that the demand rate is within that range" + additionalProperties: false + RoleType: + type: string + enum: ["ENERGY_PRODUCER", "ENERGY_CONSUMER", "ENERGY_STORAGE"] + description: | + ENERGY_PRODUCER: Identifier for RoleType Producer + ENERGY_CONSUMER: Identifier for RoleType Consumer + ENERGY_STORAGE: Identifier for RoleType Storage + Commodity: + type: string + enum: ["GAS", "HEAT", "ELECTRICITY", "OIL"] + description: | + GAS: Identifier for Commodity GAS + HEAT: Identifier for Commodity HEAT + ELECTRICITY: Identifier for Commodity ELECTRICITY + OIL: Identifier for Commodity OIL + CommodityQuantity: + type: string + enum: ["ELECTRIC.POWER.L1", "ELECTRIC.POWER.L2", "ELECTRIC.POWER.L3", "ELECTRIC.POWER.3_PHASE_SYMMETRIC", "NATURAL_GAS.FLOW_RATE", "HYDROGEN.FLOW_RATE", "HEAT.TEMPERATURE", "HEAT.FLOW_RATE", "HEAT.THERMAL_POWER", "OIL.FLOW_RATE"] + description: | + ELECTRIC.POWER.L1: Electric power described in Watt on phase 1. If a device utilizes only one phase it should always use L1. + ELECTRIC.POWER.L2: Electric power described in Watt on phase 2. Only applicable for 3 phase devices. + ELECTRIC.POWER.L3: Electric power described in Watt on phase 3. Only applicable for 3 phase devices. + ELECTRIC.POWER.3_PHASE_SYMMETRIC: Electric power described in Watt on when power is equally shared among the three phases. Only applicable for 3 phase devices. + NATURAL_GAS.FLOW_RATE: Gas flow rate described in liters per second + HYDROGEN.FLOW_RATE: Gas flow rate described in grams per second + HEAT.TEMPERATURE: Heat described in degrees Celsius + HEAT.FLOW_RATE: Flow rate of heat carrying gas or liquid in liters per second + HEAT.THERMAL_POWER: Thermal power in Watt + OIL.FLOW_RATE: Oil flow rate described in liters per hour + InstructionStatus: + type: string + enum: ["NEW", "ACCEPTED", "REJECTED", "REVOKED", "STARTED", "SUCCEEDED", "ABORTED"] + description: | + NEW: Instruction was newly created + ACCEPTED: Instruction has been accepted + REJECTED: Instruction was rejected + REVOKED: Instruction was revoked + STARTED: Instruction was executed + SUCCEEDED: Instruction finished successfully + ABORTED: Instruction was aborted. + ControlType: + type: string + enum: ["POWER_ENVELOPE_BASED_CONTROL", "POWER_PROFILE_BASED_CONTROL", "OPERATION_MODE_BASED_CONTROL", "FILL_RATE_BASED_CONTROL", "DEMAND_DRIVEN_BASED_CONTROL", "NOT_CONTROLABLE", "NO_SELECTION"] + description: | + POWER_ENVELOPE_BASED_CONTROL: Identifier for the Power Envelope Based Control type + POWER_PROFILE_BASED_CONTROL: Identifier for the Power Profile Based Control type + OPERATION_MODE_BASED_CONTROL: Identifier for the Operation Mode Based Control type + FILL_RATE_BASED_CONTROL: Identifier for the Demand Driven Based Control type + DEMAND_DRIVEN_BASED_CONTROL: Identifier for the Fill Rate Based Control type + NOT_CONTROLABLE: Identifier that is to be used if no control is possible. Resources of this type can still provide measurements and forecast + NO_SELECTION: Identifier that is to be used if no control type is or has been selected. + PEBC.PowerEnvelopeLimitType: + type: string + enum: ["UPPER_LIMIT", "LOWER_LIMIT"] + description: | + UPPER_LIMIT: Indicating the upper limit of a PEBC.PowerEnvelope (see Clause 7.6.2) + LOWER_LIMIT: Indicating the lower limit of a PEBC.PowerEnvelope (see Clause 7.6.2) + PEBC.PowerEnvelopeConsequenceType: + type: string + enum: ["VANISH", "DEFER"] + description: | + VANISH: Indicating that the limited load or generated will be lost and not reappear in the future (see Clause 7.6.2) + DEFER: Indicating that the limited load or generation will be postponed to a later moment (see Clause 7.6.2) + PPBC.PowerSequenceStatus: + type: string + enum: ["NOT_SCHEDULED", "SCHEDULED", "EXECUTING", "INTERRUPTED", "FINISHED", "ABORTED"] + description: | + NOT_SCHEDULED: No PPBC.PowerSequence within the PPBC.PowerSequenceContainer is scheduled + SCHEDULED: The selected PPBC.PowerSequence is scheduled to be executed in the future + EXECUTING: The selected PPBC.PowerSequence is currently being executed + INTERRUPTED: The selected PPBC.PowerSequence is being executed, but is currently interrupted and will continue afterwards + FINISHED: The selected PPBC.PowerSequence was executed and finished successfully + ABORTED: The selected PPBC.PowerSequence was aborted by the device and will not continue + OMBC.TimerStatus: + type: object required: - message_type - message_id - - valid_from - - actuators - - storage - FRBC_TimerStatus: - additionalProperties: false + - timer_id + - finished_at properties: - actuator_id: - $ref: '#/components/schemas/ID' - description: The ID of the actuator the timer belongs to - finished_at: - description: Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past. - format: date-time + message_type: type: string + enum: [ "OMBC.TimerStatus" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: FRBC.TimerStatus - type: string timer_id: $ref: '#/components/schemas/ID' - description: The ID of the timer this message refers to + description: "The ID of the timer this message refers to" + finished_at: + type: string + format: date-time + description: "Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past." + additionalProperties: false + FRBC.TimerStatus: + type: object required: - message_type - message_id - timer_id - actuator_id - finished_at - FRBC_UsageForecast: - additionalProperties: false properties: - elements: - description: Further elements that model the profile. There shall be at least one element. Elements must be placed in chronological order. - items: - $ref: '#/components/schemas/FRBC_UsageForecastElement' - maxItems: 288 - minItems: 1 - type: array + message_type: + type: string + enum: [ "FRBC.TimerStatus" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: FRBC.UsageForecast + timer_id: + $ref: '#/components/schemas/ID' + description: "The ID of the timer this message refers to" + actuator_id: + $ref: '#/components/schemas/ID' + description: "The ID of the actuator the timer belongs to" + finished_at: type: string - start_time: - description: Time at which the FRBC.UsageForecast starts. format: date-time - type: string + description: "Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past." + additionalProperties: false + DDBC.TimerStatus: + type: object required: - message_type - message_id - - start_time - - elements - FRBC_UsageForecastElement: - additionalProperties: false - properties: - duration: - $ref: '#/components/schemas/Duration' - description: Indicator for how long the given usage_rate is valid. - usage_rate_expected: - description: The most likely value for the usage rate; the expected increase or decrease of the fill_level per second - type: number - usage_rate_lower_68PPR: - description: The lower limit of the range with a 68 % probability that the usage rate is within that range - type: number - usage_rate_lower_95PPR: - description: The lower limit of the range with a 95 % probability that the usage rate is within that range - type: number - usage_rate_lower_limit: - description: The lower limit of the range with a 100 % probability that the usage rate is within that range - type: number - usage_rate_upper_68PPR: - description: The upper limit of the range with a 68 % probability that the usage rate is within that range - type: number - usage_rate_upper_95PPR: - description: 'The upper limit of the range with a 95 % probability that the usage rate is within that range. ' - type: number - usage_rate_upper_limit: - description: The upper limit of the range with a 100 % probability that the usage rate is within that range. - type: number - required: - - duration - - usage_rate_expected - Handshake: - additionalProperties: false + - timer_id + - actuator_id + - finished_at properties: + message_type: + type: string + enum: [ "DDBC.TimerStatus" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: Handshake + timer_id: + $ref: '#/components/schemas/ID' + description: "The ID of the timer this message refers to" + actuator_id: + $ref: '#/components/schemas/ID' + description: "The ID of the actuator the timer belongs to" + finished_at: type: string - role: - $ref: '#/components/schemas/EnergyManagementRole' - description: The role of the sender of this message - supported_protocol_versions: - description: Protocol versions supported by the sender of this message. This field is mandatory for the RM, but optional for the CEM. - items: - type: string - minItems: 1 - type: array + format: date-time + description: "Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past." + additionalProperties: false + SelectControlType: + type: object required: - message_type - message_id - - role - HandshakeResponse: - additionalProperties: false + - control_type properties: - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message message_type: - const: HandshakeResponse - type: string - selected_protocol_version: - description: The protocol version the CEM selected for this session type: string + enum: [ "SelectControlType" ] + message_id: + $ref: '#/components/schemas/ID' + control_type: + $ref: '#/components/schemas/ControlType' + description: "The ControlType to activate. Must be one of the available ControlTypes as defined in the ResourceManagerDetails" + additionalProperties: false + SessionRequest: + type: object required: - message_type - message_id - - selected_protocol_version - ID: - description: An identifier expressed as a UUID - pattern: '[a-zA-Z0-9\-_:]{2,64}' - type: string - InstructionStatus: - description: 'NEW: Instruction was newly created - - ACCEPTED: Instruction has been accepted - - REJECTED: Instruction was rejected - - REVOKED: Instruction was revoked - - STARTED: Instruction was executed - - SUCCEEDED: Instruction finished successfully - - ABORTED: Instruction was aborted.' - enum: - - NEW - - ACCEPTED - - REJECTED - - REVOKED - - STARTED - - SUCCEEDED - - ABORTED - InstructionStatusUpdate: - additionalProperties: false + - request properties: - instruction_id: - $ref: '#/components/schemas/ID' - description: 'ID of this instruction (as provided by the CEM) ' - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message message_type: - const: InstructionStatusUpdate type: string - status_type: - $ref: '#/components/schemas/InstructionStatus' - description: Present status of this instruction. - timestamp: - description: Timestamp when status_type has changed the last time. - format: date-time + enum: [ "SessionRequest" ] + message_id: + $ref: '#/components/schemas/ID' + request: + $ref: '#/components/schemas/SessionRequestType' + description: "The type of request" + diagnostic_label: type: string + description: "Optional field for a human readible descirption for debugging purposes" + additionalProperties: false + RevokeObject: + type: object required: - message_type - message_id - - instruction_id - - status_type - - timestamp - NumberRange: - additionalProperties: false - properties: - end_of_range: - description: Number that defines the end of the range - type: number - start_of_range: - description: Number that defines the start of the range - type: number - required: - - start_of_range - - end_of_range - OMBC_Instruction: - additionalProperties: false + - object_type + - object_id properties: - abnormal_condition: - description: Indicates if this is an instruction during an abnormal condition - type: boolean - execution_time: - description: Time when instruction should be executed. - format: date-time + message_type: type: string - id: - $ref: '#/components/schemas/ID' - description: ID of the instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. + enum: [ "RevokeObject" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: OMBC.Instruction - type: string - operation_mode_factor: - description: The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1. - type: number - operation_mode_id: + object_type: + $ref: '#/components/schemas/RevokableObjects' + description: "The type of object that needs to be revoked" + object_id: $ref: '#/components/schemas/ID' - description: ID of the OMBC.OperationMode that should be activated + description: "The ID of object that needs to be revoked" + additionalProperties: false + Handshake: + type: object required: - message_type - message_id - - id - - execution_time - - operation_mode_id - - operation_mode_factor - - abnormal_condition - OMBC_OperationMode: - additionalProperties: false + - role properties: - abnormal_condition_only: - description: Indicates if this OMBC.OperationMode may only be used during an abnormal condition. - type: boolean - diagnostic_label: - description: Human readable name/description of the OMBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications. + message_type: type: string - id: + enum: [ "Handshake" ] + message_id: $ref: '#/components/schemas/ID' - description: ID of the OBMC.OperationMode. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - power_ranges: - description: The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity. - items: - $ref: '#/components/schemas/PowerRange' - maxItems: 10 - minItems: 1 + role: + $ref: '#/components/schemas/EnergyManagementRole' + description: "The role of the sender of this message" + supported_protocol_versions: type: array - running_costs: - $ref: '#/components/schemas/NumberRange' - description: Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails , excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor. - required: - - id - - power_ranges - - abnormal_condition_only - OMBC_Status: + minItems: 1 + items: + type: string + description: "Protocol versions supported by the sender of this message. This field is mandatory for the RM, but optional for the CEM." additionalProperties: false + HandshakeResponse: + type: object + required: + - message_type + - message_id + - selected_protocol_version properties: - active_operation_mode_id: - $ref: '#/components/schemas/ID' - description: ID of the active OMBC.OperationMode. - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message message_type: - const: OMBC.Status type: string - operation_mode_factor: - description: The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1. - type: number - previous_operation_mode_id: + enum: [ "HandshakeResponse" ] + message_id: $ref: '#/components/schemas/ID' - description: ID of the OMBC.OperationMode that was previously active. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of. - transition_timestamp: - description: Time at which the transition from the previous OMBC.OperationMode to the active OMBC.OperationMode was initiated. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of. - format: date-time + selected_protocol_version: type: string + description: "The protocol version the CEM selected for this session" + additionalProperties: false + ResourceManagerDetails: + type: object required: - message_type - message_id - - active_operation_mode_id - - operation_mode_factor - OMBC_SystemDescription: - additionalProperties: false + - resource_id + - roles + - instruction_processing_delay + - available_control_types + - provides_forecast + - provides_power_measurement_types properties: + message_type: + type: string + enum: [ "ResourceManagerDetails" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: OMBC.SystemDescription + resource_id: + $ref: '#/components/schemas/ID' + description: "Identifier of the Resource Manager. Must be unique within the scope of the CEM." + name: type: string - operation_modes: - description: OMBC.OperationModes available for the CEM in order to coordinate the device behaviour. - items: - $ref: '#/components/schemas/OMBC_OperationMode' - maxItems: 100 - minItems: 1 + description: "Human readable name given by user" + roles: type: array - timers: - description: Timers that control when certain transitions can be made. + minItems: 1 + maxItems: 3 items: - $ref: '#/components/schemas/Timer' - maxItems: 1000 - minItems: 0 + $ref: '#/components/schemas/Role' + description: "Each Resource Manager provides one or more energy Roles" + manufacturer: + type: string + description: "Name of Manufacturer" + model: + type: string + description: "Name of the model of the device (provided by the manufacturer)" + serial_number: + type: string + description: "Serial number of the device (provided by the manufacturer)" + firmware_version: + type: string + description: "Version identifier of the firmware used in the device (provided by the manufacturer)" + instruction_processing_delay: + $ref: '#/components/schemas/Duration' + description: "The average time the combination of Resource Manager and HBES/BACS/SASS or (Smart) device needs to process and execute an instruction" + available_control_types: type: array - transitions: - description: Possible transitions to switch from one OMBC.OperationMode to another. + minItems: 1 + maxItems: 5 items: - $ref: '#/components/schemas/Transition' - maxItems: 1000 - minItems: 0 + $ref: '#/components/schemas/ControlType' + description: "The control types supported by this Resource Manager." + currency: + $ref: '#/components/schemas/Currency' + description: "Currency to be used for all information regarding costs. Mandatory if cost information is published." + provides_forecast: + type: boolean + description: "Indicates whether the ResourceManager is able to provide PowerForecasts" + provides_power_measurement_types: type: array - valid_from: - description: Moment this OMBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past. - format: date-time - type: string + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/CommodityQuantity' + description: "Array of all CommodityQuantities that this Resource Manager can provide measurements for. " + additionalProperties: false + PowerMeasurement: + type: object required: - message_type - message_id - - valid_from - - operation_modes - - transitions - - timers - OMBC_TimerStatus: - additionalProperties: false + - measurement_timestamp + - values properties: - finished_at: - description: Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past. - format: date-time + message_type: type: string + enum: [ "PowerMeasurement" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: OMBC.TimerStatus + measurement_timestamp: type: string - timer_id: - $ref: '#/components/schemas/ID' - description: The ID of the timer this message refers to - required: - - message_type - - message_id - - timer_id - - finished_at - PEBC_AllowedLimitRange: + format: date-time + description: "Timestamp when PowerValues were measured." + values: + type: array + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/PowerValue' + description: "Array of measured PowerValues. Must contain at least one item and at most one item per ‘commodity_quantity’ (defined inside the PowerValue)." additionalProperties: false - properties: - abnormal_condition_only: - description: Indicates if this PEBC.AllowedLimitRange may only be used during an abnormal condition - type: boolean - commodity_quantity: - $ref: '#/components/schemas/CommodityQuantity' - description: Type of power quantity this PEBC.AllowedLimitRange applies to - limit_type: - $ref: '#/components/schemas/PEBC_PowerEnvelopeLimitType' - description: Indicates if this ranges applies to the upper limit or the lower limit - range_boundary: - $ref: '#/components/schemas/NumberRange' - description: 'Boundaries of the power range of this PEBC.AllowedLimitRange. The CEM is allowed to choose values within this range for the power envelope for the limit as described in limit_type. The start of the range shall be smaller or equal than the end of the range. ' + ReceptionStatus: + type: object required: - - commodity_quantity - - limit_type - - range_boundary - - abnormal_condition_only - PEBC_EnergyConstraint: - additionalProperties: false + - message_type + - subject_message_id + - status properties: - commodity_quantity: - $ref: '#/components/schemas/CommodityQuantity' - description: Type of power quantity which applies to upper_average_power and lower_average_power - id: - $ref: '#/components/schemas/ID' - description: Identifier of this PEBC.EnergyConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - lower_average_power: - description: 'Lower average power within the time period given by valid_from and valid_until. If the duration is multiplied with this power value, then the associated lower energy content can be derived. This is the lowest amount of energy the resource will consume during that period of time. ' - type: number - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message message_type: - const: PEBC.EnergyConstraint - type: string - upper_average_power: - description: Upper average power within the time period given by valid_from and valid_until. If the duration is multiplied with this power value, then the associated upper energy content can be derived. This is the highest amount of energy the resource will consume during that period of time. - type: number - valid_from: - description: Moment this PEBC.EnergyConstraints information starts to be valid - format: date-time type: string - valid_until: - description: Moment until this PEBC.EnergyConstraints information is valid. - format: date-time + enum: [ "ReceptionStatus" ] + subject_message_id: + $ref: '#/components/schemas/ID' + description: "The message this ReceptionStatus refers to" + status: + $ref: '#/components/schemas/ReceptionStatusValues' + description: "Enumeration of status values" + diagnostic_label: type: string + description: "Diagnostic label that can be used to provide additional information for debugging. However, not for HMI purposes." + additionalProperties: false + InstructionStatusUpdate: + type: object required: - message_type - message_id - - id - - valid_from - - valid_until - - upper_average_power - - lower_average_power - - commodity_quantity - PEBC_Instruction: - additionalProperties: false + - instruction_id + - status_type + - timestamp properties: - abnormal_condition: - description: Indicates if this is an instruction during an abnormal condition. - type: boolean - execution_time: - description: Indicates the moment the execution of the instruction shall start. - format: date-time + message_type: type: string - id: - $ref: '#/components/schemas/ID' - description: Identifier of this PEBC.Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. + enum: [ "InstructionStatusUpdate" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: PEBC.Instruction - type: string - power_constraints_id: + instruction_id: $ref: '#/components/schemas/ID' - description: Identifier of the PEBC.PowerConstraints this PEBC.Instruction was based on. - power_envelopes: - description: The PEBC.PowerEnvelope(s) that should be followed by the Resource Manager. There shall be at least one PEBC.PowerEnvelope, but at most one PEBC.PowerEnvelope for each CommodityQuantity. - items: - $ref: '#/components/schemas/PEBC_PowerEnvelope' - maxItems: 10 - minItems: 1 - type: array + description: "ID of this instruction (as provided by the CEM) " + status_type: + $ref: '#/components/schemas/InstructionStatus' + description: "Present status of this instruction." + timestamp: + type: string + format: date-time + description: "Timestamp when status_type has changed the last time." + additionalProperties: false + PowerForecast: + type: object required: - message_type - message_id - - id - - execution_time - - abnormal_condition - - power_constraints_id - - power_envelopes - PEBC_PowerConstraints: - additionalProperties: false + - start_time + - elements properties: - allowed_limit_ranges: - description: The actual constraints. There shall be at least one PEBC.AllowedLimitRange for the UPPER_LIMIT and at least one AllowedLimitRange for the LOWER_LIMIT. It is allowed to have multiple PEBC.AllowedLimitRange objects with identical CommodityQuantities and LimitTypes. - items: - $ref: '#/components/schemas/PEBC_AllowedLimitRange' - maxItems: 100 - minItems: 2 - type: array - consequence_type: - $ref: '#/components/schemas/PEBC_PowerEnvelopeConsequenceType' - description: Type of consequence of limiting power - id: - $ref: '#/components/schemas/ID' - description: Identifier of this PEBC.PowerConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message message_type: - const: PEBC.PowerConstraints type: string - valid_from: - description: Moment this PEBC.PowerConstraints start to be valid - format: date-time + enum: [ "PowerForecast" ] + message_id: + $ref: '#/components/schemas/ID' + start_time: type: string - valid_until: - description: Moment until this PEBC.PowerConstraints is valid. If valid_until is not present, there is no determined end time of this PEBC.PowerConstraints. format: date-time - type: string + description: "Start time of time period that is covered by the profile." + elements: + type: array + minItems: 1 + maxItems: 288 + items: + $ref: '#/components/schemas/PowerForecastElement' + description: "Elements of which this forecast consists. Contains at least one element. Elements must be placed in chronological order." + additionalProperties: false + PEBC.PowerConstraints: + type: object required: - message_type - message_id @@ -1198,120 +1083,111 @@ components: - valid_from - consequence_type - allowed_limit_ranges - PEBC_PowerEnvelope: - additionalProperties: false properties: - commodity_quantity: - $ref: '#/components/schemas/CommodityQuantity' - description: Type of power quantity this PEBC.PowerEnvelope applies to + message_type: + type: string + enum: [ "PEBC.PowerConstraints" ] + message_id: + $ref: '#/components/schemas/ID' id: $ref: '#/components/schemas/ID' - description: Identifier of this PEBC.PowerEnvelope. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - power_envelope_elements: - description: The elements of this PEBC.PowerEnvelope. Shall contain at least one element. Elements must be placed in chronological order. - items: - $ref: '#/components/schemas/PEBC_PowerEnvelopeElement' - maxItems: 288 - minItems: 1 + description: "Identifier of this PEBC.PowerConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + valid_from: + type: string + format: date-time + description: "Moment this PEBC.PowerConstraints start to be valid" + valid_until: + type: string + format: date-time + description: "Moment until this PEBC.PowerConstraints is valid. If valid_until is not present, there is no determined end time of this PEBC.PowerConstraints." + consequence_type: + $ref: '#/components/schemas/PEBC.PowerEnvelopeConsequenceType' + description: "Type of consequence of limiting power" + allowed_limit_ranges: type: array + minItems: 2 + maxItems: 100 + items: + $ref: '#/components/schemas/PEBC.AllowedLimitRange' + description: "The actual constraints. There shall be at least one PEBC.AllowedLimitRange for the UPPER_LIMIT and at least one AllowedLimitRange for the LOWER_LIMIT. It is allowed to have multiple PEBC.AllowedLimitRange objects with identical CommodityQuantities and LimitTypes." + additionalProperties: false + PEBC.EnergyConstraint: + type: object required: + - message_type + - message_id - id + - valid_from + - valid_until + - upper_average_power + - lower_average_power - commodity_quantity - - power_envelope_elements - PEBC_PowerEnvelopeConsequenceType: - description: 'VANISH: Indicating that the limited load or generated will be lost and not reappear in the future (see Clause 7.6.2) - - DEFER: Indicating that the limited load or generation will be postponed to a later moment (see Clause 7.6.2)' - enum: - - VANISH - - DEFER - PEBC_PowerEnvelopeElement: - additionalProperties: false properties: - duration: - $ref: '#/components/schemas/Duration' - description: The duration of the element - lower_limit: - description: Lower power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or above the lower_limit. The lower_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type LOWER_LIMIT. - type: number - upper_limit: - description: Upper power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or below the upper_limit. The upper_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type UPPER_LIMIT. - type: number - required: - - duration - - upper_limit - - lower_limit - PEBC_PowerEnvelopeLimitType: - description: 'UPPER_LIMIT: Indicating the upper limit of a PEBC.PowerEnvelope (see Clause 7.6.2) - - LOWER_LIMIT: Indicating the lower limit of a PEBC.PowerEnvelope (see Clause 7.6.2)' - enum: - - UPPER_LIMIT - - LOWER_LIMIT - PPBC_EndInterruptionInstruction: - additionalProperties: false - properties: - abnormal_condition: - description: Indicates if this is an instruction during an abnormal condition - type: boolean - execution_time: - description: End time of Interruption of the PPBC.PowerSequence. - format: date-time - type: string - id: - $ref: '#/components/schemas/ID' - description: ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message message_type: - const: PPBC.EndInterruptionInstruction type: string - power_profile_id: - $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence interruption is being ended by the CEM. - power_sequence_id: + enum: [ "PEBC.EnergyConstraint" ] + message_id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequence for which the CEM wants to end the interruption. - sequence_container_id: + id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence interruption is being ended by the CEM. + description: "Identifier of this PEBC.EnergyConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + valid_from: + type: string + format: date-time + description: "Moment this PEBC.EnergyConstraints information starts to be valid" + valid_until: + type: string + format: date-time + description: "Moment until this PEBC.EnergyConstraints information is valid." + upper_average_power: + type: number + description: "Upper average power within the time period given by valid_from and valid_until. If the duration is multiplied with this power value, then the associated upper energy content can be derived. This is the highest amount of energy the resource will consume during that period of time. The Power Envelope created by the CEM must allow at least this much energy consumption (in case the number is positive). Must be greater than or equal to lower_average_power, and can be negative in case of energy production." + lower_average_power: + type: number + description: "Lower average power within the time period given by valid_from and valid_until. If the duration is multiplied with this power value, then the associated lower energy content can be derived. This is the lowest amount of energy the resource will consume during that period of time. The Power Envelope created by the CEM must allow at least this much energy production (in case the number is negative). Must be greater than or equal to lower_average_power, and can be negative in case of energy production." + commodity_quantity: + $ref: '#/components/schemas/CommodityQuantity' + description: "Type of power quantity which applies to upper_average_power and lower_average_power" + additionalProperties: false + PEBC.Instruction: + type: object required: - message_type - message_id - id - - power_profile_id - - sequence_container_id - - power_sequence_id - execution_time - abnormal_condition - PPBC_PowerProfileDefinition: - additionalProperties: false + - power_constraints_id + - power_envelopes properties: - end_time: - description: Indicates when the last PPBC.PowerSequence shall be finished at the latest - format: date-time + message_type: type: string - id: - $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerProfileDefinition. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. + enum: [ "PEBC.Instruction" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: PPBC.PowerProfileDefinition + id: + $ref: '#/components/schemas/ID' + description: "Identifier of this PEBC.Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + execution_time: type: string - power_sequences_containers: - description: The PPBC.PowerSequenceContainers that make up this PPBC.PowerProfileDefinition. There shall be at least one PPBC.PowerSequenceContainer that includes at least one PPBC.PowerSequence. PPBC.PowerSequenceContainers must be placed in chronological order. - items: - $ref: '#/components/schemas/PPBC_PowerSequenceContainer' - maxItems: 1000 - minItems: 1 - type: array - start_time: - description: Indicates the first possible time the first PPBC.PowerSequence could start format: date-time - type: string + description: "Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible." + abnormal_condition: + type: boolean + description: "Indicates if this is an instruction during an abnormal condition." + power_constraints_id: + $ref: '#/components/schemas/ID' + description: "Identifier of the PEBC.PowerConstraints this PEBC.Instruction was based on." + power_envelopes: + type: array + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/PEBC.PowerEnvelope' + description: "The PEBC.PowerEnvelope(s) that should be followed by the Resource Manager. There shall be at least one PEBC.PowerEnvelope, but at most one PEBC.PowerEnvelope for each CommodityQuantity." + additionalProperties: false + PPBC.PowerProfileDefinition: + type: object required: - message_type - message_id @@ -1319,154 +1195,90 @@ components: - start_time - end_time - power_sequences_containers - PPBC_PowerProfileStatus: - additionalProperties: false properties: + message_type: + type: string + enum: [ "PPBC.PowerProfileDefinition" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: PPBC.PowerProfileStatus + id: + $ref: '#/components/schemas/ID' + description: "ID of the PPBC.PowerProfileDefinition. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + start_time: type: string - sequence_container_status: - description: Array with status information for all PPBC.PowerSequenceContainers in the PPBC.PowerProfileDefinition. - items: - $ref: '#/components/schemas/PPBC_PowerSequenceContainerStatus' - maxItems: 1000 - minItems: 1 + format: date-time + description: "Indicates the first possible time the first PPBC.PowerSequence could start" + end_time: + type: string + format: date-time + description: "Indicates when the last PPBC.PowerSequence shall be finished at the latest" + power_sequences_containers: type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/PPBC.PowerSequenceContainer' + description: "The PPBC.PowerSequenceContainers that make up this PPBC.PowerProfileDefinition. There shall be at least one PPBC.PowerSequenceContainer that includes at least one PPBC.PowerSequence. PPBC.PowerSequenceContainers must be placed in chronological order." + additionalProperties: false + PPBC.PowerProfileStatus: + type: object required: - message_type - message_id - sequence_container_status - PPBC_PowerSequence: - additionalProperties: false - properties: - abnormal_condition_only: - description: Indicates if this PPBC.PowerSequence may only be used during an abnormal condition - type: boolean - elements: - description: List of PPBC.PowerSequenceElements. Shall contain at least one element. Elements must be placed in chronological order. - items: - $ref: '#/components/schemas/PPBC_PowerSequenceElement' - maxItems: 288 - minItems: 1 - type: array - id: - $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequence. Must be unique in the scope of the PPBC.PowerSequnceContainer in which it is used. - is_interruptible: - description: Indicates whether the option of pausing a sequence is available. - type: boolean - max_pause_before: - $ref: '#/components/schemas/Duration' - description: The maximum duration for which a device can be paused between the end of the previous running sequence and the start of this one - required: - - id - - elements - - is_interruptible - - abnormal_condition_only - PPBC_PowerSequenceContainer: - additionalProperties: false properties: - id: + message_type: + type: string + enum: [ "PPBC.PowerProfileStatus" ] + message_id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequenceContainer. Must be unique in the scope of the PPBC.PowerProfileDefinition in which it is used. - power_sequences: - description: List of alternative Sequences where one could be chosen by the CEM - items: - $ref: '#/components/schemas/PPBC_PowerSequence' - maxItems: 288 - minItems: 1 + sequence_container_status: type: array - required: - - id - - power_sequences - PPBC_PowerSequenceContainerStatus: - additionalProperties: false - properties: - power_profile_id: - $ref: '#/components/schemas/ID' - description: 'ID of the PPBC.PowerProfileDefinition of which the data element ‘sequence_container_id’ refers to. ' - progress: - $ref: '#/components/schemas/Duration' - description: Time that has passed since the selected sequence has started. A value must be provided, unless no sequence has been selected or the selected sequence hasn’t started yet. - selected_sequence_id: - $ref: '#/components/schemas/ID' - description: ID of selected PPBC.PowerSequence. When no ID is given, no sequence was selected yet. - sequence_container_id: - $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequenceContainer this PPBC.PowerSequenceContainerStatus provides information about. - status: - $ref: '#/components/schemas/PPBC_PowerSequenceStatus' - description: Status of the selected PPBC.PowerSequence - required: - - power_profile_id - - sequence_container_id - - status - PPBC_PowerSequenceElement: - additionalProperties: false - properties: - duration: - $ref: '#/components/schemas/Duration' - description: Duration of the PPBC.PowerSequenceElement. - power_values: - description: The value of power and deviations for the given duration. The array should contain at least one PowerForecastValue and at most one PowerForecastValue per CommodityQuantity. - items: - $ref: '#/components/schemas/PowerForecastValue' - maxItems: 10 minItems: 1 - type: array - required: - - duration - - power_values - PPBC_PowerSequenceStatus: - description: 'NOT_SCHEDULED: No PPBC.PowerSequence within the PPBC.PowerSequenceContainer is scheduled - - SCHEDULED: The selected PPBC.PowerSequence is scheduled to be executed in the future - - EXECUTING: The selected PPBC.PowerSequence is currently being executed - - INTERRUPTED: The selected PPBC.PowerSequence is being executed, but is currently interrupted and will continue afterwards - - FINISHED: The selected PPBC.PowerSequence was executed and finished successfully - - ABORTED: The selected PPBC.PowerSequence was aborted by the device and will not continue' - enum: - - NOT_SCHEDULED - - SCHEDULED - - EXECUTING - - INTERRUPTED - - FINISHED - - ABORTED - PPBC_ScheduleInstruction: + maxItems: 1000 + items: + $ref: '#/components/schemas/PPBC.PowerSequenceContainerStatus' + description: "Array with status information for all PPBC.PowerSequenceContainers in the PPBC.PowerProfileDefinition." additionalProperties: false + PPBC.ScheduleInstruction: + type: object + required: + - message_type + - message_id + - id + - power_profile_id + - sequence_container_id + - power_sequence_id + - execution_time + - abnormal_condition properties: - abnormal_condition: - description: Indicates if this is an instruction during an abnormal condition - type: boolean - execution_time: - description: Start time of the PPBC.PowerSequence. - format: date-time + message_type: type: string - id: - $ref: '#/components/schemas/ID' - description: ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. + enum: [ "PPBC.ScheduleInstruction" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: PPBC.ScheduleInstruction - type: string - power_profile_id: + id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence is being selected and scheduled by the CEM. - power_sequence_id: + description: "ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + power_profile_id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequence that is being selected and scheduled by the CEM. + description: "ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence is being selected and scheduled by the CEM." sequence_container_id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence is being selected and scheduled by the CEM. + description: "ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence is being selected and scheduled by the CEM." + power_sequence_id: + $ref: '#/components/schemas/ID' + description: "ID of the PPBC.PowerSequence that is being selected and scheduled by the CEM." + execution_time: + type: string + format: date-time + description: "Indicates the moment the PPBC.PowerSequence shall start. When the specified execution time is in the past, execution must start as soon as possible." + abnormal_condition: + type: boolean + description: "Indicates if this is an instruction during an abnormal condition" + additionalProperties: false + PPBC.StartInterruptionInstruction: + type: object required: - message_type - message_id @@ -1476,34 +1288,34 @@ components: - power_sequence_id - execution_time - abnormal_condition - PPBC_StartInterruptionInstruction: - additionalProperties: false properties: - abnormal_condition: - description: Indicates if this is an instruction during an abnormal condition - type: boolean - execution_time: - description: Start time of the interruption of the PPBC.PowerSequence. - format: date-time + message_type: type: string - id: - $ref: '#/components/schemas/ID' - description: ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM. + enum: [ "PPBC.StartInterruptionInstruction" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: PPBC.StartInterruptionInstruction - type: string - power_profile_id: + id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence is being interrupted by the CEM. - power_sequence_id: + description: "ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + power_profile_id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequence that the CEM wants to interrupt. + description: "ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence is being interrupted by the CEM." sequence_container_id: $ref: '#/components/schemas/ID' - description: ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence is being interrupted by the CEM. + description: "ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence is being interrupted by the CEM." + power_sequence_id: + $ref: '#/components/schemas/ID' + description: "ID of the PPBC.PowerSequence that the CEM wants to interrupt." + execution_time: + type: string + format: date-time + description: "Indicates the moment the PPBC.PowerSequence shall be interrupted. When the specified execution time is in the past, execution must start as soon as possible." + abnormal_condition: + type: boolean + description: "Indicates if this is an instruction during an abnormal condition" + additionalProperties: false + PPBC.EndInterruptionInstruction: + type: object required: - message_type - message_id @@ -1513,416 +1325,444 @@ components: - power_sequence_id - execution_time - abnormal_condition - PowerForecast: - additionalProperties: false properties: - elements: - description: Elements of which this forecast consists. Contains at least one element. Elements must be placed in chronological order. - items: - $ref: '#/components/schemas/PowerForecastElement' - maxItems: 288 - minItems: 1 - type: array + message_type: + type: string + enum: [ "PPBC.EndInterruptionInstruction" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: PowerForecast + id: + $ref: '#/components/schemas/ID' + description: "ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + power_profile_id: + $ref: '#/components/schemas/ID' + description: "ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence interruption is being ended by the CEM." + sequence_container_id: + $ref: '#/components/schemas/ID' + description: "ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence interruption is being ended by the CEM." + power_sequence_id: + $ref: '#/components/schemas/ID' + description: "ID of the PPBC.PowerSequence for which the CEM wants to end the interruption." + execution_time: type: string - start_time: - description: Start time of time period that is covered by the profile. format: date-time - type: string + description: "Indicates the moment PPBC.PowerSequence interruption shall end. When the specified execution time is in the past, execution must start as soon as possible." + abnormal_condition: + type: boolean + description: "Indicates if this is an instruction during an abnormal condition" + additionalProperties: false + OMBC.SystemDescription: + type: object required: - message_type - message_id - - start_time - - elements - PowerForecastElement: - additionalProperties: false + - valid_from + - operation_modes + - transitions + - timers properties: - duration: - $ref: '#/components/schemas/Duration' - description: Duration of the PowerForecastElement - power_values: - description: The values of power that are expected for the given period of time. There shall be at least one PowerForecastValue, and at most one PowerForecastValue per CommodityQuantity. - items: - $ref: '#/components/schemas/PowerForecastValue' - maxItems: 10 + message_type: + type: string + enum: [ "OMBC.SystemDescription" ] + message_id: + $ref: '#/components/schemas/ID' + valid_from: + type: string + format: date-time + description: "Moment this OMBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past." + operation_modes: + type: array minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/OMBC.OperationMode' + description: "OMBC.OperationModes available for the CEM in order to coordinate the device behaviour." + transitions: type: array - required: - - duration - - power_values - PowerForecastValue: + minItems: 0 + maxItems: 1000 + items: + $ref: '#/components/schemas/Transition' + description: "Possible transitions to switch from one OMBC.OperationMode to another." + timers: + type: array + minItems: 0 + maxItems: 1000 + items: + $ref: '#/components/schemas/Timer' + description: "Timers that control when certain transitions can be made." additionalProperties: false - properties: - commodity_quantity: - $ref: '#/components/schemas/CommodityQuantity' - description: The power quantity the value refers to - value_expected: - description: The expected power value. - type: number - value_lower_68PPR: - description: The lower boundary of the range with 68 % certainty the power value is in it - type: number - value_lower_95PPR: - description: The lower boundary of the range with 95 % certainty the power value is in it - type: number - value_lower_limit: - description: The lower boundary of the range with 100 % certainty the power value is in it - type: number - value_upper_68PPR: - description: The upper boundary of the range with 68 % certainty the power value is in it - type: number - value_upper_95PPR: - description: The upper boundary of the range with 95 % certainty the power value is in it - type: number - value_upper_limit: - description: The upper boundary of the range with 100 % certainty the power value is in it - type: number + OMBC.Status: + type: object required: - - value_expected - - commodity_quantity - PowerMeasurement: - additionalProperties: false + - message_type + - message_id + - active_operation_mode_id + - operation_mode_factor properties: - measurement_timestamp: - description: Timestamp when PowerValues were measured. - format: date-time + message_type: type: string + enum: [ "OMBC.Status" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: PowerMeasurement + active_operation_mode_id: + $ref: '#/components/schemas/ID' + description: "ID of the active OMBC.OperationMode." + operation_mode_factor: + type: number + description: "The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1." + previous_operation_mode_id: + $ref: '#/components/schemas/ID' + description: "ID of the OMBC.OperationMode that was previously active. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of." + transition_timestamp: type: string - values: - description: Array of measured PowerValues. Must contain at least one item and at most one item per ‘commodity_quantity’ (defined inside the PowerValue). - items: - $ref: '#/components/schemas/PowerValue' - maxItems: 10 - minItems: 1 - type: array + format: date-time + description: "Time at which the transition from the previous OMBC.OperationMode to the active OMBC.OperationMode was initiated. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of." + additionalProperties: false + OMBC.Instruction: + type: object required: - message_type - message_id - - measurement_timestamp - - values - PowerRange: - additionalProperties: false + - id + - execution_time + - operation_mode_id + - operation_mode_factor + - abnormal_condition properties: - commodity_quantity: - $ref: '#/components/schemas/CommodityQuantity' - description: The power quantity the values refer to - end_of_range: - description: Power value that defines the end of the range. - type: number - start_of_range: - description: Power value that defines the start of the range. + message_type: + type: string + enum: [ "OMBC.Instruction" ] + message_id: + $ref: '#/components/schemas/ID' + id: + $ref: '#/components/schemas/ID' + description: "ID of the instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + execution_time: + type: string + format: date-time + description: "Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible." + operation_mode_id: + $ref: '#/components/schemas/ID' + description: "ID of the OMBC.OperationMode that should be activated" + operation_mode_factor: type: number - required: - - start_of_range - - end_of_range - - commodity_quantity - PowerValue: + description: "The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1." + abnormal_condition: + type: boolean + description: "Indicates if this is an instruction during an abnormal condition" additionalProperties: false - properties: - commodity_quantity: - $ref: '#/components/schemas/CommodityQuantity' - description: The power quantity the value refers to - value: - description: Power value expressed in the unit associated with the CommodityQuantity - type: number + FRBC.SystemDescription: + type: object required: - - commodity_quantity - - value - ReceptionStatus: - additionalProperties: false + - message_type + - message_id + - valid_from + - actuators + - storage properties: - diagnostic_label: - description: Diagnostic label that can be used to provide additional information for debugging. However, not for HMI purposes. - type: string message_type: - const: ReceptionStatus type: string - status: - $ref: '#/components/schemas/ReceptionStatusValues' - description: Enumeration of status values - subject_message_id: + enum: [ "FRBC.SystemDescription" ] + message_id: $ref: '#/components/schemas/ID' - description: The message this ReceptionStatus refers to + valid_from: + type: string + format: date-time + description: "Moment this FRBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past." + actuators: + type: array + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/FRBC.ActuatorDescription' + description: "Details of all Actuators." + storage: + $ref: '#/components/schemas/FRBC.StorageDescription' + description: "Details of the storage." + additionalProperties: false + FRBC.ActuatorStatus: + type: object required: - message_type - - subject_message_id - - status - ReceptionStatusValues: - description: 'INVALID_DATA: Message not understood (e.g. not valid JSON, no message_id found). Consequence: Message is ignored, proceed if possible - - INVALID_MESSAGE: Message was not according to schema. Consequence: Message is ignored, proceed if possible - - INVALID_CONTENT: Message contents is invalid (e.g. contains a non-existing ID). Somewhat equivalent to BAD_REQUEST in HTTP.. Consequence: Message is ignored, proceed if possible. - - TEMPORARY_ERROR: Receiver encountered an error. Consequence: Try to send to message again - - PERMANENT_ERROR: Receiver encountered an error which it cannot recover from. Consequence: Disconnect. - - OK: Message processed normally. Consequence: Proceed normally.' - enum: - - INVALID_DATA - - INVALID_MESSAGE - - INVALID_CONTENT - - TEMPORARY_ERROR - - PERMANENT_ERROR - - OK - ResourceManagerDetails: - additionalProperties: false + - message_id + - actuator_id + - active_operation_mode_id + - operation_mode_factor properties: - available_control_types: - description: The control types supported by this Resource Manager. - items: - $ref: '#/components/schemas/ControlType' - maxItems: 5 - minItems: 1 - type: array - currency: - $ref: '#/components/schemas/Currency' - description: Currency to be used for all information regarding costs. Mandatory if cost information is published. - firmware_version: - description: Version identifier of the firmware used in the device (provided by the manufacturer) + message_type: + type: string + enum: [ "FRBC.ActuatorStatus" ] + message_id: + $ref: '#/components/schemas/ID' + actuator_id: + $ref: '#/components/schemas/ID' + description: "ID of the actuator this messages refers to" + active_operation_mode_id: + $ref: '#/components/schemas/ID' + description: "ID of the FRBC.OperationMode that is presently active." + operation_mode_factor: + type: number + description: "The number indicates the factor with which the FRBC.OperationMode is configured. The factor should be greater than or equal than 0 and less or equal to 1." + previous_operation_mode_id: + $ref: '#/components/schemas/ID' + description: "ID of the FRBC.OperationMode that was active before the present one. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of." + transition_timestamp: type: string - instruction_processing_delay: - $ref: '#/components/schemas/Duration' - description: The average time the combination of Resource Manager and HBES/BACS/SASS or (Smart) device needs to process and execute an instruction - manufacturer: - description: Name of Manufacturer + format: date-time + description: "Time at which the transition from the previous FRBC.OperationMode to the active FRBC.OperationMode was initiated. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of." + additionalProperties: false + FRBC.StorageStatus: + type: object + required: + - message_type + - message_id + - present_fill_level + properties: + message_type: type: string + enum: [ "FRBC.StorageStatus" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message + present_fill_level: + type: number + description: "Present fill level of the Storage" + additionalProperties: false + FRBC.LeakageBehaviour: + type: object + required: + - message_type + - message_id + - valid_from + - elements + properties: message_type: - const: ResourceManagerDetails - type: string - model: - description: Name of the model of the device (provided by the manufacturer) type: string - name: - description: Human readable name given by user + enum: [ "FRBC.LeakageBehaviour" ] + message_id: + $ref: '#/components/schemas/ID' + valid_from: type: string - provides_forecast: - description: Indicates whether the ResourceManager is able to provide PowerForecasts - type: boolean - provides_power_measurement_types: - description: 'Array of all CommodityQuantities that this Resource Manager can provide measurements for. ' - items: - $ref: '#/components/schemas/CommodityQuantity' - maxItems: 10 - minItems: 1 + format: date-time + description: "Moment this FRBC.LeakageBehaviour starts to be valid. If the FRBC.LeakageBehaviour is immediately valid, the DateTimeStamp should be now or in the past." + elements: type: array - resource_id: - $ref: '#/components/schemas/ID' - description: Identifier of the Resource Manager. Must be unique within the scope of the CEM. - roles: - description: Each Resource Manager provides one or more energy Roles - items: - $ref: '#/components/schemas/Role' - maxItems: 3 minItems: 1 - type: array - serial_number: - description: Serial number of the device (provided by the manufacturer) - type: string + maxItems: 288 + items: + $ref: '#/components/schemas/FRBC.LeakageBehaviourElement' + description: "List of elements that model the leakage behaviour of the buffer. The fill_level_ranges of the elements must be contiguous." + additionalProperties: false + FRBC.Instruction: + type: object required: - message_type - message_id - - resource_id - - roles - - instruction_processing_delay - - available_control_types - - provides_forecast - - provides_power_measurement_types - RevokableObjects: - description: 'PEBC.PowerConstraints: Object type PEBC.PowerConstraints - - PEBC.EnergyConstraint: Object type PEBC.EnergyConstraint - - PEBC.Instruction: Object type PEBC.Instruction - - PPBC.PowerProfileDefinition: Object type PPBC.PowerProfileDefinition - - PPBC.ScheduleInstruction: Object type PPBC.ScheduleInstruction - - PPBC.StartInterruptionInstruction: Object type PPBC.StartInterruptionInstruction - - PPBC.EndInterruptionInstruction: Object type PPBC.EndInterruptionInstruction - - OMBC.SystemDescription: Object type OMBC.SystemDescription - - OMBC.Instruction: Object type OMBC.Instruction - - FRBC.SystemDescription: Object type FRBC.SystemDescription - - FRBC.Instruction: Object type FRBC.Instruction - - DDBC.SystemDescription: Object type DDBC.SystemDescription - - DDBC.Instruction: Object type DDBC.Instruction' - enum: - - PEBC.PowerConstraints - - PEBC.EnergyConstraint - - PEBC.Instruction - - PPBC.PowerProfileDefinition - - PPBC.ScheduleInstruction - - PPBC.StartInterruptionInstruction - - PPBC.EndInterruptionInstruction - - OMBC.SystemDescription - - OMBC.Instruction - - FRBC.SystemDescription - - FRBC.Instruction - - DDBC.SystemDescription - - DDBC.Instruction - RevokeObject: - additionalProperties: false + - id + - actuator_id + - operation_mode + - operation_mode_factor + - execution_time + - abnormal_condition properties: - message_id: - $ref: '#/components/schemas/ID' - description: ID of this message message_type: - const: RevokeObject type: string - object_id: + enum: [ "FRBC.Instruction" ] + message_id: $ref: '#/components/schemas/ID' - description: The ID of object that needs to be revoked - object_type: - $ref: '#/components/schemas/RevokableObjects' - description: The type of object that needs to be revoked + id: + $ref: '#/components/schemas/ID' + description: "ID of the instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + actuator_id: + $ref: '#/components/schemas/ID' + description: "ID of the actuator this instruction belongs to." + operation_mode: + $ref: '#/components/schemas/ID' + description: "ID of the FRBC.OperationMode that should be activated." + operation_mode_factor: + type: number + description: "The number indicates the factor with which the FRBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1." + execution_time: + type: string + format: date-time + description: "Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible." + abnormal_condition: + type: boolean + description: "Indicates if this is an instruction during an abnormal condition." + additionalProperties: false + FRBC.UsageForecast: + type: object required: - message_type - message_id - - object_type - - object_id - Role: - additionalProperties: false + - start_time + - elements properties: - commodity: - $ref: '#/components/schemas/Commodity' - description: Commodity the role refers to. - role: - $ref: '#/components/schemas/RoleType' - description: Role type of the Resource Manager for the given commodity - required: - - role - - commodity - RoleType: - description: 'ENERGY_PRODUCER: Identifier for RoleType Producer - - ENERGY_CONSUMER: Identifier for RoleType Consumer - - ENERGY_STORAGE: Identifier for RoleType Storage' - enum: - - ENERGY_PRODUCER - - ENERGY_CONSUMER - - ENERGY_STORAGE - SelectControlType: + message_type: + type: string + enum: [ "FRBC.UsageForecast" ] + message_id: + $ref: '#/components/schemas/ID' + start_time: + type: string + format: date-time + description: "Time at which the FRBC.UsageForecast starts." + elements: + type: array + minItems: 1 + maxItems: 288 + items: + $ref: '#/components/schemas/FRBC.UsageForecastElement' + description: "Further elements that model the profile. There shall be at least one element. Elements must be placed in chronological order." additionalProperties: false + FRBC.FillLevelTargetProfile: + type: object + required: + - message_type + - message_id + - start_time + - elements properties: - control_type: - $ref: '#/components/schemas/ControlType' - description: The ControlType to activate. Must be one of the available ControlTypes as defined in the ResourceManagerDetails + message_type: + type: string + enum: [ "FRBC.FillLevelTargetProfile" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: SelectControlType + start_time: type: string + format: date-time + description: "Time at which the FRBC.FillLevelTargetProfile starts." + elements: + type: array + minItems: 1 + maxItems: 288 + items: + $ref: '#/components/schemas/FRBC.FillLevelTargetProfileElement' + description: "List of different fill levels that have to be targeted within a given duration. There shall be at least one element. Elements must be placed in chronological order." + additionalProperties: false + DDBC.SystemDescription: + type: object required: - message_type - message_id - - control_type - SessionRequest: - additionalProperties: false + - valid_from + - actuators + - present_demand_rate + - provides_average_demand_rate_forecast properties: - diagnostic_label: - description: Optional field for a human readible descirption for debugging purposes + message_type: type: string + enum: [ "DDBC.SystemDescription" ] message_id: $ref: '#/components/schemas/ID' - description: ID of this message - message_type: - const: SessionRequest + valid_from: type: string - request: - $ref: '#/components/schemas/SessionRequestType' - description: The type of request + format: date-time + description: "Moment this DDBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past." + actuators: + type: array + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/DDBC.ActuatorDescription' + description: "List of all available actuators in the system. Must contain at least one DDBC.ActuatorAggregated." + present_demand_rate: + $ref: '#/components/schemas/NumberRange' + description: "Present demand rate that needs to be satisfied by the system" + provides_average_demand_rate_forecast: + type: boolean + description: "Indicates whether the Resource Manager could provide a demand rate forecast through the DDBC.AverageDemandRateForecast." + additionalProperties: false + DDBC.ActuatorStatus: + type: object required: - message_type - message_id - - request - SessionRequestType: - description: 'RECONNECT: Please reconnect the WebSocket session. Once reconnected, it starts from scratch with a handshake. - - TERMINATE: Disconnect the session (client can try to reconnecting with exponential backoff)' - enum: - - RECONNECT - - TERMINATE - Timer: - additionalProperties: false + - actuator_id + - active_operation_mode_id + - operation_mode_factor properties: - diagnostic_label: - description: Human readable name/description of the Timer. This element is only intended for diagnostic purposes and not for HMI applications. + message_type: type: string - duration: - $ref: '#/components/schemas/Duration' - description: The time it takes for the Timer to finish after it has been started - id: + enum: [ "DDBC.ActuatorStatus" ] + message_id: + $ref: '#/components/schemas/ID' + actuator_id: + $ref: '#/components/schemas/ID' + description: "ID of the actuator this messages refers to" + active_operation_mode_id: + $ref: '#/components/schemas/ID' + description: "The operation mode that is presently active for this actuator." + operation_mode_factor: + type: number + description: "The number indicates the factor with which the DDBC.OperationMode is configured. The factor should be greater than or equal to 0 and less or equal to 1." + previous_operation_mode_id: $ref: '#/components/schemas/ID' - description: ID of the Timer. Must be unique in the scope of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in which it is used. + description: "ID of the DDBC,OperationMode that was active before the present one. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of." + transition_timestamp: + type: string + format: date-time + description: "Time at which the transition from the previous DDBC.OperationMode to the active DDBC.OperationMode was initiated. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of." + additionalProperties: false + DDBC.Instruction: + type: object required: + - message_type + - message_id - id - - duration - Transition: - additionalProperties: false + - execution_time + - abnormal_condition + - actuator_id + - operation_mode_id + - operation_mode_factor properties: - abnormal_condition_only: - description: Indicates if this Transition may only be used during an abnormal condition (see Clause ) - type: boolean - blocking_timers: - description: List of IDs of Timers that block this Transition from initiating while at least one of these Timers is not yet finished - items: - $ref: '#/components/schemas/ID' - maxItems: 1000 - minItems: 0 - type: array - from: + message_type: + type: string + enum: [ "DDBC.Instruction" ] + message_id: $ref: '#/components/schemas/ID' - description: ID of the OperationMode (exact type differs per ControlType) that should be switched from. id: $ref: '#/components/schemas/ID' - description: ID of the Transition. Must be unique in the scope of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in which it is used. - start_timers: - description: List of IDs of Timers that will be (re)started when this transition is initiated - items: - $ref: '#/components/schemas/ID' - maxItems: 1000 - minItems: 0 - type: array - to: + description: "Identifier of this DDBC.Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM." + execution_time: + type: string + format: date-time + description: "Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible." + abnormal_condition: + type: boolean + description: "Indicates if this is an instruction during an abnormal condition" + actuator_id: $ref: '#/components/schemas/ID' - description: ID of the OperationMode (exact type differs per ControlType) that will be switched to. - transition_costs: - description: Absolute costs for going through this Transition in the currency as described in the ResourceManagerDetails. + description: "ID of the actuator this Instruction belongs to." + operation_mode_id: + $ref: '#/components/schemas/ID' + description: "ID of the DDBC.OperationMode" + operation_mode_factor: type: number - transition_duration: - $ref: '#/components/schemas/Duration' - description: Indicates the time between the initiation of this Transition, and the time at which the device behaves according to the Operation Mode which is defined in the ‘to’ data element. When no value is provided it is assumed the transition duration is negligible. + description: "The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1." + additionalProperties: false + DDBC.AverageDemandRateForecast: + type: object required: - - id - - from - - to - - start_timers - - blocking_timers - - abnormal_condition_only -info: - title: S2 Websocket specification - version: 0.0.1-beta -openapi: 3.0.1 + - message_type + - message_id + - start_time + - elements + properties: + message_type: + type: string + enum: [ "DDBC.AverageDemandRateForecast" ] + message_id: + $ref: '#/components/schemas/ID' + start_time: + type: string + format: date-time + description: "Start time of the profile." + elements: + type: array + minItems: 1 + maxItems: 288 + items: + $ref: '#/components/schemas/DDBC.AverageDemandRateForecastElement' + description: "Elements of the profile. Elements must be placed in chronological order." + additionalProperties: false From b253e2da59040ec23ae96b25adccb7d3af3fb292 Mon Sep 17 00:00:00 2001 From: Sebastiaan la Fleur Date: Mon, 29 Jul 2024 10:54:43 +0200 Subject: [PATCH 3/4] 38: Remove dots from schema component names and replace message_type enums by message_type constants in openapi S2 specification. --- specification/openapi.yml | 210 ++++++++++++++++++-------------------- 1 file changed, 102 insertions(+), 108 deletions(-) diff --git a/specification/openapi.yml b/specification/openapi.yml index 5990367..64c932e 100644 --- a/specification/openapi.yml +++ b/specification/openapi.yml @@ -3,12 +3,6 @@ info: title: s2-ws-json schema's in OpenAPI version: main description: "NB: S2-WS-JSON IS NOT A REST API, SO THIS FILE CANNOT BE USED TO GENERATE AN S2-WS-JSON ENDPOINT! S2-ws-json uses WebSockets for communication. An AsyincAPI and JSON-Schema specification is provided as well. This file is provided for developers who prefer OpenAPI code generators for generating data classes in their programming language. In that case you still need to impement the code for using WebSockets yourself." -paths: - /fake: - get: - responses: - '404': - description: "Do not use. An openAPI specification needs at least one path to be valid." components: schemas: Duration: @@ -223,7 +217,7 @@ components: $ref: '#/components/schemas/PowerForecastValue' description: "The values of power that are expected for the given period of time. There shall be at least one PowerForecastValue, and at most one PowerForecastValue per CommodityQuantity." additionalProperties: false - PEBC.AllowedLimitRange: + PEBCAllowedLimitRange: type: object required: - commodity_quantity @@ -235,7 +229,7 @@ components: $ref: '#/components/schemas/CommodityQuantity' description: "Type of power quantity this PEBC.AllowedLimitRange applies to" limit_type: - $ref: '#/components/schemas/PEBC.PowerEnvelopeLimitType' + $ref: '#/components/schemas/PEBCPowerEnvelopeLimitType' description: "Indicates if this ranges applies to the upper limit or the lower limit" range_boundary: $ref: '#/components/schemas/NumberRange' @@ -244,7 +238,7 @@ components: type: boolean description: "Indicates if this PEBC.AllowedLimitRange may only be used during an abnormal condition" additionalProperties: false - PEBC.PowerEnvelope: + PEBCPowerEnvelope: type: object required: - id @@ -262,10 +256,10 @@ components: minItems: 1 maxItems: 288 items: - $ref: '#/components/schemas/PEBC.PowerEnvelopeElement' + $ref: '#/components/schemas/PEBCPowerEnvelopeElement' description: "The elements of this PEBC.PowerEnvelope. Shall contain at least one element. Elements must be placed in chronological order." additionalProperties: false - PEBC.PowerEnvelopeElement: + PEBCPowerEnvelopeElement: type: object required: - duration @@ -282,7 +276,7 @@ components: type: number description: "Lower power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or above the lower_limit. The lower_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type LOWER_LIMIT." additionalProperties: false - PPBC.PowerSequenceContainer: + PPBCPowerSequenceContainer: type: object required: - id @@ -296,10 +290,10 @@ components: minItems: 1 maxItems: 288 items: - $ref: '#/components/schemas/PPBC.PowerSequence' + $ref: '#/components/schemas/PPBCPowerSequence' description: "List of alternative Sequences where one could be chosen by the CEM" additionalProperties: false - PPBC.PowerSequence: + PPBCPowerSequence: type: object required: - id @@ -315,7 +309,7 @@ components: minItems: 1 maxItems: 288 items: - $ref: '#/components/schemas/PPBC.PowerSequenceElement' + $ref: '#/components/schemas/PPBCPowerSequenceElement' description: "List of PPBC.PowerSequenceElements. Shall contain at least one element. Elements must be placed in chronological order." is_interruptible: type: boolean @@ -327,7 +321,7 @@ components: type: boolean description: "Indicates if this PPBC.PowerSequence may only be used during an abnormal condition" additionalProperties: false - PPBC.PowerSequenceElement: + PPBCPowerSequenceElement: type: object required: - duration @@ -344,7 +338,7 @@ components: $ref: '#/components/schemas/PowerForecastValue' description: "The value of power and deviations for the given duration. The array should contain at least one PowerForecastValue and at most one PowerForecastValue per CommodityQuantity." additionalProperties: false - PPBC.PowerSequenceContainerStatus: + PPBCPowerSequenceContainerStatus: type: object required: - power_profile_id @@ -364,10 +358,10 @@ components: $ref: '#/components/schemas/Duration' description: "Time that has passed since the selected sequence has started. A value must be provided, unless no sequence has been selected or the selected sequence hasn’t started yet." status: - $ref: '#/components/schemas/PPBC.PowerSequenceStatus' + $ref: '#/components/schemas/PPBCPowerSequenceStatus' description: "Status of the selected PPBC.PowerSequence" additionalProperties: false - OMBC.OperationMode: + OMBCOperationMode: type: object required: - id @@ -394,7 +388,7 @@ components: type: boolean description: "Indicates if this OMBC.OperationMode may only be used during an abnormal condition." additionalProperties: false - FRBC.ActuatorDescription: + FRBCActuatorDescription: type: object required: - id @@ -421,7 +415,7 @@ components: minItems: 1 maxItems: 100 items: - $ref: '#/components/schemas/FRBC.OperationMode' + $ref: '#/components/schemas/FRBCOperationMode' description: "Provided FRBC.OperationModes associated with this actuator" transitions: type: array @@ -438,7 +432,7 @@ components: $ref: '#/components/schemas/Timer' description: "List of Timers associated with this actuator" additionalProperties: false - FRBC.OperationMode: + FRBCOperationMode: type: object required: - id @@ -456,13 +450,13 @@ components: minItems: 1 maxItems: 100 items: - $ref: '#/components/schemas/FRBC.OperationModeElement' + $ref: '#/components/schemas/FRBCOperationModeElement' description: "List of FRBC.OperationModeElements, which describe the properties of this FRBC.OperationMode depending on the fill_level. The fill_level_ranges of the items in the Array must be contiguous." abnormal_condition_only: type: boolean description: "Indicates if this FRBC.OperationMode may only be used during an abnormal condition" additionalProperties: false - FRBC.OperationModeElement: + FRBCOperationModeElement: type: object required: - fill_level_range @@ -486,7 +480,7 @@ components: $ref: '#/components/schemas/NumberRange' description: "Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor." additionalProperties: false - FRBC.StorageDescription: + FRBCStorageDescription: type: object required: - provides_leakage_behaviour @@ -513,7 +507,7 @@ components: $ref: '#/components/schemas/NumberRange' description: "The range in which the fill_level should remain. It is expected of the CEM to keep the fill_level within this range. When the fill_level is not within this range, the Resource Manager can ignore instructions from the CEM (except during abnormal conditions). " additionalProperties: false - FRBC.LeakageBehaviourElement: + FRBCLeakageBehaviourElement: type: object required: - fill_level_range @@ -526,7 +520,7 @@ components: type: number description: "Indicates how fast the momentary fill level will decrease per second due to leakage within the given range of the fill level. A positive value indicates that the fill level decreases over time due to leakage." additionalProperties: false - FRBC.UsageForecastElement: + FRBCUsageForecastElement: type: object required: - duration @@ -557,7 +551,7 @@ components: type: number description: "The lower limit of the range with a 100 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage." additionalProperties: false - FRBC.FillLevelTargetProfileElement: + FRBCFillLevelTargetProfileElement: type: object required: - duration @@ -570,7 +564,7 @@ components: $ref: '#/components/schemas/NumberRange' description: "The target range in which the fill_level must be for the time period during which the element is active. The start of the range must be smaller or equal to the end of the range. The CEM must take best-effort actions to proactively achieve this target." additionalProperties: false - DDBC.ActuatorDescription: + DDBCActuatorDescription: type: object required: - id @@ -597,7 +591,7 @@ components: minItems: 1 maxItems: 100 items: - $ref: '#/components/schemas/DDBC.OperationMode' + $ref: '#/components/schemas/DDBCOperationMode' description: "List of all Operation Modes that are available for this actuator. There shall be at least one DDBC.OperationMode." transitions: type: array @@ -614,7 +608,7 @@ components: $ref: '#/components/schemas/Timer' description: "List of Timers associated with Transitions for this Actuator. Can be empty." additionalProperties: false - DDBC.OperationMode: + DDBCOperationMode: type: object required: - Id @@ -645,7 +639,7 @@ components: type: boolean description: "Indicates if this DDBC.OperationMode may only be used during an abnormal condition." additionalProperties: false - DDBC.AverageDemandRateForecastElement: + DDBCAverageDemandRateForecastElement: type: object required: - duration @@ -727,19 +721,19 @@ components: DEMAND_DRIVEN_BASED_CONTROL: Identifier for the Fill Rate Based Control type NOT_CONTROLABLE: Identifier that is to be used if no control is possible. Resources of this type can still provide measurements and forecast NO_SELECTION: Identifier that is to be used if no control type is or has been selected. - PEBC.PowerEnvelopeLimitType: + PEBCPowerEnvelopeLimitType: type: string enum: ["UPPER_LIMIT", "LOWER_LIMIT"] description: | UPPER_LIMIT: Indicating the upper limit of a PEBC.PowerEnvelope (see Clause 7.6.2) LOWER_LIMIT: Indicating the lower limit of a PEBC.PowerEnvelope (see Clause 7.6.2) - PEBC.PowerEnvelopeConsequenceType: + PEBCPowerEnvelopeConsequenceType: type: string enum: ["VANISH", "DEFER"] description: | VANISH: Indicating that the limited load or generated will be lost and not reappear in the future (see Clause 7.6.2) DEFER: Indicating that the limited load or generation will be postponed to a later moment (see Clause 7.6.2) - PPBC.PowerSequenceStatus: + PPBCPowerSequenceStatus: type: string enum: ["NOT_SCHEDULED", "SCHEDULED", "EXECUTING", "INTERRUPTED", "FINISHED", "ABORTED"] description: | @@ -749,7 +743,7 @@ components: INTERRUPTED: The selected PPBC.PowerSequence is being executed, but is currently interrupted and will continue afterwards FINISHED: The selected PPBC.PowerSequence was executed and finished successfully ABORTED: The selected PPBC.PowerSequence was aborted by the device and will not continue - OMBC.TimerStatus: + OMBCTimerStatus: type: object required: - message_type @@ -758,8 +752,8 @@ components: - finished_at properties: message_type: + const: OMBC.TimerStatus type: string - enum: [ "OMBC.TimerStatus" ] message_id: $ref: '#/components/schemas/ID' timer_id: @@ -770,7 +764,7 @@ components: format: date-time description: "Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past." additionalProperties: false - FRBC.TimerStatus: + FRBCTimerStatus: type: object required: - message_type @@ -780,8 +774,8 @@ components: - finished_at properties: message_type: + const: FRBC.TimerStatus type: string - enum: [ "FRBC.TimerStatus" ] message_id: $ref: '#/components/schemas/ID' timer_id: @@ -795,7 +789,7 @@ components: format: date-time description: "Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past." additionalProperties: false - DDBC.TimerStatus: + DDBCTimerStatus: type: object required: - message_type @@ -805,8 +799,8 @@ components: - finished_at properties: message_type: + const: DDBC.TimerStatus type: string - enum: [ "DDBC.TimerStatus" ] message_id: $ref: '#/components/schemas/ID' timer_id: @@ -828,8 +822,8 @@ components: - control_type properties: message_type: + const: SelectControlType type: string - enum: [ "SelectControlType" ] message_id: $ref: '#/components/schemas/ID' control_type: @@ -844,8 +838,8 @@ components: - request properties: message_type: + const: SessionRequest type: string - enum: [ "SessionRequest" ] message_id: $ref: '#/components/schemas/ID' request: @@ -864,8 +858,8 @@ components: - object_id properties: message_type: + const: RevokeObject type: string - enum: [ "RevokeObject" ] message_id: $ref: '#/components/schemas/ID' object_type: @@ -883,8 +877,8 @@ components: - role properties: message_type: + const: Handshake type: string - enum: [ "Handshake" ] message_id: $ref: '#/components/schemas/ID' role: @@ -905,8 +899,8 @@ components: - selected_protocol_version properties: message_type: + const: HandshakeResponse type: string - enum: [ "HandshakeResponse" ] message_id: $ref: '#/components/schemas/ID' selected_protocol_version: @@ -926,8 +920,8 @@ components: - provides_power_measurement_types properties: message_type: + const: ResourceManagerDetails type: string - enum: [ "ResourceManagerDetails" ] message_id: $ref: '#/components/schemas/ID' resource_id: @@ -988,8 +982,8 @@ components: - values properties: message_type: + const: PowerMeasurement type: string - enum: [ "PowerMeasurement" ] message_id: $ref: '#/components/schemas/ID' measurement_timestamp: @@ -1012,8 +1006,8 @@ components: - status properties: message_type: + const: ReceptionStatus type: string - enum: [ "ReceptionStatus" ] subject_message_id: $ref: '#/components/schemas/ID' description: "The message this ReceptionStatus refers to" @@ -1034,8 +1028,8 @@ components: - timestamp properties: message_type: + const: InstructionStatusUpdate type: string - enum: [ "InstructionStatusUpdate" ] message_id: $ref: '#/components/schemas/ID' instruction_id: @@ -1058,8 +1052,8 @@ components: - elements properties: message_type: + const: PowerForecast type: string - enum: [ "PowerForecast" ] message_id: $ref: '#/components/schemas/ID' start_time: @@ -1074,7 +1068,7 @@ components: $ref: '#/components/schemas/PowerForecastElement' description: "Elements of which this forecast consists. Contains at least one element. Elements must be placed in chronological order." additionalProperties: false - PEBC.PowerConstraints: + PEBCPowerConstraints: type: object required: - message_type @@ -1085,8 +1079,8 @@ components: - allowed_limit_ranges properties: message_type: + const: PEBC.PowerConstraints type: string - enum: [ "PEBC.PowerConstraints" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1101,17 +1095,17 @@ components: format: date-time description: "Moment until this PEBC.PowerConstraints is valid. If valid_until is not present, there is no determined end time of this PEBC.PowerConstraints." consequence_type: - $ref: '#/components/schemas/PEBC.PowerEnvelopeConsequenceType' + $ref: '#/components/schemas/PEBCPowerEnvelopeConsequenceType' description: "Type of consequence of limiting power" allowed_limit_ranges: type: array minItems: 2 maxItems: 100 items: - $ref: '#/components/schemas/PEBC.AllowedLimitRange' + $ref: '#/components/schemas/PEBCAllowedLimitRange' description: "The actual constraints. There shall be at least one PEBC.AllowedLimitRange for the UPPER_LIMIT and at least one AllowedLimitRange for the LOWER_LIMIT. It is allowed to have multiple PEBC.AllowedLimitRange objects with identical CommodityQuantities and LimitTypes." additionalProperties: false - PEBC.EnergyConstraint: + PEBCEnergyConstraint: type: object required: - message_type @@ -1124,8 +1118,8 @@ components: - commodity_quantity properties: message_type: + const: PEBC.EnergyConstraint type: string - enum: [ "PEBC.EnergyConstraint" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1149,7 +1143,7 @@ components: $ref: '#/components/schemas/CommodityQuantity' description: "Type of power quantity which applies to upper_average_power and lower_average_power" additionalProperties: false - PEBC.Instruction: + PEBCInstruction: type: object required: - message_type @@ -1161,8 +1155,8 @@ components: - power_envelopes properties: message_type: + const: PEBC.Instruction type: string - enum: [ "PEBC.Instruction" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1183,10 +1177,10 @@ components: minItems: 1 maxItems: 10 items: - $ref: '#/components/schemas/PEBC.PowerEnvelope' + $ref: '#/components/schemas/PEBCPowerEnvelope' description: "The PEBC.PowerEnvelope(s) that should be followed by the Resource Manager. There shall be at least one PEBC.PowerEnvelope, but at most one PEBC.PowerEnvelope for each CommodityQuantity." additionalProperties: false - PPBC.PowerProfileDefinition: + PPBCPowerProfileDefinition: type: object required: - message_type @@ -1197,8 +1191,8 @@ components: - power_sequences_containers properties: message_type: + const: PPBC.PowerProfileDefinition type: string - enum: [ "PPBC.PowerProfileDefinition" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1217,10 +1211,10 @@ components: minItems: 1 maxItems: 1000 items: - $ref: '#/components/schemas/PPBC.PowerSequenceContainer' + $ref: '#/components/schemas/PPBCPowerSequenceContainer' description: "The PPBC.PowerSequenceContainers that make up this PPBC.PowerProfileDefinition. There shall be at least one PPBC.PowerSequenceContainer that includes at least one PPBC.PowerSequence. PPBC.PowerSequenceContainers must be placed in chronological order." additionalProperties: false - PPBC.PowerProfileStatus: + PPBCPowerProfileStatus: type: object required: - message_type @@ -1228,8 +1222,8 @@ components: - sequence_container_status properties: message_type: + const: PPBC.PowerProfileStatus type: string - enum: [ "PPBC.PowerProfileStatus" ] message_id: $ref: '#/components/schemas/ID' sequence_container_status: @@ -1237,10 +1231,10 @@ components: minItems: 1 maxItems: 1000 items: - $ref: '#/components/schemas/PPBC.PowerSequenceContainerStatus' + $ref: '#/components/schemas/PPBCPowerSequenceContainerStatus' description: "Array with status information for all PPBC.PowerSequenceContainers in the PPBC.PowerProfileDefinition." additionalProperties: false - PPBC.ScheduleInstruction: + PPBCScheduleInstruction: type: object required: - message_type @@ -1253,8 +1247,8 @@ components: - abnormal_condition properties: message_type: + const: PPBC.ScheduleInstruction type: string - enum: [ "PPBC.ScheduleInstruction" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1277,7 +1271,7 @@ components: type: boolean description: "Indicates if this is an instruction during an abnormal condition" additionalProperties: false - PPBC.StartInterruptionInstruction: + PPBCStartInterruptionInstruction: type: object required: - message_type @@ -1290,8 +1284,8 @@ components: - abnormal_condition properties: message_type: + const: PPBC.StartInterruptionInstruction type: string - enum: [ "PPBC.StartInterruptionInstruction" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1314,7 +1308,7 @@ components: type: boolean description: "Indicates if this is an instruction during an abnormal condition" additionalProperties: false - PPBC.EndInterruptionInstruction: + PPBCEndInterruptionInstruction: type: object required: - message_type @@ -1327,8 +1321,8 @@ components: - abnormal_condition properties: message_type: + const: PPBC.EndInterruptionInstruction type: string - enum: [ "PPBC.EndInterruptionInstruction" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1351,7 +1345,7 @@ components: type: boolean description: "Indicates if this is an instruction during an abnormal condition" additionalProperties: false - OMBC.SystemDescription: + OMBCSystemDescription: type: object required: - message_type @@ -1362,8 +1356,8 @@ components: - timers properties: message_type: + const: OMBC.SystemDescription type: string - enum: [ "OMBC.SystemDescription" ] message_id: $ref: '#/components/schemas/ID' valid_from: @@ -1375,7 +1369,7 @@ components: minItems: 1 maxItems: 100 items: - $ref: '#/components/schemas/OMBC.OperationMode' + $ref: '#/components/schemas/OMBCOperationMode' description: "OMBC.OperationModes available for the CEM in order to coordinate the device behaviour." transitions: type: array @@ -1392,7 +1386,7 @@ components: $ref: '#/components/schemas/Timer' description: "Timers that control when certain transitions can be made." additionalProperties: false - OMBC.Status: + OMBCStatus: type: object required: - message_type @@ -1401,8 +1395,8 @@ components: - operation_mode_factor properties: message_type: + const: OMBC.Status type: string - enum: [ "OMBC.Status" ] message_id: $ref: '#/components/schemas/ID' active_operation_mode_id: @@ -1419,7 +1413,7 @@ components: format: date-time description: "Time at which the transition from the previous OMBC.OperationMode to the active OMBC.OperationMode was initiated. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of." additionalProperties: false - OMBC.Instruction: + OMBCInstruction: type: object required: - message_type @@ -1431,8 +1425,8 @@ components: - abnormal_condition properties: message_type: + const: OMBC.Instruction type: string - enum: [ "OMBC.Instruction" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1452,7 +1446,7 @@ components: type: boolean description: "Indicates if this is an instruction during an abnormal condition" additionalProperties: false - FRBC.SystemDescription: + FRBCSystemDescription: type: object required: - message_type @@ -1462,8 +1456,8 @@ components: - storage properties: message_type: + const: FRBC.SystemDescription type: string - enum: [ "FRBC.SystemDescription" ] message_id: $ref: '#/components/schemas/ID' valid_from: @@ -1475,13 +1469,13 @@ components: minItems: 1 maxItems: 10 items: - $ref: '#/components/schemas/FRBC.ActuatorDescription' + $ref: '#/components/schemas/FRBCActuatorDescription' description: "Details of all Actuators." storage: - $ref: '#/components/schemas/FRBC.StorageDescription' + $ref: '#/components/schemas/FRBCStorageDescription' description: "Details of the storage." additionalProperties: false - FRBC.ActuatorStatus: + FRBCActuatorStatus: type: object required: - message_type @@ -1491,8 +1485,8 @@ components: - operation_mode_factor properties: message_type: + const: FRBC.ActuatorStatus type: string - enum: [ "FRBC.ActuatorStatus" ] message_id: $ref: '#/components/schemas/ID' actuator_id: @@ -1512,7 +1506,7 @@ components: format: date-time description: "Time at which the transition from the previous FRBC.OperationMode to the active FRBC.OperationMode was initiated. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of." additionalProperties: false - FRBC.StorageStatus: + FRBCStorageStatus: type: object required: - message_type @@ -1520,15 +1514,15 @@ components: - present_fill_level properties: message_type: + const: FRBC.StorageStatus type: string - enum: [ "FRBC.StorageStatus" ] message_id: $ref: '#/components/schemas/ID' present_fill_level: type: number description: "Present fill level of the Storage" additionalProperties: false - FRBC.LeakageBehaviour: + FRBCLeakageBehaviour: type: object required: - message_type @@ -1537,8 +1531,8 @@ components: - elements properties: message_type: + const: FRBC.LeakageBehaviour type: string - enum: [ "FRBC.LeakageBehaviour" ] message_id: $ref: '#/components/schemas/ID' valid_from: @@ -1550,10 +1544,10 @@ components: minItems: 1 maxItems: 288 items: - $ref: '#/components/schemas/FRBC.LeakageBehaviourElement' + $ref: '#/components/schemas/FRBCLeakageBehaviourElement' description: "List of elements that model the leakage behaviour of the buffer. The fill_level_ranges of the elements must be contiguous." additionalProperties: false - FRBC.Instruction: + FRBCInstruction: type: object required: - message_type @@ -1566,8 +1560,8 @@ components: - abnormal_condition properties: message_type: + const: FRBC.Instruction type: string - enum: [ "FRBC.Instruction" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1590,7 +1584,7 @@ components: type: boolean description: "Indicates if this is an instruction during an abnormal condition." additionalProperties: false - FRBC.UsageForecast: + FRBCUsageForecast: type: object required: - message_type @@ -1599,8 +1593,8 @@ components: - elements properties: message_type: + const: FRBC.UsageForecast type: string - enum: [ "FRBC.UsageForecast" ] message_id: $ref: '#/components/schemas/ID' start_time: @@ -1612,10 +1606,10 @@ components: minItems: 1 maxItems: 288 items: - $ref: '#/components/schemas/FRBC.UsageForecastElement' + $ref: '#/components/schemas/FRBCUsageForecastElement' description: "Further elements that model the profile. There shall be at least one element. Elements must be placed in chronological order." additionalProperties: false - FRBC.FillLevelTargetProfile: + FRBCFillLevelTargetProfile: type: object required: - message_type @@ -1624,8 +1618,8 @@ components: - elements properties: message_type: + const: FRBC.FillLevelTargetProfile type: string - enum: [ "FRBC.FillLevelTargetProfile" ] message_id: $ref: '#/components/schemas/ID' start_time: @@ -1637,10 +1631,10 @@ components: minItems: 1 maxItems: 288 items: - $ref: '#/components/schemas/FRBC.FillLevelTargetProfileElement' + $ref: '#/components/schemas/FRBCFillLevelTargetProfileElement' description: "List of different fill levels that have to be targeted within a given duration. There shall be at least one element. Elements must be placed in chronological order." additionalProperties: false - DDBC.SystemDescription: + DDBCSystemDescription: type: object required: - message_type @@ -1651,8 +1645,8 @@ components: - provides_average_demand_rate_forecast properties: message_type: + const: DDBC.SystemDescription type: string - enum: [ "DDBC.SystemDescription" ] message_id: $ref: '#/components/schemas/ID' valid_from: @@ -1664,7 +1658,7 @@ components: minItems: 1 maxItems: 10 items: - $ref: '#/components/schemas/DDBC.ActuatorDescription' + $ref: '#/components/schemas/DDBCActuatorDescription' description: "List of all available actuators in the system. Must contain at least one DDBC.ActuatorAggregated." present_demand_rate: $ref: '#/components/schemas/NumberRange' @@ -1673,7 +1667,7 @@ components: type: boolean description: "Indicates whether the Resource Manager could provide a demand rate forecast through the DDBC.AverageDemandRateForecast." additionalProperties: false - DDBC.ActuatorStatus: + DDBCActuatorStatus: type: object required: - message_type @@ -1683,8 +1677,8 @@ components: - operation_mode_factor properties: message_type: + const: DDBC.ActuatorStatus type: string - enum: [ "DDBC.ActuatorStatus" ] message_id: $ref: '#/components/schemas/ID' actuator_id: @@ -1704,7 +1698,7 @@ components: format: date-time description: "Time at which the transition from the previous DDBC.OperationMode to the active DDBC.OperationMode was initiated. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of." additionalProperties: false - DDBC.Instruction: + DDBCInstruction: type: object required: - message_type @@ -1717,8 +1711,8 @@ components: - operation_mode_factor properties: message_type: + const: DDBC.Instruction type: string - enum: [ "DDBC.Instruction" ] message_id: $ref: '#/components/schemas/ID' id: @@ -1741,7 +1735,7 @@ components: type: number description: "The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1." additionalProperties: false - DDBC.AverageDemandRateForecast: + DDBCAverageDemandRateForecast: type: object required: - message_type @@ -1750,8 +1744,8 @@ components: - elements properties: message_type: + const: DDBC.AverageDemandRateForecast type: string - enum: [ "DDBC.AverageDemandRateForecast" ] message_id: $ref: '#/components/schemas/ID' start_time: @@ -1763,6 +1757,6 @@ components: minItems: 1 maxItems: 288 items: - $ref: '#/components/schemas/DDBC.AverageDemandRateForecastElement' + $ref: '#/components/schemas/DDBCAverageDemandRateForecastElement' description: "Elements of the profile. Elements must be placed in chronological order." additionalProperties: false From 6a9c017e9843fe65c386898f25aa127a31a959d3 Mon Sep 17 00:00:00 2001 From: Sebastiaan la Fleur Date: Mon, 29 Jul 2024 10:55:33 +0200 Subject: [PATCH 4/4] 38: Generated version 0.0.2-beta with manual alterations in advance of solving issues https://github.com/flexiblepower/s2-ws-json/issues/17 and https://github.com/flexiblepower/s2-ws-json/issues/18 --- src/s2python/generated/gen_s2.py | 1919 +++++++++++++++--------------- 1 file changed, 961 insertions(+), 958 deletions(-) diff --git a/src/s2python/generated/gen_s2.py b/src/s2python/generated/gen_s2.py index 9c26dfe..55da95f 100644 --- a/src/s2python/generated/gen_s2.py +++ b/src/s2python/generated/gen_s2.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: openapi.yml -# timestamp: 2023-07-31T15:51:31+00:00 +# timestamp: 2024-07-29T08:53:39+00:00 from __future__ import annotations @@ -11,805 +11,804 @@ from pydantic import BaseModel, Extra, Field, conint, constr -class Commodity(Enum): - GAS = "GAS" - HEAT = "HEAT" - ELECTRICITY = "ELECTRICITY" - OIL = "OIL" - - -class CommodityQuantity(Enum): - ELECTRIC_POWER_L1 = "ELECTRIC.POWER.L1" - ELECTRIC_POWER_L2 = "ELECTRIC.POWER.L2" - ELECTRIC_POWER_L3 = "ELECTRIC.POWER.L3" - ELECTRIC_POWER_3_PHASE_SYMMETRIC = "ELECTRIC.POWER.3_PHASE_SYMMETRIC" - NATURAL_GAS_FLOW_RATE = "NATURAL_GAS.FLOW_RATE" - HYDROGEN_FLOW_RATE = "HYDROGEN.FLOW_RATE" - HEAT_TEMPERATURE = "HEAT.TEMPERATURE" - HEAT_FLOW_RATE = "HEAT.FLOW_RATE" - HEAT_THERMAL_POWER = "HEAT.THERMAL_POWER" - OIL_FLOW_RATE = "OIL.FLOW_RATE" +class Duration(BaseModel): + __root__: conint(ge=0) = Field(..., description='Duration in milliseconds') -class ControlType(Enum): - POWER_ENVELOPE_BASED_CONTROL = "POWER_ENVELOPE_BASED_CONTROL" - POWER_PROFILE_BASED_CONTROL = "POWER_PROFILE_BASED_CONTROL" - OPERATION_MODE_BASED_CONTROL = "OPERATION_MODE_BASED_CONTROL" - FILL_RATE_BASED_CONTROL = "FILL_RATE_BASED_CONTROL" - DEMAND_DRIVEN_BASED_CONTROL = "DEMAND_DRIVEN_BASED_CONTROL" - NOT_CONTROLABLE = "NOT_CONTROLABLE" - NO_SELECTION = "NO_SELECTION" +class ID(BaseModel): + __root__: constr(regex=r'[a-zA-Z0-9\-_:]{2,64}') = Field(..., description='UUID') class Currency(Enum): - AED = "AED" - ANG = "ANG" - AUD = "AUD" - CHE = "CHE" - CHF = "CHF" - CHW = "CHW" - EUR = "EUR" - GBP = "GBP" - LBP = "LBP" - LKR = "LKR" - LRD = "LRD" - LSL = "LSL" - LYD = "LYD" - MAD = "MAD" - MDL = "MDL" - MGA = "MGA" - MKD = "MKD" - MMK = "MMK" - MNT = "MNT" - MOP = "MOP" - MRO = "MRO" - MUR = "MUR" - MVR = "MVR" - MWK = "MWK" - MXN = "MXN" - MXV = "MXV" - MYR = "MYR" - MZN = "MZN" - NAD = "NAD" - NGN = "NGN" - NIO = "NIO" - NOK = "NOK" - NPR = "NPR" - NZD = "NZD" - OMR = "OMR" - PAB = "PAB" - PEN = "PEN" - PGK = "PGK" - PHP = "PHP" - PKR = "PKR" - PLN = "PLN" - PYG = "PYG" - QAR = "QAR" - RON = "RON" - RSD = "RSD" - RUB = "RUB" - RWF = "RWF" - SAR = "SAR" - SBD = "SBD" - SCR = "SCR" - SDG = "SDG" - SEK = "SEK" - SGD = "SGD" - SHP = "SHP" - SLL = "SLL" - SOS = "SOS" - SRD = "SRD" - SSP = "SSP" - STD = "STD" - SYP = "SYP" - SZL = "SZL" - THB = "THB" - TJS = "TJS" - TMT = "TMT" - TND = "TND" - TOP = "TOP" - TRY = "TRY" - TTD = "TTD" - TWD = "TWD" - TZS = "TZS" - UAH = "UAH" - UGX = "UGX" - USD = "USD" - USN = "USN" - UYI = "UYI" - UYU = "UYU" - UZS = "UZS" - VEF = "VEF" - VND = "VND" - VUV = "VUV" - WST = "WST" - XAG = "XAG" - XAU = "XAU" - XBA = "XBA" - XBB = "XBB" - XBC = "XBC" - XBD = "XBD" - XCD = "XCD" - XOF = "XOF" - XPD = "XPD" - XPF = "XPF" - XPT = "XPT" - XSU = "XSU" - XTS = "XTS" - XUA = "XUA" - XXX = "XXX" - YER = "YER" - ZAR = "ZAR" - ZMW = "ZMW" - ZWL = "ZWL" + AED = 'AED' + ANG = 'ANG' + AUD = 'AUD' + CHE = 'CHE' + CHF = 'CHF' + CHW = 'CHW' + EUR = 'EUR' + GBP = 'GBP' + LBP = 'LBP' + LKR = 'LKR' + LRD = 'LRD' + LSL = 'LSL' + LYD = 'LYD' + MAD = 'MAD' + MDL = 'MDL' + MGA = 'MGA' + MKD = 'MKD' + MMK = 'MMK' + MNT = 'MNT' + MOP = 'MOP' + MRO = 'MRO' + MUR = 'MUR' + MVR = 'MVR' + MWK = 'MWK' + MXN = 'MXN' + MXV = 'MXV' + MYR = 'MYR' + MZN = 'MZN' + NAD = 'NAD' + NGN = 'NGN' + NIO = 'NIO' + NOK = 'NOK' + NPR = 'NPR' + NZD = 'NZD' + OMR = 'OMR' + PAB = 'PAB' + PEN = 'PEN' + PGK = 'PGK' + PHP = 'PHP' + PKR = 'PKR' + PLN = 'PLN' + PYG = 'PYG' + QAR = 'QAR' + RON = 'RON' + RSD = 'RSD' + RUB = 'RUB' + RWF = 'RWF' + SAR = 'SAR' + SBD = 'SBD' + SCR = 'SCR' + SDG = 'SDG' + SEK = 'SEK' + SGD = 'SGD' + SHP = 'SHP' + SLL = 'SLL' + SOS = 'SOS' + SRD = 'SRD' + SSP = 'SSP' + STD = 'STD' + SYP = 'SYP' + SZL = 'SZL' + THB = 'THB' + TJS = 'TJS' + TMT = 'TMT' + TND = 'TND' + TOP = 'TOP' + TRY = 'TRY' + TTD = 'TTD' + TWD = 'TWD' + TZS = 'TZS' + UAH = 'UAH' + UGX = 'UGX' + USD = 'USD' + USN = 'USN' + UYI = 'UYI' + UYU = 'UYU' + UZS = 'UZS' + VEF = 'VEF' + VND = 'VND' + VUV = 'VUV' + WST = 'WST' + XAG = 'XAG' + XAU = 'XAU' + XBA = 'XBA' + XBB = 'XBB' + XBC = 'XBC' + XBD = 'XBD' + XCD = 'XCD' + XOF = 'XOF' + XPD = 'XPD' + XPF = 'XPF' + XPT = 'XPT' + XSU = 'XSU' + XTS = 'XTS' + XUA = 'XUA' + XXX = 'XXX' + YER = 'YER' + ZAR = 'ZAR' + ZMW = 'ZMW' + ZWL = 'ZWL' -class Duration(BaseModel): - __root__: conint(ge=0) = Field(..., description="Duration in milliseconds") - - -class EnergyManagementRole(Enum): - CEM = "CEM" - RM = "RM" - - -class FRBCUsageForecastElement(BaseModel): - class Config: - extra = Extra.forbid - - duration: Duration = Field( - ..., description="Indicator for how long the given usage_rate is valid." - ) - usage_rate_expected: float = Field( - ..., - description="The most likely value for the usage rate; the expected increase or decrease of the fill_level per second", - ) - usage_rate_lower_68PPR: Optional[float] = Field( - None, - description="The lower limit of the range with a 68\xa0% probability that the usage rate is within that range", - ) - usage_rate_lower_95PPR: Optional[float] = Field( - None, - description="The lower limit of the range with a 95\xa0% probability that the usage rate is within that range", - ) - usage_rate_lower_limit: Optional[float] = Field( - None, - description="The lower limit of the range with a 100\xa0% probability that the usage rate is within that range", - ) - usage_rate_upper_68PPR: Optional[float] = Field( - None, - description="The upper limit of the range with a 68\xa0% probability that the usage rate is within that range", - ) - usage_rate_upper_95PPR: Optional[float] = Field( - None, - description="The upper limit of the range with a 95\xa0% probability that the usage rate is within that range. ", - ) - usage_rate_upper_limit: Optional[float] = Field( - None, - description="The upper limit of the range with a 100\xa0% probability that the usage rate is within that range.", - ) - +class SessionRequestType(Enum): + RECONNECT = 'RECONNECT' + TERMINATE = 'TERMINATE' -class ID(BaseModel): - __root__: constr(regex=r"[a-zA-Z0-9\-_:]{2,64}") = Field( - ..., description="An identifier expressed as a UUID" - ) +class RevokableObjects(Enum): + PEBC_PowerConstraints = 'PEBC.PowerConstraints' + PEBC_EnergyConstraint = 'PEBC.EnergyConstraint' + PEBC_Instruction = 'PEBC.Instruction' + PPBC_PowerProfileDefinition = 'PPBC.PowerProfileDefinition' + PPBC_ScheduleInstruction = 'PPBC.ScheduleInstruction' + PPBC_StartInterruptionInstruction = 'PPBC.StartInterruptionInstruction' + PPBC_EndInterruptionInstruction = 'PPBC.EndInterruptionInstruction' + OMBC_SystemDescription = 'OMBC.SystemDescription' + OMBC_Instruction = 'OMBC.Instruction' + FRBC_SystemDescription = 'FRBC.SystemDescription' + FRBC_Instruction = 'FRBC.Instruction' + DDBC_SystemDescription = 'DDBC.SystemDescription' + DDBC_Instruction = 'DDBC.Instruction' -class InstructionStatus(Enum): - NEW = "NEW" - ACCEPTED = "ACCEPTED" - REJECTED = "REJECTED" - REVOKED = "REVOKED" - STARTED = "STARTED" - SUCCEEDED = "SUCCEEDED" - ABORTED = "ABORTED" +class EnergyManagementRole(Enum): + CEM = 'CEM' + RM = 'RM' -class InstructionStatusUpdate(BaseModel): - class Config: - extra = Extra.forbid - instruction_id: ID = Field( - ..., description="ID of this instruction (as provided by the CEM) " - ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("InstructionStatusUpdate", const=True) - status_type: InstructionStatus = Field( - ..., description="Present status of this instruction." - ) - timestamp: datetime = Field( - ..., description="Timestamp when status_type has changed the last time." - ) +class ReceptionStatusValues(Enum): + INVALID_DATA = 'INVALID_DATA' + INVALID_MESSAGE = 'INVALID_MESSAGE' + INVALID_CONTENT = 'INVALID_CONTENT' + TEMPORARY_ERROR = 'TEMPORARY_ERROR' + PERMANENT_ERROR = 'PERMANENT_ERROR' + OK = 'OK' class NumberRange(BaseModel): class Config: extra = Extra.forbid - end_of_range: float = Field( - ..., description="Number that defines the end of the range" - ) start_of_range: float = Field( - ..., description="Number that defines the start of the range" + ..., description='Number that defines the start of the range' + ) + end_of_range: float = Field( + ..., description='Number that defines the end of the range' ) -class OMBCInstruction(BaseModel): +class Transition(BaseModel): class Config: extra = Extra.forbid - abnormal_condition: bool = Field( - ..., - description="Indicates if this is an instruction during an abnormal condition", - ) - execution_time: datetime = Field( - ..., description="Time when instruction should be executed." - ) id: ID = Field( ..., - description="ID of the instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + description='ID of the Transition. Must be unique in the scope of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in which it is used.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("OMBC.Instruction", const=True) - operation_mode_factor: float = Field( + from_: ID = Field( ..., - description="The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1.", + alias='from', + description='ID of the OperationMode (exact type differs per ControlType) that should be switched from.', ) - operation_mode_id: ID = Field( - ..., description="ID of the OMBC.OperationMode that should be activated" + to: ID = Field( + ..., + description='ID of the OperationMode (exact type differs per ControlType) that will be switched to.', ) - - -class OMBCStatus(BaseModel): - class Config: - extra = Extra.forbid - - active_operation_mode_id: ID = Field( - ..., description="ID of the active OMBC.OperationMode." + start_timers: List[ID] = Field( + ..., + description='List of IDs of Timers that will be (re)started when this transition is initiated', + max_items=1000, + min_items=0, ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("OMBC.Status", const=True) - operation_mode_factor: float = Field( + blocking_timers: List[ID] = Field( ..., - description="The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1.", + description='List of IDs of Timers that block this Transition from initiating while at least one of these Timers is not yet finished', + max_items=1000, + min_items=0, ) - previous_operation_mode_id: Optional[ID] = Field( + transition_costs: Optional[float] = Field( None, - description="ID of the OMBC.OperationMode that was previously active. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of.", + description='Absolute costs for going through this Transition in the currency as described in the ResourceManagerDetails.', ) - transition_timestamp: Optional[datetime] = Field( + transition_duration: Optional[Duration] = Field( None, - description="Time at which the transition from the previous OMBC.OperationMode to the active OMBC.OperationMode was initiated. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of.", + description='Indicates the time between the initiation of this Transition, and the time at which the device behaves according to the Operation Mode which is defined in the ‘to’ data element. When no value is provided it is assumed the transition duration is negligible.', ) - - -class OMBCTimerStatus(BaseModel): - class Config: - extra = Extra.forbid - - finished_at: datetime = Field( + abnormal_condition_only: bool = Field( ..., - description="Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past.", + description='Indicates if this Transition may only be used during an abnormal condition (see Clause )', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("OMBC.TimerStatus", const=True) - timer_id: ID = Field(..., description="The ID of the timer this message refers to") -class PEBCEnergyConstraint(BaseModel): +class Timer(BaseModel): class Config: extra = Extra.forbid - commodity_quantity: CommodityQuantity = Field( - ..., - description="Type of power quantity which applies to upper_average_power and lower_average_power", - ) id: ID = Field( ..., - description="Identifier of this PEBC.EnergyConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", - ) - lower_average_power: float = Field( - ..., - description="Lower average power within the time period given by valid_from and valid_until. If the duration is multiplied with this power value, then the associated lower energy content can be derived. This is the lowest amount of energy the resource will consume during that period of time. ", - ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PEBC.EnergyConstraint", const=True) - upper_average_power: float = Field( - ..., - description="Upper average power within the time period given by valid_from and valid_until. If the duration is multiplied with this power value, then the associated upper energy content can be derived. This is the highest amount of energy the resource will consume during that period of time.", + description='ID of the Timer. Must be unique in the scope of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in which it is used.', ) - valid_from: datetime = Field( - ..., - description="Moment this PEBC.EnergyConstraints information starts to be valid", + diagnostic_label: Optional[str] = Field( + None, + description='Human readable name/description of the Timer. This element is only intended for diagnostic purposes and not for HMI applications.', ) - valid_until: datetime = Field( + duration: Duration = Field( ..., - description="Moment until this PEBC.EnergyConstraints information is valid.", + description='The time it takes for the Timer to finish after it has been started', ) -class PEBCPowerEnvelopeConsequenceType(Enum): - VANISH = "VANISH" - DEFER = "DEFER" - - class PEBCPowerEnvelopeElement(BaseModel): class Config: extra = Extra.forbid - duration: Duration = Field(..., description="The duration of the element") - lower_limit: float = Field( + duration: Duration = Field(..., description='The duration of the element') + upper_limit: float = Field( ..., - description="Lower power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or above the lower_limit. The lower_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type LOWER_LIMIT.", + description='Upper power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or below the upper_limit. The upper_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type UPPER_LIMIT.', ) - upper_limit: float = Field( + lower_limit: float = Field( ..., - description="Upper power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or below the upper_limit. The upper_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type UPPER_LIMIT.", + description='Lower power limit according to the commodity_quantity of the containing PEBC.PowerEnvelope. The lower_limit must be smaller or equal to the upper_limit. The Resource Manager is requested to keep the power values for the given commodity quantity equal to or above the lower_limit. The lower_limit shall be in accordance with the constraints provided by the Resource Manager through any PEBC.AllowedLimitRange with limit_type LOWER_LIMIT.', ) -class PEBCPowerEnvelopeLimitType(Enum): - UPPER_LIMIT = "UPPER_LIMIT" - LOWER_LIMIT = "LOWER_LIMIT" - - -class PPBCEndInterruptionInstruction(BaseModel): +class FRBCStorageDescription(BaseModel): class Config: extra = Extra.forbid - abnormal_condition: bool = Field( - ..., - description="Indicates if this is an instruction during an abnormal condition", + diagnostic_label: Optional[str] = Field( + None, + description='Human readable name/description of the storage (e.g. hot water buffer or battery). This element is only intended for diagnostic purposes and not for HMI applications.', ) - execution_time: datetime = Field( - ..., description="End time of Interruption of the PPBC.PowerSequence." + fill_level_label: Optional[str] = Field( + None, + description='Human readable description of the (physical) units associated with the fill_level (e.g. degrees Celsius or percentage state of charge). This element is only intended for diagnostic purposes and not for HMI applications.', ) - id: ID = Field( + provides_leakage_behaviour: bool = Field( ..., - description="ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + description='Indicates whether the Storage could provide details of power leakage behaviour through the FRBC.LeakageBehaviour.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PPBC.EndInterruptionInstruction", const=True) - power_profile_id: ID = Field( + provides_fill_level_target_profile: bool = Field( ..., - description="ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence interruption is being ended by the CEM.", + description='Indicates whether the Storage could provide a target profile for the fill level through the FRBC.FillLevelTargetProfile.', ) - power_sequence_id: ID = Field( + provides_usage_forecast: bool = Field( ..., - description="ID of the PPBC.PowerSequence for which the CEM wants to end the interruption.", + description='Indicates whether the Storage could provide a UsageForecast through the FRBC.UsageForecast.', ) - sequence_container_id: ID = Field( + fill_level_range: NumberRange = Field( ..., - description="ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence interruption is being ended by the CEM.", + description='The range in which the fill_level should remain. It is expected of the CEM to keep the fill_level within this range. When the fill_level is not within this range, the Resource Manager can ignore instructions from the CEM (except during abnormal conditions). ', ) -class PPBCPowerSequenceStatus(Enum): - NOT_SCHEDULED = "NOT_SCHEDULED" - SCHEDULED = "SCHEDULED" - EXECUTING = "EXECUTING" - INTERRUPTED = "INTERRUPTED" - FINISHED = "FINISHED" - ABORTED = "ABORTED" - - -class PPBCScheduleInstruction(BaseModel): +class FRBCLeakageBehaviourElement(BaseModel): class Config: extra = Extra.forbid - abnormal_condition: bool = Field( - ..., - description="Indicates if this is an instruction during an abnormal condition", - ) - execution_time: datetime = Field( - ..., description="Start time of the PPBC.PowerSequence." - ) - id: ID = Field( - ..., - description="ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", - ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PPBC.ScheduleInstruction", const=True) - power_profile_id: ID = Field( - ..., - description="ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence is being selected and scheduled by the CEM.", - ) - power_sequence_id: ID = Field( + fill_level_range: NumberRange = Field( ..., - description="ID of the PPBC.PowerSequence that is being selected and scheduled by the CEM.", + description='The fill level range for which this FRBC.LeakageBehaviourElement applies. The start of the range must be less than the end of the range.', ) - sequence_container_id: ID = Field( + leakage_rate: float = Field( ..., - description="ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence is being selected and scheduled by the CEM.", + description='Indicates how fast the momentary fill level will decrease per second due to leakage within the given range of the fill level. A positive value indicates that the fill level decreases over time due to leakage.', ) -class PPBCStartInterruptionInstruction(BaseModel): +class FRBCUsageForecastElement(BaseModel): class Config: extra = Extra.forbid - abnormal_condition: bool = Field( - ..., - description="Indicates if this is an instruction during an abnormal condition", + duration: Duration = Field( + ..., description='Indicator for how long the given usage_rate is valid.' ) - execution_time: datetime = Field( - ..., description="Start time of the interruption of the PPBC.PowerSequence." + usage_rate_upper_limit: Optional[float] = Field( + None, + description='The upper limit of the range with a 100 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage.', ) - id: ID = Field( - ..., - description="ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + usage_rate_upper_95PPR: Optional[float] = Field( + None, + description='The upper limit of the range with a 95 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PPBC.StartInterruptionInstruction", const=True) - power_profile_id: ID = Field( + usage_rate_upper_68PPR: Optional[float] = Field( + None, + description='The upper limit of the range with a 68 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage.', + ) + usage_rate_expected: float = Field( ..., - description="ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence is being interrupted by the CEM.", + description='The most likely value for the usage rate; the expected increase or decrease of the fill_level per second. A positive value indicates that the fill level will decrease due to usage.', ) - power_sequence_id: ID = Field( - ..., description="ID of the PPBC.PowerSequence that the CEM wants to interrupt." + usage_rate_lower_68PPR: Optional[float] = Field( + None, + description='The lower limit of the range with a 68 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage.', ) - sequence_container_id: ID = Field( - ..., - description="ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence is being interrupted by the CEM.", + usage_rate_lower_95PPR: Optional[float] = Field( + None, + description='The lower limit of the range with a 95 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage.', + ) + usage_rate_lower_limit: Optional[float] = Field( + None, + description='The lower limit of the range with a 100 % probability that the usage rate is within that range. A positive value indicates that the fill level will decrease due to usage.', ) -class PowerForecastValue(BaseModel): +class FRBCFillLevelTargetProfileElement(BaseModel): class Config: extra = Extra.forbid - commodity_quantity: CommodityQuantity = Field( - ..., description="The power quantity the value refers to" + duration: Duration = Field(..., description='The duration of the element.') + fill_level_range: NumberRange = Field( + ..., + description='The target range in which the fill_level must be for the time period during which the element is active. The start of the range must be smaller or equal to the end of the range. The CEM must take best-effort actions to proactively achieve this target.', ) - value_expected: float = Field(..., description="The expected power value.") - value_lower_68PPR: Optional[float] = Field( + + +class DDBCAverageDemandRateForecastElement(BaseModel): + class Config: + extra = Extra.forbid + + duration: Duration = Field(..., description='Duration of the element') + demand_rate_upper_limit: Optional[float] = Field( None, - description="The lower boundary of the range with 68\xa0% certainty the power value is in it", + description='The upper limit of the range with a 100 % probability that the demand rate is within that range', ) - value_lower_95PPR: Optional[float] = Field( + demand_rate_upper_95PPR: Optional[float] = Field( None, - description="The lower boundary of the range with 95\xa0% certainty the power value is in it", + description='The upper limit of the range with a 95 % probability that the demand rate is within that range', ) - value_lower_limit: Optional[float] = Field( + demand_rate_upper_68PPR: Optional[float] = Field( None, - description="The lower boundary of the range with 100\xa0% certainty the power value is in it", + description='The upper limit of the range with a 68 % probability that the demand rate is within that range', ) - value_upper_68PPR: Optional[float] = Field( + demand_rate_expected: float = Field( + ..., + description='The most likely value for the demand rate; the expected increase or decrease of the fill_level per second', + ) + demand_rate_lower_68PPR: Optional[float] = Field( None, - description="The upper boundary of the range with 68\xa0% certainty the power value is in it", + description='The lower limit of the range with a 68 % probability that the demand rate is within that range', ) - value_upper_95PPR: Optional[float] = Field( + demand_rate_lower_95PPR: Optional[float] = Field( None, - description="The upper boundary of the range with 95\xa0% certainty the power value is in it", + description='The lower limit of the range with a 95 % probability that the demand rate is within that range', ) - value_upper_limit: Optional[float] = Field( + demand_rate_lower_limit: Optional[float] = Field( None, - description="The upper boundary of the range with 100\xa0% certainty the power value is in it", + description='The lower limit of the range with a 100 % probability that the demand rate is within that range', ) -class PowerRange(BaseModel): +class RoleType(Enum): + ENERGY_PRODUCER = 'ENERGY_PRODUCER' + ENERGY_CONSUMER = 'ENERGY_CONSUMER' + ENERGY_STORAGE = 'ENERGY_STORAGE' + + +class Commodity(Enum): + GAS = 'GAS' + HEAT = 'HEAT' + ELECTRICITY = 'ELECTRICITY' + OIL = 'OIL' + + +class CommodityQuantity(Enum): + ELECTRIC_POWER_L1 = 'ELECTRIC.POWER.L1' + ELECTRIC_POWER_L2 = 'ELECTRIC.POWER.L2' + ELECTRIC_POWER_L3 = 'ELECTRIC.POWER.L3' + ELECTRIC_POWER_3_PHASE_SYMMETRIC = 'ELECTRIC.POWER.3_PHASE_SYMMETRIC' + NATURAL_GAS_FLOW_RATE = 'NATURAL_GAS.FLOW_RATE' + HYDROGEN_FLOW_RATE = 'HYDROGEN.FLOW_RATE' + HEAT_TEMPERATURE = 'HEAT.TEMPERATURE' + HEAT_FLOW_RATE = 'HEAT.FLOW_RATE' + HEAT_THERMAL_POWER = 'HEAT.THERMAL_POWER' + OIL_FLOW_RATE = 'OIL.FLOW_RATE' + + +class InstructionStatus(Enum): + NEW = 'NEW' + ACCEPTED = 'ACCEPTED' + REJECTED = 'REJECTED' + REVOKED = 'REVOKED' + STARTED = 'STARTED' + SUCCEEDED = 'SUCCEEDED' + ABORTED = 'ABORTED' + + +class ControlType(Enum): + POWER_ENVELOPE_BASED_CONTROL = 'POWER_ENVELOPE_BASED_CONTROL' + POWER_PROFILE_BASED_CONTROL = 'POWER_PROFILE_BASED_CONTROL' + OPERATION_MODE_BASED_CONTROL = 'OPERATION_MODE_BASED_CONTROL' + FILL_RATE_BASED_CONTROL = 'FILL_RATE_BASED_CONTROL' + DEMAND_DRIVEN_BASED_CONTROL = 'DEMAND_DRIVEN_BASED_CONTROL' + NOT_CONTROLABLE = 'NOT_CONTROLABLE' + NO_SELECTION = 'NO_SELECTION' + + +class PEBCPowerEnvelopeLimitType(Enum): + UPPER_LIMIT = 'UPPER_LIMIT' + LOWER_LIMIT = 'LOWER_LIMIT' + + +class PEBCPowerEnvelopeConsequenceType(Enum): + VANISH = 'VANISH' + DEFER = 'DEFER' + + +class PPBCPowerSequenceStatus(Enum): + NOT_SCHEDULED = 'NOT_SCHEDULED' + SCHEDULED = 'SCHEDULED' + EXECUTING = 'EXECUTING' + INTERRUPTED = 'INTERRUPTED' + FINISHED = 'FINISHED' + ABORTED = 'ABORTED' + + +class OMBCTimerStatus(BaseModel): class Config: extra = Extra.forbid - commodity_quantity: CommodityQuantity = Field( - ..., description="The power quantity the values refer to" + message_type: str = Field('OMBC.TimerStatus', const=True) + message_id: ID + timer_id: ID = Field(..., description='The ID of the timer this message refers to') + finished_at: datetime = Field( + ..., + description='Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past.', ) - end_of_range: float = Field( - ..., description="Power value that defines the end of the range." + + +class FRBCTimerStatus(BaseModel): + class Config: + extra = Extra.forbid + + message_type: str = Field('FRBC.TimerStatus', const=True) + message_id: ID + timer_id: ID = Field(..., description='The ID of the timer this message refers to') + actuator_id: ID = Field( + ..., description='The ID of the actuator the timer belongs to' ) - start_of_range: float = Field( - ..., description="Power value that defines the start of the range." + finished_at: datetime = Field( + ..., + description='Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past.', ) -class PowerValue(BaseModel): +class DDBCTimerStatus(BaseModel): class Config: extra = Extra.forbid - commodity_quantity: CommodityQuantity = Field( - ..., description="The power quantity the value refers to" + message_type: str = Field('DDBC.TimerStatus', const=True) + message_id: ID + timer_id: ID = Field(..., description='The ID of the timer this message refers to') + actuator_id: ID = Field( + ..., description='The ID of the actuator the timer belongs to' ) - value: float = Field( + finished_at: datetime = Field( ..., - description="Power value expressed in the unit associated with the CommodityQuantity", + description='Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past.', ) -class ReceptionStatusValues(Enum): - INVALID_DATA = "INVALID_DATA" - INVALID_MESSAGE = "INVALID_MESSAGE" - INVALID_CONTENT = "INVALID_CONTENT" - TEMPORARY_ERROR = "TEMPORARY_ERROR" - PERMANENT_ERROR = "PERMANENT_ERROR" - OK = "OK" +class SelectControlType(BaseModel): + class Config: + extra = Extra.forbid + + message_type: str = Field('SelectControlType', const=True) + message_id: ID + control_type: ControlType = Field( + ..., + description='The ControlType to activate. Must be one of the available ControlTypes as defined in the ResourceManagerDetails', + ) -class RevokableObjects(Enum): - PEBC_PowerConstraints = "PEBC.PowerConstraints" - PEBC_EnergyConstraint = "PEBC.EnergyConstraint" - PEBC_Instruction = "PEBC.Instruction" - PPBC_PowerProfileDefinition = "PPBC.PowerProfileDefinition" - PPBC_ScheduleInstruction = "PPBC.ScheduleInstruction" - PPBC_StartInterruptionInstruction = "PPBC.StartInterruptionInstruction" - PPBC_EndInterruptionInstruction = "PPBC.EndInterruptionInstruction" - OMBC_SystemDescription = "OMBC.SystemDescription" - OMBC_Instruction = "OMBC.Instruction" - FRBC_SystemDescription = "FRBC.SystemDescription" - FRBC_Instruction = "FRBC.Instruction" - DDBC_SystemDescription = "DDBC.SystemDescription" - DDBC_Instruction = "DDBC.Instruction" +class SessionRequest(BaseModel): + class Config: + extra = Extra.forbid + + message_type: str = Field('SessionRequest', const=True) + message_id: ID + request: SessionRequestType = Field(..., description='The type of request') + diagnostic_label: Optional[str] = Field( + None, + description='Optional field for a human readible descirption for debugging purposes', + ) class RevokeObject(BaseModel): class Config: extra = Extra.forbid - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("RevokeObject", const=True) - object_id: ID = Field(..., description="The ID of object that needs to be revoked") + message_type: str = Field('RevokeObject', const=True) + message_id: ID object_type: RevokableObjects = Field( - ..., description="The type of object that needs to be revoked" + ..., description='The type of object that needs to be revoked' ) + object_id: ID = Field(..., description='The ID of object that needs to be revoked') -class RoleType(Enum): - ENERGY_PRODUCER = "ENERGY_PRODUCER" - ENERGY_CONSUMER = "ENERGY_CONSUMER" - ENERGY_STORAGE = "ENERGY_STORAGE" - - -class SelectControlType(BaseModel): +class Handshake(BaseModel): class Config: extra = Extra.forbid - control_type: ControlType = Field( - ..., - description="The ControlType to activate. Must be one of the available ControlTypes as defined in the ResourceManagerDetails", + message_type: str = Field('Handshake', const=True) + message_id: ID + role: EnergyManagementRole = Field( + ..., description='The role of the sender of this message' + ) + supported_protocol_versions: Optional[List[str]] = Field( + None, + description='Protocol versions supported by the sender of this message. This field is mandatory for the RM, but optional for the CEM.', + min_items=1, ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("SelectControlType", const=True) -class SessionRequestType(Enum): - RECONNECT = "RECONNECT" - TERMINATE = "TERMINATE" +class HandshakeResponse(BaseModel): + class Config: + extra = Extra.forbid + message_type: str = Field('HandshakeResponse', const=True) + message_id: ID + selected_protocol_version: str = Field( + ..., description='The protocol version the CEM selected for this session' + ) -class Timer(BaseModel): + +class ReceptionStatus(BaseModel): class Config: extra = Extra.forbid + message_type: str = Field('ReceptionStatus', const=True) + subject_message_id: ID = Field( + ..., description='The message this ReceptionStatus refers to' + ) + status: ReceptionStatusValues = Field( + ..., description='Enumeration of status values' + ) diagnostic_label: Optional[str] = Field( None, - description="Human readable name/description of the Timer. This element is only intended for diagnostic purposes and not for HMI applications.", + description='Diagnostic label that can be used to provide additional information for debugging. However, not for HMI purposes.', ) - duration: Duration = Field( - ..., - description="The time it takes for the Timer to finish after it has been started", + + +class InstructionStatusUpdate(BaseModel): + class Config: + extra = Extra.forbid + + message_type: str = Field('InstructionStatusUpdate', const=True) + message_id: ID + instruction_id: ID = Field( + ..., description='ID of this instruction (as provided by the CEM) ' ) - id: ID = Field( - ..., - description="ID of the Timer. Must be unique in the scope of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in which it is used.", + status_type: InstructionStatus = Field( + ..., description='Present status of this instruction.' + ) + timestamp: datetime = Field( + ..., description='Timestamp when status_type has changed the last time.' ) -class Transition(BaseModel): +class PEBCEnergyConstraint(BaseModel): class Config: extra = Extra.forbid - abnormal_condition_only: bool = Field( + message_type: str = Field('PEBC.EnergyConstraint', const=True) + message_id: ID + id: ID = Field( ..., - description="Indicates if this Transition may only be used during an abnormal condition (see Clause )", + description='Identifier of this PEBC.EnergyConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - blocking_timers: List[ID] = Field( + valid_from: datetime = Field( ..., - description="List of IDs of Timers that block this Transition from initiating while at least one of these Timers is not yet finished", - max_items=1000, - min_items=0, + description='Moment this PEBC.EnergyConstraints information starts to be valid', ) - from_: ID = Field( + valid_until: datetime = Field( ..., - alias="from", - description="ID of the OperationMode (exact type differs per ControlType) that should be switched from.", + description='Moment until this PEBC.EnergyConstraints information is valid.', ) - id: ID = Field( + upper_average_power: float = Field( ..., - description="ID of the Transition. Must be unique in the scope of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in which it is used.", + description='Upper average power within the time period given by valid_from and valid_until. If the duration is multiplied with this power value, then the associated upper energy content can be derived. This is the highest amount of energy the resource will consume during that period of time. The Power Envelope created by the CEM must allow at least this much energy consumption (in case the number is positive). Must be greater than or equal to lower_average_power, and can be negative in case of energy production.', ) - start_timers: List[ID] = Field( + lower_average_power: float = Field( ..., - description="List of IDs of Timers that will be (re)started when this transition is initiated", - max_items=1000, - min_items=0, + description='Lower average power within the time period given by valid_from and valid_until. If the duration is multiplied with this power value, then the associated lower energy content can be derived. This is the lowest amount of energy the resource will consume during that period of time. The Power Envelope created by the CEM must allow at least this much energy production (in case the number is negative). Must be greater than or equal to lower_average_power, and can be negative in case of energy production.', ) - to: ID = Field( + commodity_quantity: CommodityQuantity = Field( ..., - description="ID of the OperationMode (exact type differs per ControlType) that will be switched to.", - ) - transition_costs: Optional[float] = Field( - None, - description="Absolute costs for going through this Transition in the currency as described in the ResourceManagerDetails.", - ) - transition_duration: Optional[Duration] = Field( - None, - description="Indicates the time between the initiation of this Transition, and the time at which the device behaves according to the Operation Mode which is defined in the ‘to’ data element. When no value is provided it is assumed the transition duration is negligible.", + description='Type of power quantity which applies to upper_average_power and lower_average_power', ) -class DDBCActuatorStatus(BaseModel): +class PPBCScheduleInstruction(BaseModel): class Config: extra = Extra.forbid - active_operation_mode_id: ID = Field( + message_type: str = Field('PPBC.ScheduleInstruction', const=True) + message_id: ID + id: ID = Field( ..., - description="The operation mode that is presently active for this actuator.", + description='ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - actuator_id: ID = Field( - ..., description="ID of the actuator this messages refers to" + power_profile_id: ID = Field( + ..., + description='ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence is being selected and scheduled by the CEM.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("DDBC.ActuatorStatus", const=True) - operation_mode_factor: float = Field( + sequence_container_id: ID = Field( ..., - description="The number indicates the factor with which the DDBC.OperationMode is configured. The factor should be greater than or equal to 0 and less or equal to 1.", + description='ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence is being selected and scheduled by the CEM.', ) - previous_operation_mode_id: Optional[ID] = Field( - None, - description="ID of the DDBC,OperationMode that was active before the present one. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of.", + power_sequence_id: ID = Field( + ..., + description='ID of the PPBC.PowerSequence that is being selected and scheduled by the CEM.', ) - transition_timestamp: Optional[datetime] = Field( - None, - description="Time at which the transition from the previous DDBC.OperationMode to the active DDBC.OperationMode was initiated. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of.", + execution_time: datetime = Field( + ..., + description='Indicates the moment the PPBC.PowerSequence shall start. When the specified execution time is in the past, execution must start as soon as possible.', + ) + abnormal_condition: bool = Field( + ..., + description='Indicates if this is an instruction during an abnormal condition', ) -class DDBCAverageDemandRateForecastElement(BaseModel): +class PPBCStartInterruptionInstruction(BaseModel): class Config: extra = Extra.forbid - demand_rate_expected: float = Field( + message_type: str = Field('PPBC.StartInterruptionInstruction', const=True) + message_id: ID + id: ID = Field( ..., - description="The most likely value for the demand rate; the expected increase or decrease of the fill_level per second", + description='ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - demand_rate_lower_68PPR: Optional[float] = Field( - None, - description="The lower limit of the range with a 68\xa0% probability that the demand rate is within that range", - ) - demand_rate_lower_95PPR: Optional[float] = Field( - None, - description="The lower limit of the range with a 95\xa0% probability that the demand rate is within that range", + power_profile_id: ID = Field( + ..., + description='ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence is being interrupted by the CEM.', ) - demand_rate_lower_limit: Optional[float] = Field( - None, - description="The lower limit of the range with a 100\xa0% probability that the demand rate is within that range", + sequence_container_id: ID = Field( + ..., + description='ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence is being interrupted by the CEM.', ) - demand_rate_upper_68PPR: Optional[float] = Field( - None, - description="The upper limit of the range with a 68\xa0% probability that the demand rate is within that range", + power_sequence_id: ID = Field( + ..., description='ID of the PPBC.PowerSequence that the CEM wants to interrupt.' ) - demand_rate_upper_95PPR: Optional[float] = Field( - None, - description="The upper limit of the range with a 95\xa0% probability that the demand rate is within that range", + execution_time: datetime = Field( + ..., + description='Indicates the moment the PPBC.PowerSequence shall be interrupted. When the specified execution time is in the past, execution must start as soon as possible.', ) - demand_rate_upper_limit: Optional[float] = Field( - None, - description="The upper limit of the range with a 100\xa0% probability that the demand rate is within that range", + abnormal_condition: bool = Field( + ..., + description='Indicates if this is an instruction during an abnormal condition', ) - duration: Duration = Field(..., description="Duration of the element") -class DDBCInstruction(BaseModel): +class PPBCEndInterruptionInstruction(BaseModel): class Config: extra = Extra.forbid - abnormal_condition: bool = Field( + message_type: str = Field('PPBC.EndInterruptionInstruction', const=True) + message_id: ID + id: ID = Field( ..., - description="Indicates if this is an instruction during an abnormal condition", + description='ID of the Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - actuator_id: ID = Field( - ..., description="ID of the actuator this Instruction belongs to." + power_profile_id: ID = Field( + ..., + description='ID of the PPBC.PowerProfileDefinition of which the PPBC.PowerSequence interruption is being ended by the CEM.', ) - execution_time: datetime = Field( + sequence_container_id: ID = Field( ..., - description="Indicates the moment the execution of the instruction shall start", + description='ID of the PPBC.PowerSequnceContainer of which the PPBC.PowerSequence interruption is being ended by the CEM.', ) - id: ID = Field( + power_sequence_id: ID = Field( ..., - description="Identifier of this DDBC.Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + description='ID of the PPBC.PowerSequence for which the CEM wants to end the interruption.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("DDBC.Instruction", const=True) - operation_mode_factor: float = Field( + execution_time: datetime = Field( ..., - description="The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1.", + description='Indicates the moment PPBC.PowerSequence interruption shall end. When the specified execution time is in the past, execution must start as soon as possible.', + ) + abnormal_condition: bool = Field( + ..., + description='Indicates if this is an instruction during an abnormal condition', ) - operation_mode_id: ID = Field(..., description="ID of the DDBC.OperationMode") -class DDBCOperationMode(BaseModel): +class OMBCStatus(BaseModel): class Config: extra = Extra.forbid - Id: ID = Field( - ..., - description="ID of this operation mode. Must be unique in the scope of the DDBC.ActuatorDescription in which it is used.", + message_type: str = Field('OMBC.Status', const=True) + message_id: ID + active_operation_mode_id: ID = Field( + ..., description='ID of the active OMBC.OperationMode.' ) - abnormal_condition_only: bool = Field( + operation_mode_factor: float = Field( ..., - description="Indicates if this DDBC.OperationMode may only be used during an abnormal condition.", + description='The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1.', ) - diagnostic_label: Optional[str] = Field( + previous_operation_mode_id: Optional[ID] = Field( None, - description="Human readable name/description of the DDBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications.", + description='ID of the OMBC.OperationMode that was previously active. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of.', ) - power_ranges: List[PowerRange] = Field( - ..., - description="The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity.", - max_items=10, - min_items=1, - ) - running_costs: Optional[NumberRange] = Field( + transition_timestamp: Optional[datetime] = Field( None, - description="Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor.", - ) - supply_range: NumberRange = Field( - ..., - description="The supply rate this DDBC.OperationMode can deliver for the CEM to match the demand rate. The start of the NumberRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1.", + description='Time at which the transition from the previous OMBC.OperationMode to the active OMBC.OperationMode was initiated. This value shall always be provided, unless the active OMBC.OperationMode is the first OMBC.OperationMode the Resource Manager is aware of.', ) -class DDBCTimerStatus(BaseModel): +class OMBCInstruction(BaseModel): class Config: extra = Extra.forbid - actuator_id: ID = Field( - ..., description="The ID of the actuator the timer belongs to" + message_type: str = Field('OMBC.Instruction', const=True) + message_id: ID + id: ID = Field( + ..., + description='ID of the instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - finished_at: datetime = Field( + execution_time: datetime = Field( + ..., + description='Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.', + ) + operation_mode_id: ID = Field( + ..., description='ID of the OMBC.OperationMode that should be activated' + ) + operation_mode_factor: float = Field( ..., - description="Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past.", + description='The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1.', + ) + abnormal_condition: bool = Field( + ..., + description='Indicates if this is an instruction during an abnormal condition', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("DDBC.TimerStatus", const=True) - timer_id: ID = Field(..., description="The ID of the timer this message refers to") class FRBCActuatorStatus(BaseModel): class Config: extra = Extra.forbid - active_operation_mode_id: ID = Field( - ..., description="ID of the FRBC.OperationMode that is presently active." - ) + message_type: str = Field('FRBC.ActuatorStatus', const=True) + message_id: ID actuator_id: ID = Field( - ..., description="ID of the actuator this messages refers to" + ..., description='ID of the actuator this messages refers to' + ) + active_operation_mode_id: ID = Field( + ..., description='ID of the FRBC.OperationMode that is presently active.' ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("FRBC.ActuatorStatus", const=True) operation_mode_factor: float = Field( ..., - description="The number indicates the factor with which the FRBC.OperationMode is configured. The factor should be greater than or equal than 0 and less or equal to 1.", + description='The number indicates the factor with which the FRBC.OperationMode is configured. The factor should be greater than or equal than 0 and less or equal to 1.', ) previous_operation_mode_id: Optional[ID] = Field( None, - description="ID of the FRBC.OperationMode that was active before the present one. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of.", + description='ID of the FRBC.OperationMode that was active before the present one. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of.', ) transition_timestamp: Optional[datetime] = Field( None, - description="Time at which the transition from the previous FRBC.OperationMode to the active FRBC.OperationMode was initiated. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of.", + description='Time at which the transition from the previous FRBC.OperationMode to the active FRBC.OperationMode was initiated. This value shall always be provided, unless the active FRBC.OperationMode is the first FRBC.OperationMode the Resource Manager is aware of.', ) -class FRBCFillLevelTargetProfileElement(BaseModel): +class FRBCStorageStatus(BaseModel): class Config: extra = Extra.forbid - duration: Duration = Field(..., description="The duration of the element.") - fill_level_range: NumberRange = Field( + message_type: str = Field('FRBC.StorageStatus', const=True) + message_id: ID + present_fill_level: float = Field( + ..., description='Present fill level of the Storage' + ) + + +class FRBCLeakageBehaviour(BaseModel): + class Config: + extra = Extra.forbid + + message_type: str = Field('FRBC.LeakageBehaviour', const=True) + message_id: ID + valid_from: datetime = Field( ..., - description="The target range in which the fill_level must be for the time period during which the element is active. The start of the range must be smaller or equal to the end of the range. The CEM must take best-effort actions to proactively achieve this target.", + description='Moment this FRBC.LeakageBehaviour starts to be valid. If the FRBC.LeakageBehaviour is immediately valid, the DateTimeStamp should be now or in the past.', + ) + elements: List[FRBCLeakageBehaviourElement] = Field( + ..., + description='List of elements that model the leakage behaviour of the buffer. The fill_level_ranges of the elements must be contiguous.', + max_items=288, + min_items=1, ) @@ -817,318 +816,258 @@ class FRBCInstruction(BaseModel): class Config: extra = Extra.forbid - abnormal_condition: bool = Field( + message_type: str = Field('FRBC.Instruction', const=True) + message_id: ID + id: ID = Field( ..., - description="Indicates if this is an instruction during an abnormal condition.", + description='ID of the instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) actuator_id: ID = Field( - ..., description="ID of the actuator this instruction belongs to." + ..., description='ID of the actuator this instruction belongs to.' ) - execution_time: datetime = Field( - ..., description="Time when instruction should be executed." + operation_mode: ID = Field( + ..., description='ID of the FRBC.OperationMode that should be activated.' ) - id: ID = Field( + operation_mode_factor: float = Field( ..., - description="ID of the instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + description='The number indicates the factor with which the FRBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("FRBC.Instruction", const=True) - operation_mode: ID = Field( - ..., description="ID of the FRBC.OperationMode that should be activated." + execution_time: datetime = Field( + ..., + description='Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.', ) - operation_mode_factor: float = Field( + abnormal_condition: bool = Field( ..., - description="The number indicates the factor with which the FRBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1.", + description='Indicates if this is an instruction during an abnormal condition.', ) -class FRBCLeakageBehaviourElement(BaseModel): +class FRBCUsageForecast(BaseModel): class Config: extra = Extra.forbid - fill_level_range: NumberRange = Field( - ..., - description="The fill level range for which this FRBC.LeakageBehaviourElement applies. The start of the range must be less than the end of the range.", + message_type: str = Field('FRBC.UsageForecast', const=True) + message_id: ID + start_time: datetime = Field( + ..., description='Time at which the FRBC.UsageForecast starts.' ) - leakage_rate: float = Field( + elements: List[FRBCUsageForecastElement] = Field( ..., - description="Indicates how fast the momentary fill level will decrease per second due to leakage within the given range of the fill level.", + description='Further elements that model the profile. There shall be at least one element. Elements must be placed in chronological order.', + max_items=288, + min_items=1, ) -class FRBCOperationModeElement(BaseModel): +class FRBCFillLevelTargetProfile(BaseModel): class Config: extra = Extra.forbid - fill_level_range: NumberRange = Field( - ..., - description="The range of the fill level for which this FRBC.OperationModeElement applies. The start of the NumberRange shall be smaller than the end of the NumberRange.", - ) - fill_rate: NumberRange = Field( - ..., - description="Indicates the change in fill_level per second. The lower_boundary of the NumberRange is associated with an operation_mode_factor of 0, the upper_boundary is associated with an operation_mode_factor of 1. ", + message_type: str = Field('FRBC.FillLevelTargetProfile', const=True) + message_id: ID + start_time: datetime = Field( + ..., description='Time at which the FRBC.FillLevelTargetProfile starts.' ) - power_ranges: List[PowerRange] = Field( + elements: List[FRBCFillLevelTargetProfileElement] = Field( ..., - description="The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity.", - max_items=10, + description='List of different fill levels that have to be targeted within a given duration. There shall be at least one element. Elements must be placed in chronological order.', + max_items=288, min_items=1, ) - running_costs: Optional[NumberRange] = Field( - None, - description="Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor.", - ) -class FRBCStorageDescription(BaseModel): +class DDBCActuatorStatus(BaseModel): class Config: extra = Extra.forbid - diagnostic_label: Optional[str] = Field( - None, - description="Human readable name/description of the storage (e.g. hot water buffer or battery). This element is only intended for diagnostic purposes and not for HMI applications.", - ) - fill_level_label: Optional[str] = Field( - None, - description="Human readable description of the (physical) units associated with the fill_level (e.g. degrees Celsius or percentage state of charge). This element is only intended for diagnostic purposes and not for HMI applications.", + message_type: str = Field('DDBC.ActuatorStatus', const=True) + message_id: ID + actuator_id: ID = Field( + ..., description='ID of the actuator this messages refers to' ) - fill_level_range: NumberRange = Field( + active_operation_mode_id: ID = Field( ..., - description="The range in which the fill_level should remain. It is expected of the CEM to keep the fill_level within this range. When the fill_level is not within this range, the Resource Manager can ignore instructions from the CEM (except during abnormal conditions). ", + description='The operation mode that is presently active for this actuator.', ) - provides_fill_level_target_profile: bool = Field( + operation_mode_factor: float = Field( ..., - description="Indicates whether the Storage could provide a target profile for the fill level through the FRBC.FillLevelTargetProfile.", + description='The number indicates the factor with which the DDBC.OperationMode is configured. The factor should be greater than or equal to 0 and less or equal to 1.', ) - provides_leakage_behaviour: bool = Field( - ..., - description="Indicates whether the Storage could provide details of power leakage behaviour through the FRBC.LeakageBehaviour.", + previous_operation_mode_id: Optional[ID] = Field( + None, + description='ID of the DDBC,OperationMode that was active before the present one. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of.', ) - provides_usage_forecast: bool = Field( - ..., - description="Indicates whether the Storage could provide a UsageForecast through the FRBC.UsageForecast.", + transition_timestamp: Optional[datetime] = Field( + None, + description='Time at which the transition from the previous DDBC.OperationMode to the active DDBC.OperationMode was initiated. This value shall always be provided, unless the active DDBC.OperationMode is the first DDBC.OperationMode the Resource Manager is aware of.', ) -class FRBCStorageStatus(BaseModel): +class DDBCInstruction(BaseModel): class Config: extra = Extra.forbid - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("FRBC.StorageStatus", const=True) - present_fill_level: float = Field( - ..., description="Present fill level of the Storage" + message_type: str = Field('DDBC.Instruction', const=True) + message_id: ID + id: ID = Field( + ..., + description='Identifier of this DDBC.Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', + ) + execution_time: datetime = Field( + ..., + description='Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.', + ) + abnormal_condition: bool = Field( + ..., + description='Indicates if this is an instruction during an abnormal condition', ) - - -class FRBCTimerStatus(BaseModel): - class Config: - extra = Extra.forbid - actuator_id: ID = Field( - ..., description="The ID of the actuator the timer belongs to" + ..., description='ID of the actuator this Instruction belongs to.' ) - finished_at: datetime = Field( + operation_mode_id: ID = Field(..., description='ID of the DDBC.OperationMode') + operation_mode_factor: float = Field( ..., - description="Indicates when the Timer will be finished. If the DateTimeStamp is in the future, the timer is not yet finished. If the DateTimeStamp is in the past, the timer is finished. If the timer was never started, the value can be an arbitrary DateTimeStamp in the past.", + description='The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal to 0 and less or equal to 1.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("FRBC.TimerStatus", const=True) - timer_id: ID = Field(..., description="The ID of the timer this message refers to") -class FRBCUsageForecast(BaseModel): +class DDBCAverageDemandRateForecast(BaseModel): class Config: extra = Extra.forbid - elements: List[FRBCUsageForecastElement] = Field( + message_type: str = Field('DDBC.AverageDemandRateForecast', const=True) + message_id: ID + start_time: datetime = Field(..., description='Start time of the profile.') + elements: List[DDBCAverageDemandRateForecastElement] = Field( ..., - description="Further elements that model the profile. There shall be at least one element. Elements must be placed in chronological order.", + description='Elements of the profile. Elements must be placed in chronological order.', max_items=288, min_items=1, ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("FRBC.UsageForecast", const=True) - start_time: datetime = Field( - ..., description="Time at which the FRBC.UsageForecast starts." - ) -class Handshake(BaseModel): +class PowerValue(BaseModel): class Config: extra = Extra.forbid - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("Handshake", const=True) - role: EnergyManagementRole = Field( - ..., description="The role of the sender of this message" + commodity_quantity: CommodityQuantity = Field( + ..., description='The power quantity the value refers to' ) - supported_protocol_versions: Optional[List[str]] = Field( - None, - description="Protocol versions supported by the sender of this message. This field is mandatory for the RM, but optional for the CEM.", - min_items=1, + value: float = Field( + ..., + description='Power value expressed in the unit associated with the CommodityQuantity', ) -class HandshakeResponse(BaseModel): +class PowerForecastValue(BaseModel): class Config: extra = Extra.forbid - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("HandshakeResponse", const=True) - selected_protocol_version: str = Field( - ..., description="The protocol version the CEM selected for this session" + value_upper_limit: Optional[float] = Field( + None, + description='The upper boundary of the range with 100 % certainty the power value is in it', ) - - -class OMBCOperationMode(BaseModel): - class Config: - extra = Extra.forbid - - abnormal_condition_only: bool = Field( - ..., - description="Indicates if this OMBC.OperationMode may only be used during an abnormal condition.", + value_upper_95PPR: Optional[float] = Field( + None, + description='The upper boundary of the range with 95 % certainty the power value is in it', ) - diagnostic_label: Optional[str] = Field( + value_upper_68PPR: Optional[float] = Field( None, - description="Human readable name/description of the OMBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications.", + description='The upper boundary of the range with 68 % certainty the power value is in it', ) - id: ID = Field( - ..., - description="ID of the OBMC.OperationMode. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + value_expected: float = Field(..., description='The expected power value.') + value_lower_68PPR: Optional[float] = Field( + None, + description='The lower boundary of the range with 68 % certainty the power value is in it', ) - power_ranges: List[PowerRange] = Field( - ..., - description="The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity.", - max_items=10, - min_items=1, + value_lower_95PPR: Optional[float] = Field( + None, + description='The lower boundary of the range with 95 % certainty the power value is in it', ) - running_costs: Optional[NumberRange] = Field( + value_lower_limit: Optional[float] = Field( None, - description="Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails , excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor.", + description='The lower boundary of the range with 100 % certainty the power value is in it', + ) + commodity_quantity: CommodityQuantity = Field( + ..., description='The power quantity the value refers to' ) -class OMBCSystemDescription(BaseModel): +class PowerRange(BaseModel): class Config: extra = Extra.forbid - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("OMBC.SystemDescription", const=True) - operation_modes: List[OMBCOperationMode] = Field( - ..., - description="OMBC.OperationModes available for the CEM in order to coordinate the device behaviour.", - max_items=100, - min_items=1, - ) - timers: List[Timer] = Field( - ..., - description="Timers that control when certain transitions can be made.", - max_items=1000, - min_items=0, + start_of_range: float = Field( + ..., description='Power value that defines the start of the range.' ) - transitions: List[Transition] = Field( - ..., - description="Possible transitions to switch from one OMBC.OperationMode to another.", - max_items=1000, - min_items=0, + end_of_range: float = Field( + ..., description='Power value that defines the end of the range.' ) - valid_from: datetime = Field( - ..., - description="Moment this OMBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past.", + commodity_quantity: CommodityQuantity = Field( + ..., description='The power quantity the values refer to' ) -class PEBCAllowedLimitRange(BaseModel): +class Role(BaseModel): class Config: extra = Extra.forbid - abnormal_condition_only: bool = Field( - ..., - description="Indicates if this PEBC.AllowedLimitRange may only be used during an abnormal condition", - ) - commodity_quantity: CommodityQuantity = Field( - ..., description="Type of power quantity this PEBC.AllowedLimitRange applies to" - ) - limit_type: PEBCPowerEnvelopeLimitType = Field( - ..., - description="Indicates if this ranges applies to the upper limit or the lower limit", - ) - range_boundary: NumberRange = Field( - ..., - description="Boundaries of the power range of this PEBC.AllowedLimitRange. The CEM is allowed to choose values within this range for the power envelope for the limit as described in limit_type. The start of the range shall be smaller or equal than the end of the range. ", + role: RoleType = Field( + ..., description='Role type of the Resource Manager for the given commodity' ) + commodity: Commodity = Field(..., description='Commodity the role refers to.') -class PEBCPowerConstraints(BaseModel): +class PowerForecastElement(BaseModel): class Config: extra = Extra.forbid - allowed_limit_ranges: List[PEBCAllowedLimitRange] = Field( - ..., - description="The actual constraints. There shall be at least one PEBC.AllowedLimitRange for the UPPER_LIMIT and at least one AllowedLimitRange for the LOWER_LIMIT. It is allowed to have multiple PEBC.AllowedLimitRange objects with identical CommodityQuantities and LimitTypes.", - max_items=100, - min_items=2, - ) - consequence_type: PEBCPowerEnvelopeConsequenceType = Field( - ..., description="Type of consequence of limiting power" - ) - id: ID = Field( + duration: Duration = Field(..., description='Duration of the PowerForecastElement') + power_values: List[PowerForecastValue] = Field( ..., - description="Identifier of this PEBC.PowerConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", - ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PEBC.PowerConstraints", const=True) - valid_from: datetime = Field( - ..., description="Moment this PEBC.PowerConstraints start to be valid" - ) - valid_until: Optional[datetime] = Field( - None, - description="Moment until this PEBC.PowerConstraints is valid. If valid_until is not present, there is no determined end time of this PEBC.PowerConstraints.", + description='The values of power that are expected for the given period of time. There shall be at least one PowerForecastValue, and at most one PowerForecastValue per CommodityQuantity.', + max_items=10, + min_items=1, ) -class PEBCPowerEnvelope(BaseModel): +class PEBCAllowedLimitRange(BaseModel): class Config: extra = Extra.forbid commodity_quantity: CommodityQuantity = Field( - ..., description="Type of power quantity this PEBC.PowerEnvelope applies to" + ..., description='Type of power quantity this PEBC.AllowedLimitRange applies to' ) - id: ID = Field( + limit_type: PEBCPowerEnvelopeLimitType = Field( ..., - description="Identifier of this PEBC.PowerEnvelope. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + description='Indicates if this ranges applies to the upper limit or the lower limit', ) - power_envelope_elements: List[PEBCPowerEnvelopeElement] = Field( + range_boundary: NumberRange = Field( ..., - description="The elements of this PEBC.PowerEnvelope. Shall contain at least one element. Elements must be placed in chronological order.", - max_items=288, - min_items=1, + description='Boundaries of the power range of this PEBC.AllowedLimitRange. The CEM is allowed to choose values within this range for the power envelope for the limit as described in limit_type. The start of the range shall be smaller or equal than the end of the range. ', + ) + abnormal_condition_only: bool = Field( + ..., + description='Indicates if this PEBC.AllowedLimitRange may only be used during an abnormal condition', ) -class PPBCPowerSequenceContainerStatus(BaseModel): +class PEBCPowerEnvelope(BaseModel): class Config: extra = Extra.forbid - power_profile_id: ID = Field( + id: ID = Field( ..., - description="ID of the PPBC.PowerProfileDefinition of which the data element ‘sequence_container_id’ refers to. ", - ) - progress: Optional[Duration] = Field( - None, - description="Time that has passed since the selected sequence has started. A value must be provided, unless no sequence has been selected or the selected sequence hasn’t started yet.", + description='Identifier of this PEBC.PowerEnvelope. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - selected_sequence_id: Optional[ID] = Field( - None, - description="ID of selected PPBC.PowerSequence. When no ID is given, no sequence was selected yet.", + commodity_quantity: CommodityQuantity = Field( + ..., description='Type of power quantity this PEBC.PowerEnvelope applies to' ) - sequence_container_id: ID = Field( + power_envelope_elements: List[PEBCPowerEnvelopeElement] = Field( ..., - description="ID of the PPBC.PowerSequenceContainer this PPBC.PowerSequenceContainerStatus provides information about.", - ) - status: PPBCPowerSequenceStatus = Field( - ..., description="Status of the selected PPBC.PowerSequence" + description='The elements of this PEBC.PowerEnvelope. Shall contain at least one element. Elements must be placed in chronological order.', + max_items=288, + min_items=1, ) @@ -1137,220 +1076,239 @@ class Config: extra = Extra.forbid duration: Duration = Field( - ..., description="Duration of the PPBC.PowerSequenceElement." + ..., description='Duration of the PPBC.PowerSequenceElement.' ) power_values: List[PowerForecastValue] = Field( ..., - description="The value of power and deviations for the given duration. The array should contain at least one PowerForecastValue and at most one PowerForecastValue per CommodityQuantity.", + description='The value of power and deviations for the given duration. The array should contain at least one PowerForecastValue and at most one PowerForecastValue per CommodityQuantity.', max_items=10, min_items=1, ) -class PowerForecastElement(BaseModel): +class PPBCPowerSequenceContainerStatus(BaseModel): class Config: extra = Extra.forbid - duration: Duration = Field(..., description="Duration of the PowerForecastElement") - power_values: List[PowerForecastValue] = Field( + power_profile_id: ID = Field( ..., - description="The values of power that are expected for the given period of time. There shall be at least one PowerForecastValue, and at most one PowerForecastValue per CommodityQuantity.", - max_items=10, - min_items=1, + description='ID of the PPBC.PowerProfileDefinition of which the data element ‘sequence_container_id’ refers to. ', + ) + sequence_container_id: ID = Field( + ..., + description='ID of the PPBC.PowerSequenceContainer this PPBC.PowerSequenceContainerStatus provides information about.', + ) + selected_sequence_id: Optional[ID] = Field( + None, + description='ID of selected PPBC.PowerSequence. When no ID is given, no sequence was selected yet.', + ) + progress: Optional[Duration] = Field( + None, + description='Time that has passed since the selected sequence has started. A value must be provided, unless no sequence has been selected or the selected sequence hasn’t started yet.', + ) + status: PPBCPowerSequenceStatus = Field( + ..., description='Status of the selected PPBC.PowerSequence' ) -class PowerMeasurement(BaseModel): +class OMBCOperationMode(BaseModel): class Config: extra = Extra.forbid - measurement_timestamp: datetime = Field( - ..., description="Timestamp when PowerValues were measured." + id: ID = Field( + ..., + description='ID of the OBMC.OperationMode. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PowerMeasurement", const=True) - values: List[PowerValue] = Field( + diagnostic_label: Optional[str] = Field( + None, + description='Human readable name/description of the OMBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications.', + ) + power_ranges: List[PowerRange] = Field( ..., - description="Array of measured PowerValues. Must contain at least one item and at most one item per ‘commodity_quantity’ (defined inside the PowerValue).", + description='The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity.', max_items=10, min_items=1, ) - - -class ReceptionStatus(BaseModel): - class Config: - extra = Extra.forbid - - diagnostic_label: Optional[str] = Field( + running_costs: Optional[NumberRange] = Field( None, - description="Diagnostic label that can be used to provide additional information for debugging. However, not for HMI purposes.", - ) - message_type: str = Field("ReceptionStatus", const=True) - status: ReceptionStatusValues = Field( - ..., description="Enumeration of status values" + description='Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails , excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor.', ) - subject_message_id: ID = Field( - ..., description="The message this ReceptionStatus refers to" + abnormal_condition_only: bool = Field( + ..., + description='Indicates if this OMBC.OperationMode may only be used during an abnormal condition.', ) -class Role(BaseModel): +class FRBCOperationModeElement(BaseModel): class Config: extra = Extra.forbid - commodity: Commodity = Field(..., description="Commodity the role refers to.") - role: RoleType = Field( - ..., description="Role type of the Resource Manager for the given commodity" + fill_level_range: NumberRange = Field( + ..., + description='The range of the fill level for which this FRBC.OperationModeElement applies. The start of the NumberRange shall be smaller than the end of the NumberRange.', + ) + fill_rate: NumberRange = Field( + ..., + description='Indicates the change in fill_level per second. The lower_boundary of the NumberRange is associated with an operation_mode_factor of 0, the upper_boundary is associated with an operation_mode_factor of 1. ', + ) + power_ranges: List[PowerRange] = Field( + ..., + description='The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity.', + max_items=10, + min_items=1, ) - - -class SessionRequest(BaseModel): - class Config: - extra = Extra.forbid - - diagnostic_label: Optional[str] = Field( + running_costs: Optional[NumberRange] = Field( None, - description="Optional field for a human readible descirption for debugging purposes", + description='Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("SessionRequest", const=True) - request: SessionRequestType = Field(..., description="The type of request") -class DDBCActuatorDescription(BaseModel): +class DDBCOperationMode(BaseModel): class Config: extra = Extra.forbid + Id: ID = Field( + ..., + description='ID of this operation mode. Must be unique in the scope of the DDBC.ActuatorDescription in which it is used.', + ) diagnostic_label: Optional[str] = Field( None, - description="Human readable name/description of the actuator. This element is only intended for diagnostic purposes and not for HMI applications.", - ) - id: ID = Field( - ..., - description="ID of this DDBC.ActuatorDescription. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + description='Human readable name/description of the DDBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications.', ) - operation_modes: List[DDBCOperationMode] = Field( + power_ranges: List[PowerRange] = Field( ..., - description="List of all Operation Modes that are available for this actuator. There shall be at least one DDBC.OperationMode.", - max_items=100, + description='The power produced or consumed by this operation mode. The start of each PowerRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1. In the array there must be at least one PowerRange, and at most one PowerRange per CommodityQuantity.', + max_items=10, min_items=1, ) - supported_commodites: List[Commodity] = Field( + supply_range: NumberRange = Field( ..., - description="Commodities supported by the operation modes of this actuator. There shall be at least one commodity", - max_items=4, - min_items=1, + description='The supply rate this DDBC.OperationMode can deliver for the CEM to match the demand rate. The start of the NumberRange is associated with an operation_mode_factor of 0, the end is associated with an operation_mode_factor of 1.', ) - timers: List[Timer] = Field( - ..., - description="List of Timers associated with Transitions for this Actuator. Can be empty.", - max_items=1000, - min_items=0, + running_costs: Optional[NumberRange] = Field( + None, + description='Additional costs per second (e.g. wear, services) associated with this operation mode in the currency defined by the ResourceManagerDetails, excluding the commodity cost. The range is expressing uncertainty and is not linked to the operation_mode_factor.', ) - transitions: List[Transition] = Field( + abnormal_condition_only: bool = Field( ..., - description="List of Transitions between Operation Modes. Shall contain at least one Transition.", - max_items=1000, - min_items=0, + description='Indicates if this DDBC.OperationMode may only be used during an abnormal condition.', ) -class DDBCAverageDemandRateForecast(BaseModel): +class ResourceManagerDetails(BaseModel): class Config: extra = Extra.forbid - elements: List[DDBCAverageDemandRateForecastElement] = Field( + message_type: str = Field('ResourceManagerDetails', const=True) + message_id: ID + resource_id: ID = Field( ..., - description="Elements of the profile. Elements must be placed in chronological order.", - max_items=288, + description='Identifier of the Resource Manager. Must be unique within the scope of the CEM.', + ) + name: Optional[str] = Field(None, description='Human readable name given by user') + roles: List[Role] = Field( + ..., + description='Each Resource Manager provides one or more energy Roles', + max_items=3, min_items=1, ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("DDBC.AverageDemandRateForecast", const=True) - start_time: datetime = Field(..., description="Start time of the profile.") - - -class DDBCSystemDescription(BaseModel): - class Config: - extra = Extra.forbid - - actuators: List[DDBCActuatorDescription] = Field( + manufacturer: Optional[str] = Field(None, description='Name of Manufacturer') + model: Optional[str] = Field( + None, + description='Name of the model of the device (provided by the manufacturer)', + ) + serial_number: Optional[str] = Field( + None, description='Serial number of the device (provided by the manufacturer)' + ) + firmware_version: Optional[str] = Field( + None, + description='Version identifier of the firmware used in the device (provided by the manufacturer)', + ) + instruction_processing_delay: Duration = Field( ..., - description="List of all available actuators in the system. Must contain at least one DDBC.ActuatorAggregated.", - max_items=10, + description='The average time the combination of Resource Manager and HBES/BACS/SASS or (Smart) device needs to process and execute an instruction', + ) + available_control_types: List[ControlType] = Field( + ..., + description='The control types supported by this Resource Manager.', + max_items=5, min_items=1, ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("DDBC.SystemDescription", const=True) - present_demand_rate: NumberRange = Field( - ..., description="Present demand rate that needs to be satisfied by the system" + currency: Optional[Currency] = Field( + None, + description='Currency to be used for all information regarding costs. Mandatory if cost information is published.', ) - provides_average_demand_rate_forecast: bool = Field( + provides_forecast: bool = Field( ..., - description="Indicates whether the Resource Manager could provide a demand rate forecast through the DDBC.AverageDemandRateForecast.", + description='Indicates whether the ResourceManager is able to provide PowerForecasts', ) - valid_from: datetime = Field( + provides_power_measurement_types: List[CommodityQuantity] = Field( ..., - description="Moment this DDBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past.", + description='Array of all CommodityQuantities that this Resource Manager can provide measurements for. ', + max_items=10, + min_items=1, ) -class FRBCFillLevelTargetProfile(BaseModel): +class PowerMeasurement(BaseModel): class Config: extra = Extra.forbid - elements: List[FRBCFillLevelTargetProfileElement] = Field( + message_type: str = Field('PowerMeasurement', const=True) + message_id: ID + measurement_timestamp: datetime = Field( + ..., description='Timestamp when PowerValues were measured.' + ) + values: List[PowerValue] = Field( ..., - description="List of different fill levels that have to be targeted within a given duration. There shall be at least one element. Elements must be placed in chronological order.", - max_items=288, + description='Array of measured PowerValues. Must contain at least one item and at most one item per ‘commodity_quantity’ (defined inside the PowerValue).', + max_items=10, min_items=1, ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("FRBC.FillLevelTargetProfile", const=True) - start_time: datetime = Field( - ..., description="Time at which the FRBC.FillLevelTargetProfile starts." - ) -class FRBCLeakageBehaviour(BaseModel): +class PowerForecast(BaseModel): class Config: extra = Extra.forbid - elements: List[FRBCLeakageBehaviourElement] = Field( + message_type: str = Field('PowerForecast', const=True) + message_id: ID + start_time: datetime = Field( + ..., description='Start time of time period that is covered by the profile.' + ) + elements: List[PowerForecastElement] = Field( ..., - description="List of elements that model the leakage behaviour of the buffer. The fill_level_ranges of the elements must be contiguous.", + description='Elements of which this forecast consists. Contains at least one element. Elements must be placed in chronological order.', max_items=288, min_items=1, ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("FRBC.LeakageBehaviour", const=True) - valid_from: datetime = Field( - ..., - description="Moment this FRBC.LeakageBehaviour starts to be valid. If the FRBC.LeakageBehaviour is immediately valid, the DateTimeStamp should be now or in the past.", - ) -class FRBCOperationMode(BaseModel): +class PEBCPowerConstraints(BaseModel): class Config: extra = Extra.forbid - abnormal_condition_only: bool = Field( + message_type: str = Field('PEBC.PowerConstraints', const=True) + message_id: ID + id: ID = Field( ..., - description="Indicates if this FRBC.OperationMode may only be used during an abnormal condition", + description='Identifier of this PEBC.PowerConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - diagnostic_label: Optional[str] = Field( + valid_from: datetime = Field( + ..., description='Moment this PEBC.PowerConstraints start to be valid' + ) + valid_until: Optional[datetime] = Field( None, - description="Human readable name/description of the FRBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications.", + description='Moment until this PEBC.PowerConstraints is valid. If valid_until is not present, there is no determined end time of this PEBC.PowerConstraints.', ) - elements: List[FRBCOperationModeElement] = Field( - ..., - description="List of FRBC.OperationModeElements, which describe the properties of this FRBC.OperationMode depending on the fill_level. The fill_level_ranges of the items in the Array must be contiguous.", - max_items=100, - min_items=1, + consequence_type: PEBCPowerEnvelopeConsequenceType = Field( + ..., description='Type of consequence of limiting power' ) - id: ID = Field( + allowed_limit_ranges: List[PEBCAllowedLimitRange] = Field( ..., - description="ID of the FRBC.OperationMode. Must be unique in the scope of the FRBC.ActuatorDescription in which it is used.", + description='The actual constraints. There shall be at least one PEBC.AllowedLimitRange for the UPPER_LIMIT and at least one AllowedLimitRange for the LOWER_LIMIT. It is allowed to have multiple PEBC.AllowedLimitRange objects with identical CommodityQuantities and LimitTypes.', + max_items=100, + min_items=2, ) @@ -1358,27 +1316,27 @@ class PEBCInstruction(BaseModel): class Config: extra = Extra.forbid - abnormal_condition: bool = Field( + message_type: str = Field('PEBC.Instruction', const=True) + message_id: ID + id: ID = Field( ..., - description="Indicates if this is an instruction during an abnormal condition.", + description='Identifier of this PEBC.Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) execution_time: datetime = Field( ..., - description="Indicates the moment the execution of the instruction shall start.", + description='Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.', ) - id: ID = Field( + abnormal_condition: bool = Field( ..., - description="Identifier of this PEBC.Instruction. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + description='Indicates if this is an instruction during an abnormal condition.', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PEBC.Instruction", const=True) power_constraints_id: ID = Field( ..., - description="Identifier of the PEBC.PowerConstraints this PEBC.Instruction was based on.", + description='Identifier of the PEBC.PowerConstraints this PEBC.Instruction was based on.', ) power_envelopes: List[PEBCPowerEnvelope] = Field( ..., - description="The PEBC.PowerEnvelope(s) that should be followed by the Resource Manager. There shall be at least one PEBC.PowerEnvelope, but at most one PEBC.PowerEnvelope for each CommodityQuantity.", + description='The PEBC.PowerEnvelope(s) that should be followed by the Resource Manager. There shall be at least one PEBC.PowerEnvelope, but at most one PEBC.PowerEnvelope for each CommodityQuantity.', max_items=10, min_items=1, ) @@ -1388,129 +1346,174 @@ class PPBCPowerProfileStatus(BaseModel): class Config: extra = Extra.forbid - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PPBC.PowerProfileStatus", const=True) + message_type: str = Field('PPBC.PowerProfileStatus', const=True) + message_id: ID sequence_container_status: List[PPBCPowerSequenceContainerStatus] = Field( ..., - description="Array with status information for all PPBC.PowerSequenceContainers in the PPBC.PowerProfileDefinition.", + description='Array with status information for all PPBC.PowerSequenceContainers in the PPBC.PowerProfileDefinition.', max_items=1000, min_items=1, ) -class PPBCPowerSequence(BaseModel): +class OMBCSystemDescription(BaseModel): class Config: extra = Extra.forbid - abnormal_condition_only: bool = Field( + message_type: str = Field('OMBC.SystemDescription', const=True) + message_id: ID + valid_from: datetime = Field( ..., - description="Indicates if this PPBC.PowerSequence may only be used during an abnormal condition", + description='Moment this OMBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past.', ) - elements: List[PPBCPowerSequenceElement] = Field( + operation_modes: List[OMBCOperationMode] = Field( ..., - description="List of PPBC.PowerSequenceElements. Shall contain at least one element. Elements must be placed in chronological order.", - max_items=288, + description='OMBC.OperationModes available for the CEM in order to coordinate the device behaviour.', + max_items=100, min_items=1, ) - id: ID = Field( + transitions: List[Transition] = Field( ..., - description="ID of the PPBC.PowerSequence. Must be unique in the scope of the PPBC.PowerSequnceContainer in which it is used.", + description='Possible transitions to switch from one OMBC.OperationMode to another.', + max_items=1000, + min_items=0, ) - is_interruptible: bool = Field( + timers: List[Timer] = Field( ..., - description="Indicates whether the option of pausing a sequence is available.", - ) - max_pause_before: Optional[Duration] = Field( - None, - description="The maximum duration for which a device can be paused between the end of the previous running sequence and the start of this one", + description='Timers that control when certain transitions can be made.', + max_items=1000, + min_items=0, ) -class PPBCPowerSequenceContainer(BaseModel): +class PPBCPowerSequence(BaseModel): class Config: extra = Extra.forbid id: ID = Field( ..., - description="ID of the PPBC.PowerSequenceContainer. Must be unique in the scope of the PPBC.PowerProfileDefinition in which it is used.", + description='ID of the PPBC.PowerSequence. Must be unique in the scope of the PPBC.PowerSequnceContainer in which it is used.', ) - power_sequences: List[PPBCPowerSequence] = Field( + elements: List[PPBCPowerSequenceElement] = Field( ..., - description="List of alternative Sequences where one could be chosen by the CEM", + description='List of PPBC.PowerSequenceElements. Shall contain at least one element. Elements must be placed in chronological order.', max_items=288, min_items=1, ) + is_interruptible: bool = Field( + ..., + description='Indicates whether the option of pausing a sequence is available.', + ) + max_pause_before: Optional[Duration] = Field( + None, + description='The maximum duration for which a device can be paused between the end of the previous running sequence and the start of this one', + ) + abnormal_condition_only: bool = Field( + ..., + description='Indicates if this PPBC.PowerSequence may only be used during an abnormal condition', + ) -class PowerForecast(BaseModel): +class FRBCOperationMode(BaseModel): class Config: extra = Extra.forbid - elements: List[PowerForecastElement] = Field( + id: ID = Field( ..., - description="Elements of which this forecast consists. Contains at least one element. Elements must be placed in chronological order.", - max_items=288, + description='ID of the FRBC.OperationMode. Must be unique in the scope of the FRBC.ActuatorDescription in which it is used.', + ) + diagnostic_label: Optional[str] = Field( + None, + description='Human readable name/description of the FRBC.OperationMode. This element is only intended for diagnostic purposes and not for HMI applications.', + ) + elements: List[FRBCOperationModeElement] = Field( + ..., + description='List of FRBC.OperationModeElements, which describe the properties of this FRBC.OperationMode depending on the fill_level. The fill_level_ranges of the items in the Array must be contiguous.', + max_items=100, min_items=1, ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PowerForecast", const=True) - start_time: datetime = Field( - ..., description="Start time of time period that is covered by the profile." + abnormal_condition_only: bool = Field( + ..., + description='Indicates if this FRBC.OperationMode may only be used during an abnormal condition', ) -class ResourceManagerDetails(BaseModel): +class DDBCActuatorDescription(BaseModel): class Config: extra = Extra.forbid - available_control_types: List[ControlType] = Field( + id: ID = Field( ..., - description="The control types supported by this Resource Manager.", - max_items=5, - min_items=1, + description='ID of this DDBC.ActuatorDescription. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - currency: Optional[Currency] = Field( + diagnostic_label: Optional[str] = Field( None, - description="Currency to be used for all information regarding costs. Mandatory if cost information is published.", + description='Human readable name/description of the actuator. This element is only intended for diagnostic purposes and not for HMI applications.', ) - firmware_version: Optional[str] = Field( - None, - description="Version identifier of the firmware used in the device (provided by the manufacturer)", + supported_commodites: List[Commodity] = Field( + ..., + description='Commodities supported by the operation modes of this actuator. There shall be at least one commodity', + max_items=4, + min_items=1, ) - instruction_processing_delay: Duration = Field( + operation_modes: List[DDBCOperationMode] = Field( ..., - description="The average time the combination of Resource Manager and HBES/BACS/SASS or (Smart) device needs to process and execute an instruction", + description='List of all Operation Modes that are available for this actuator. There shall be at least one DDBC.OperationMode.', + max_items=100, + min_items=1, ) - manufacturer: Optional[str] = Field(None, description="Name of Manufacturer") - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("ResourceManagerDetails", const=True) - model: Optional[str] = Field( - None, - description="Name of the model of the device (provided by the manufacturer)", + transitions: List[Transition] = Field( + ..., + description='List of Transitions between Operation Modes. Shall contain at least one Transition.', + max_items=1000, + min_items=0, ) - name: Optional[str] = Field(None, description="Human readable name given by user") - provides_forecast: bool = Field( + timers: List[Timer] = Field( ..., - description="Indicates whether the ResourceManager is able to provide PowerForecasts", + description='List of Timers associated with Transitions for this Actuator. Can be empty.', + max_items=1000, + min_items=0, ) - provides_power_measurement_types: List[CommodityQuantity] = Field( + + +class DDBCSystemDescription(BaseModel): + class Config: + extra = Extra.forbid + + message_type: str = Field('DDBC.SystemDescription', const=True) + message_id: ID + valid_from: datetime = Field( ..., - description="Array of all CommodityQuantities that this Resource Manager can provide measurements for. ", + description='Moment this DDBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past.', + ) + actuators: List[DDBCActuatorDescription] = Field( + ..., + description='List of all available actuators in the system. Must contain at least one DDBC.ActuatorAggregated.', max_items=10, min_items=1, ) - resource_id: ID = Field( + present_demand_rate: NumberRange = Field( + ..., description='Present demand rate that needs to be satisfied by the system' + ) + provides_average_demand_rate_forecast: bool = Field( ..., - description="Identifier of the Resource Manager. Must be unique within the scope of the CEM.", + description='Indicates whether the Resource Manager could provide a demand rate forecast through the DDBC.AverageDemandRateForecast.', ) - roles: List[Role] = Field( + + +class PPBCPowerSequenceContainer(BaseModel): + class Config: + extra = Extra.forbid + + id: ID = Field( ..., - description="Each Resource Manager provides one or more energy Roles", - max_items=3, - min_items=1, + description='ID of the PPBC.PowerSequenceContainer. Must be unique in the scope of the PPBC.PowerProfileDefinition in which it is used.', ) - serial_number: Optional[str] = Field( - None, description="Serial number of the device (provided by the manufacturer)" + power_sequences: List[PPBCPowerSequence] = Field( + ..., + description='List of alternative Sequences where one could be chosen by the CEM', + max_items=288, + min_items=1, ) @@ -1518,74 +1521,74 @@ class FRBCActuatorDescription(BaseModel): class Config: extra = Extra.forbid + id: ID = Field( + ..., + description='ID of the Actuator. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', + ) diagnostic_label: Optional[str] = Field( None, - description="Human readable name/description for the actuator. This element is only intended for diagnostic purposes and not for HMI applications.", + description='Human readable name/description for the actuator. This element is only intended for diagnostic purposes and not for HMI applications.', ) - id: ID = Field( - ..., - description="ID of the Actuator. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + supported_commodities: List[Commodity] = Field( + ..., description='List of all supported Commodities.', max_items=4, min_items=1 ) operation_modes: List[FRBCOperationMode] = Field( ..., - description="Provided FRBC.OperationModes associated with this actuator", + description='Provided FRBC.OperationModes associated with this actuator', max_items=100, min_items=1, ) - supported_commodities: List[Commodity] = Field( - ..., description="List of all supported Commodities.", max_items=4, min_items=1 - ) - timers: List[Timer] = Field( + transitions: List[Transition] = Field( ..., - description="List of Timers associated with this actuator", + description='Possible transitions between FRBC.OperationModes associated with this actuator.', max_items=1000, min_items=0, ) - transitions: List[Transition] = Field( + timers: List[Timer] = Field( ..., - description="Possible transitions between FRBC.OperationModes associated with this actuator.", + description='List of Timers associated with this actuator', max_items=1000, min_items=0, ) -class FRBCSystemDescription(BaseModel): +class PPBCPowerProfileDefinition(BaseModel): class Config: extra = Extra.forbid - actuators: List[FRBCActuatorDescription] = Field( - ..., description="Details of all Actuators.", max_items=10, min_items=1 - ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("FRBC.SystemDescription", const=True) - storage: FRBCStorageDescription = Field(..., description="Details of the storage.") - valid_from: datetime = Field( + message_type: str = Field('PPBC.PowerProfileDefinition', const=True) + message_id: ID + id: ID = Field( ..., - description="Moment this FRBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past.", + description='ID of the PPBC.PowerProfileDefinition. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.', ) - - -class PPBCPowerProfileDefinition(BaseModel): - class Config: - extra = Extra.forbid - - end_time: datetime = Field( + start_time: datetime = Field( ..., - description="Indicates when the last PPBC.PowerSequence shall be finished at the latest", + description='Indicates the first possible time the first PPBC.PowerSequence could start', ) - id: ID = Field( + end_time: datetime = Field( ..., - description="ID of the PPBC.PowerProfileDefinition. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.", + description='Indicates when the last PPBC.PowerSequence shall be finished at the latest', ) - message_id: ID = Field(..., description="ID of this message") - message_type: str = Field("PPBC.PowerProfileDefinition", const=True) power_sequences_containers: List[PPBCPowerSequenceContainer] = Field( ..., - description="The PPBC.PowerSequenceContainers that make up this PPBC.PowerProfileDefinition. There shall be at least one PPBC.PowerSequenceContainer that includes at least one PPBC.PowerSequence. PPBC.PowerSequenceContainers must be placed in chronological order.", + description='The PPBC.PowerSequenceContainers that make up this PPBC.PowerProfileDefinition. There shall be at least one PPBC.PowerSequenceContainer that includes at least one PPBC.PowerSequence. PPBC.PowerSequenceContainers must be placed in chronological order.', max_items=1000, min_items=1, ) - start_time: datetime = Field( + + +class FRBCSystemDescription(BaseModel): + class Config: + extra = Extra.forbid + + message_type: str = Field('FRBC.SystemDescription', const=True) + message_id: ID + valid_from: datetime = Field( ..., - description="Indicates the first possible time the first PPBC.PowerSequence could start", + description='Moment this FRBC.SystemDescription starts to be valid. If the system description is immediately valid, the DateTimeStamp should be now or in the past.', + ) + actuators: List[FRBCActuatorDescription] = Field( + ..., description='Details of all Actuators.', max_items=10, min_items=1 ) + storage: FRBCStorageDescription = Field(..., description='Details of the storage.')