Closed oblaise closed 3 years ago
I always like simplifications.
If you would start autocode generator there will be a section in .vscode/launch.json and a publish task under .vscode/tasks.json But there is no documentation at the moment. I would create it, because it should be clear for everone.
Because of simplification it is included in git, so that everybody can start after cloning, just by launch the PlayGround app. I have some other private repos with code generation, too and my experience with it is that the build process will be too complex for new developers.
After analyzing generator I also added a new ZclAttribute
constructor, changed generator and re-generated the classes.
All is included in the PR now.
By adding new overloads for
ZclFieldSerializer.Serialize
andZclFieldDeserializer.Deserialize
you can simplify the calls to these functions by using directlyDataType
instead ofZclDataType.Get(DataType type)
. This will make the code more compact and more readable.I only changed the non-generated code. This should be included also in the generated code to be efficient. But I don't know how your code generation is working exactly, is it explained somewhere ? From my understanding if the generation is changed it must be run to regenerate all the code this will result in an important number of changed files in the commit. Ideally the generated code should be excluded from Git and regenerated locally when required. But this will require a more complex building process.