Comments (2)
Good observation.
OpenV2G does not handle this particular case in the same manner, because this restriction on SessionID
was introduced with ISO 15118-20. Yet indeed ISO -2 also has one such restriction, namely genChallengeType
(PaymentDetailsRes
->GenChallenge
), where both OpenV2G and cbV2G create the bytesLen
. ISO -20 adds several more types restricted in such a manner.
To successfully decode a stream which does not conform to the schema (by deviation of length), we would need to keep the bytesLen
variable available - or introduce an error for an incorrect length. From the encoding point, keeping the "obsolete" variable would put the responsibility on the user to use it correctly.
The discussion would be whether we keep this flexibility (also for e.g. decoding non-conforming streams), or drop it with the variable, and introduce enforcements. Consider that, in the C world, both encoding and decoding use the same structs as API. In C++, you could consider restricting access in the encoder, and being tolerant in the decoder (with e.g. an error code class indicating a deviation, but not failure to decode the message).
from cbexigen.
Thanks for your comments,
I wasn't aware, that this changed from -2 to -20. Anyway, for compatibility reason, it should properly stay as it is for decoding. For encoding, the fixed length could be enforced, though.
Best,
Anton
from cbexigen.
Related Issues (20)
- find bug: Long integer digit decoding error HOT 3
- Question: How to code <ANY> element in the xsd HOT 12
- error at the end of ISO20 AC_ChargeLoop message stream HOT 6
- Encode/Decode "SalesTariff" messages HOT 8
- Datatype of X509SerialNumber HOT 13
- Missing _isUsed check for some optional fields HOT 2
- Incorrect code generated for choice sequence? HOT 2
- need different approach for exi fragment on iso20 message HOT 8
- Update xmlschema to the latest version to support Python 3.12 HOT 7
- fragment encoding of EMAIDType(15118-2) HOT 2
- suggest to use bracket for defining of added constants(lengh, size, ...) HOT 1
- iso2 missing header? HOT 2
- (Generated?) Unit tests HOT 4
- xmldsig support HOT 2
- ISO20_DC_ChargeLoop Grammar Error HOT 2
- ParameterSet count too low HOT 1
- Remove unused signature features HOT 1
- Implement struct with typedef struct to make syntax cleaner HOT 1
- Why C and not C++ ? HOT 2
- Encoded SupportedAppProtocolReq seems corrupt and cannot be decoded HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbexigen.