]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
docs: fix JSDoc using historical language instead of current-state descriptions
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 30 Mar 2026 23:03:46 +0000 (01:03 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 30 Mar 2026 23:03:46 +0000 (01:03 +0200)
Replace history-telling patterns ('previously', 'no longer valid',
'unused but required by interface', 'kept for API consistency') with
descriptions of current behavior.

src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
src/charging-station/ocpp/2.0/OCPP20ResponseService.ts
src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts
tests/charging-station/helpers/StationHelpers.ts
tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts

index c0f7b452ffc7ee4f3287915f5c5b29573ab27ed7..a4a4b3d69c695006230610fbcea0f12ed87494a9 100644 (file)
@@ -71,7 +71,7 @@ const moduleName = 'OCPP16ResponseService'
  * is processed by dedicated handler methods that manage charging station state updates.
  *
  * Response Validation Workflow:
- * 1. Response received from Central System for previously sent request
+ * 1. Response received from Central System for the corresponding request
  * 2. Response payload validated against OCPP 1.6 JSON schema
  * 3. Response routed to appropriate handler based on original request type
  * 4. Charging station state updated based on response content
index 1470cae66b393af7604a08ad37d2cd3ed8564d1b..c0d970c51fb5bd7f44f492b066815853a741ebdc 100644 (file)
@@ -80,7 +80,7 @@ const moduleName = 'OCPP20ResponseService'
  * components to provide comprehensive protocol support with enhanced features.
  *
  * Response Validation Workflow:
- * 1. Response received from CSMS for previously sent request
+ * 1. Response received from CSMS for the corresponding request
  * 2. Response payload validated against OCPP 2.0+ JSON schema
  * 3. Response routed to appropriate handler based on original request type
  * 4. Charging station state and variable model updated based on response content
index b7f071f5c73d172471cc0fd9bf114e8db144a006..84741033408560c337215a24f61f89bb68fae578 100644 (file)
@@ -335,7 +335,7 @@ export class LocalAuthStrategy implements AuthStrategy {
   /**
    * Check authorization cache for identifier
    * @param request - Authorization request containing identifier to look up
-   * @param config - Authentication configuration (unused but required by interface)
+   * @param config - Authentication configuration (unused in cache check)
    * @returns Cached authorization result if found and not expired; undefined otherwise
    */
   private checkAuthCache (
@@ -371,7 +371,7 @@ export class LocalAuthStrategy implements AuthStrategy {
   /**
    * Check local authorization list for identifier
    * @param request - Authorization request containing identifier to look up
-   * @param config - Authentication configuration (unused but required by interface)
+   * @param config - Authentication configuration (unused in local list check)
    * @returns Authorization result from local list if found; undefined otherwise
    */
   private async checkLocalAuthList (
index 1b9d084d99393a7d163fb8f941b757c2ebb330ab..b20995ab2a1c9bc264318fdef9a2ec4fb4905ba3 100644 (file)
@@ -243,7 +243,7 @@ export function cleanupChargingStation (station: ChargingStation): void {
  * Create a connector status object with default values
  *
  * This is the canonical factory for creating ConnectorStatus objects in tests.
- * @param _connectorId - Connector ID (unused, kept for API consistency)
+ * @param _connectorId - Connector ID (unused; factory creates default connector status)
  * @param options - Optional overrides for default values
  * @returns ConnectorStatus with default or customized values
  * @example
index ef9690582afc80c75d6df7f4ef1c4231ba510697..5a5ea13a1efcc42fb70589eb12077e6b1bf83419 100644 (file)
@@ -1604,7 +1604,7 @@ await describe('B05 - OCPP20VariableManager', async () => {
     await it('should reject removed TimeSource members RTC and Manual', () => {
       const res = manager.setVariables(station, [
         {
-          attributeValue: 'NTP,GPS,RTC,Manual', // RTC & Manual no longer valid
+          attributeValue: 'NTP,GPS,RTC,Manual', // RTC and Manual are invalid TimeSource values
           component: { name: OCPP20ComponentName.ClockCtrlr },
           variable: { name: OCPP20RequiredVariableName.TimeSource },
         },