Project

General

Profile

OpenFMBIssues #7190

Change request for the ChargingStateKind

Added by Owen Wu about 1 month ago. Updated 26 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Start date:
04/30/2025
Due date:
% Done:

0%

Final Decision:
Closed Reason:
--Not Set---
Breaking Change:
Version:
2.2
Needs More Information:
No

Description

*Background:
In the current definition of the “ChargingStateKind” enum within the OpenFMB specification, the value “ChargingStateKind_Idle” is assigned the value “0”. While this accurately represents the idle state of an EVSE, it introduces a functional ambiguity when used in Protocol Buffers. In protobuf, the default value of an enum field is always `0`, and this value is implicitly used when the field is unset. This makes it difficult to distinguish between an intentionally set “Idle” state and an uninitialized or unknown value.

*Current Enum Definition:

enum ChargingStateKind {
ChargingStateKind_Idle = 0;
ChargingStateKind_Charging = 1;
ChargingStateKind_EVConnected = 2;
ChargingStateKind_SuspendedEV = 3;
ChargingStateKind_SuspendedEVSE = 4;
}


Proposed Solution

*Proposed Change:
To resolve the ambiguity and enhance clarity when handling default and unknown enum values, it is proposed to:

1. Introduce a new value “ChargingStateKind_UNDEFINED = 0” to explicitly represent an unknown or uninitialized state.
2. Bump all existing values by 1, starting with “ChargingStateKind_Idle = 1”.

*Proposed Enum Definition:

enum ChargingStateKind {
ChargingStateKind_UNDEFINED = 0; // Represents an unknown or uninitialized state
ChargingStateKind_Idle = 1; // No connection between EV and EVSE
ChargingStateKind_Charging = 2; // Energy is flowing between EVSE and EV
ChargingStateKind_EVConnected = 3; // EV is physically connected to EVSE
ChargingStateKind_SuspendedEV = 4; // EV is connected but not drawing power
ChargingStateKind_SuspendedEVSE = 5; // EVSE is not offering energy to EV
}


Related issues

Related to OpenFMB DataModel - OpenFMBIssues #7137: 2.2 Data Model Final Testing PhaseIn ProgressOpenFMBReporters02/24/202503/31/2025

Actions
#1

Updated by Owen Wu about 1 month ago

  • Status changed from New to Triage
#2

Updated by Owen Wu about 1 month ago

  • Status changed from Triage to Accepted
#3

Updated by Owen Wu about 1 month ago

#4

Updated by Owen Wu 26 days ago

  • Subject changed from Change request for the EVSEStatusProfile to Change request for the ChargingStateKind
  • Status changed from Accepted to In Progress
#5

Updated by Owen Wu 26 days ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF