feat(ocpp): add signed meter values support for OCPP 1.6 and 2.0.x (#1775)
* feat(types): export OCPP16MeterValueFormat and add OCPP16SignedMeterValue
* feat(ocpp1.6): add vendor configuration keys for signed meter values
* feat(ocpp2.0): add variable registry entries for signed meter readings
* feat(mock-server): handle signed meter value payloads
* feat(ocpp): add simulated signed meter data generator
* feat(ocpp): add PublicKeyWithSignedMeterValue enum and state tracking
* feat(ocpp2.0): populate signedMeterValue in sampled value building
* feat(ocpp1.6): add signed meter value support to sampled value building
* feat(templates): add station templates with signed meter value config
* docs: document signed meter values configuration
* fix(lint): apply formatter fixes to signed meter value files
* fix(ocpp): fix publicKey state tracking and reset in signed meter values
* fix(ocpp): fix OCMF payload, hash, and public key encoding
* fix(ocpp): add defensive guards and improve signing code quality
* fix(ocpp2.0): respect SignStartedReadings and SignUpdatedReadings sub-switches
* [autofix.ci] apply automated fixes
* fix(ocpp): consistent publicKey state update, version-gated vendor keys, use enum constants
* [autofix.ci] apply automated fixes
* refactor(ocpp): use union types in common code and correct enum classification per OCPP specs
- Use VendorParametersKey (union) in ChargingStation.ts, not OCPP16VendorParametersKey
- Remove VERSION_16 guard: OCPP2_PARAMETER_KEY_MAP resolves keys per version
- Add 6 mapping entries to OCPP2_PARAMETER_KEY_MAP for signed MV config keys
- Classify enums per OCPP 2.0.1 base spec: SignReadings and
PublicKeyWithSignedMeterValue in OCPP20OptionalVariableName (Required: no)
- Classify Application Note-only variables (SignStartedReadings,
SignUpdatedReadings, PublicKey, SigningMethod) in OCPP20VendorVariableName
- Replace all string literals with enum references in variable registry
* [autofix.ci] apply automated fixes
* fix(ocpp): fix corrupted Measurands entry, Wh/kWh unit handling, context mapping, and enum validation
- Fix AlignedDataCtrlr.Measurands variable corrupted by lint auto-sort (was SignUpdatedReadings)
- Add meterValueUnit to SignedMeterDataParams to handle kWh input without double-division
- Replace unsafe context cast with explicit OCPP20-to-generator context mapping
- Extract parsePublicKeyWithSignedMeterValue helper (hoisted Set, shared across OCPP versions)
- Use MeterValueUnit enum constant instead of string literal for kWh comparison
* [autofix.ci] apply automated fixes
* refactor(ocpp): use MeterValueContext/MeterValueUnit enums and barrel imports instead of string literals
* style: apply prettier formatting to SignedMeterDataGenerator test
* fix(ocpp): add vendorSpecific flag, guard publicKey inclusion on key availability, add kWh test
* refactor(ocpp): use PublicKeyWithSignedMeterValueEnumType.Never instead of string literal
* test(ocpp): add JSDoc header, TX=P/Clock tests, non-energy measurand and transactionData force tests
* test(ocpp1.6): add periodic signing tests with mock timers for startUpdatedMeterValues
* refactor(test): use beforeEach for station creation in OCPP16SignedMeterValues per style guide
* fix(ocpp): treat undefined context as periodic for SignUpdatedReadings, conditional try/catch for signing-forced transactionData, use node:assert/strict import
* refactor(ocpp2.0): add defaultValue and enumeration to PublicKeyWithSignedMeterValue registry entry
* refactor(ocpp1.6): remove redundant nullish coalescing on publicKeyHex
* refactor(ocpp): use BaseError, return tuple in OCPP 2.0 builder, extract config reading in OCPP 1.6
* refactor(ocpp): harmonize naming, signatures, and data structures across signing paths
- SignedMeterData extends JsonObject: eliminates as-cast to OCPP16SignedMeterValue
- Rename publicKeyConfig to publicKeyWithSignedMeterValue: consistent with OCPP 2.0 interface
- Rename meterValueWh to meterValue: unit-agnostic (generator handles via meterValueUnit)
- Remove unused OCPP16SignedMeterValue import
* fix(mock-server): log signed meter values in TransactionEvent.Ended and add test
* fix(ocpp): include Transaction.Begin MV in TransactionEvent(Ended) per spec §4.1.2, set signingMethod to empty string per spec §3.2.1
* refactor(ocpp): rename SignedMeter* files to follow OCPP* naming convention
* refactor(ocpp): extract generic SignedSampledValueResult<T> to shared utils
* refactor(ocpp): extract shared SigningConfig interface, OCPP20SampledValueSigningConfig extends it
* refactor(ocpp): use roundTo helper instead of Number/toFixed for kWh conversion
* style(mock-server): reorder signed MV tests to follow Started/Updated/Ended lifecycle
* refactor(ocpp): move SampledValueSigningConfig to shared utils, remove version-specific type import from common code
* fix(ocpp): map StartTxnSampledData to SampledDataCtrlr.TxStartedMeasurands, remove VERSION_16 guard
* [autofix.ci] apply automated fixes
* style: remove unnecessary parenthetical from eslint cspell comment
* style: rename Configuration.test.ts to OCPP16VendorParametersKey.test.ts to reflect content
* refactor(ocpp): rename ocpp20SigningConfig/State to signingConfig/State (version-agnostic)
* style: harmonize blank lines in OCPP20VariableRegistry between component sections
* [autofix.ci] apply automated fixes
* style: remove unjustified blank lines before inline comments within same component section
* fix(ocpp2.0): add missing DeviceDataCtrlr section comment in variable registry