]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(ocpp16): reject float values for integer configuration keys per spec §5.3
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 16 Mar 2026 00:20:36 +0000 (01:20 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 16 Mar 2026 00:20:36 +0000 (01:20 +0100)
commit8dc905b10509344362ee4a686653598a50662cba
tree3710a781170409e6b3953da4ecfd5046935c0133
parent801afb2abccd47cd3c8d21cc7b46502d0c06eada
fix(ocpp16): reject float values for integer configuration keys per spec §5.3

Replace convertToInt (parseInt — silently truncates 3.7 to 3) with
Number.isInteger check. The spec §9.1 defines these keys as Type:
integer, and §5.3 requires Rejected for values that do not conform
to the expected format.
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts