Comments (2)
Hi @TimonTerBraak,
There are no built-in means to easily handle protocols like yours in the CommsChampion Ecosystem. I think performance wise it's better for you to pre- and post-process the payload by removing / adding escape characters, just like you do now. Such code is quite simple both to write and quick compile.
However, it is possible to implement such pre- and post-processing using the means of the CommsChampion Ecosystem, but it will take more effort to implement it and due to usage of the templates the compilation will take longer. The implementation will require splitting your protocol into two separate ones, one to handle the framing and escaping, and the second one to handle a payload to determine actual messages. So, it will still require two passes on the data anyway. With the currently available feature set you will probably have to use custom code injection. Maybe in the future I will implement extra features to the CommsDSL spec, commsdsl code generates, and COMMS library which will eliminate the necessity to inject custom code for such case, bit it won't happen within the next couple of months and it won't eliminate two passes on the data.
Please let me know if you want me to advice on the details on how to implement such two passes using the CommsChampion Ecosystem.
from commsdsl.
Thanks for the quick feedback. Then I'll stick to my current implementation. The advantage of doing this in the COMMS part is the decoupling of the application logic, improving the reusability of this functionality for other protocol.
from commsdsl.
Related Issues (20)
- Question: List without length and message size HOT 2
- ICD generation HOT 7
- Missing copyright holder in license HOT 5
- ASN.1 Parsing/Serialization HOT 2
- Adding constexpr to static const functions HOT 2
- Bit Order in `<bitfield>` and `<set>` HOT 4
- `optional` field with `cond` depending on another `optional` field. HOT 7
- Field Extension Support in Lists with termSuffix HOT 4
- Need Help HOT 21
- Creating Frame with `id` that is less than one byte HOT 3
- Schema name cannot start with a capital HOT 4
- Select variant based on value in the transport frame HOT 1
- noexcept error with gcc 9 HOT 5
- Unexpected max serialisation length HOT 4
- Dead links in the Readme HOT 1
- vcpkg integration HOT 16
- error when using COMMSDSL_NO_TESTS HOT 2
- Undefined behaviour on "out of range" values of ID layer. HOT 4
- "Unexpected max serialisation length" on variable length field inside variant HOT 6
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 commsdsl.