| Summary: | make primitive types part of the model | ||
|---|---|---|---|
| Product: | [Modeling] eTrice | Reporter: | Henrik Rentz-Reichert <hrr> |
| Component: | Core | Assignee: | Project Inbox <etrice.core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | klaus.birken, ts |
| Version: | 0.1.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | 0.2.0M1 | ||
|
Description
Henrik Rentz-Reichert
for more convenience I would suggest:
PrimitiveType int8 -> byte
PrimitiveType int16 -> short
PrimitiveType int32 -> int
// etc.
this would allow a shorter notation:
ActorClass Act {
Structure {
Attribute number: int8
}
}
imho the clustering of PrimitiveTypes (e.g. JavaPrimitives ) is not needed
for future functionality, especially model checking and test generators more detailed information about the types will be needed
PrimitiveType int8 -> byte {
range=-128..127
}
There might also be requirements for more exotic types
PrimitiveType int40 -> int40 (on some DSPs)
PrimitiveType fixed1616 -> fixed1616 {
fixpoint=16.16
}
(In reply to comment #1) > imho the clustering of PrimitiveTypes (e.g. JavaPrimitives ) is not needed I thought clustering those type declarations in a namespace would be a good idea. But if this is desired it can be achieved by moving the declarations to a separate model. This would allow one to write RoomModel JavaPrimitiveTypes { PrimitiveType int8 -> byte PrimitiveType int16 -> short PrimitiveType int32 -> int // etc. } RoomModel MyModel { import model "JavaPrimitiveTypes.room" ActorClass Act { Structure { Attribute number: JavaPrimitiveTypes.int8 } }} or by importing the namespace RoomModel MyModel { import JavaPrimitiveTypes.* from "JavaPrimitiveTypes.room" ActorClass Act { Structure { Attribute number: int8 } }} That is exactly how I would use the type definitions. Every Project can define the types in a separate model. Done with 12d085d0c849291049c7fe1bf82508570518d592 closing bugs that went into 0.2.0M1 |