blob: 00caa3a5c5a932c17645f546dbcc288539c2a8cc [file] [log] [blame]
RoomModel Attributes {
import etrice.api.types.boolean
import etrice.api.types.int16
import etrice.api.types.int32
import etrice.api.types.uint32
import etrice.api.types.voidType
DataClass SimpleDataClass {
Attribute attribute1: int16
Attribute attribute2: uint32
}
DataClass DataClassWithAttributes {
Attribute attribute1: int16
Attribute attribute2: SimpleDataClass
}
DataClass DataClassWithAttributesAndOperations {
Attribute attribute1: uint32 [ "attribute of a PrimitiveType" ]
Attribute attribute2: SimpleDataClass [ "attribute of another DataClass" ]
Operation operation1(par1: boolean): uint32 '''
// your operation code
return attribute1; // returning a member variable'''
}
ActorClass ActorClassWithAttributes {
Structure {
Attribute attribute1: int32 ["attribute of a PrimitiveType" ]
Attribute attribute2: SimpleDataClass [ "attribute of a DataClass" ]
}
}
ActorClass ActorClassWithAttributesAndOperations {
Structure {
Attribute attribute1: uint32 [ "attribute of a PrimitiveType" ]
Attribute attribute2: SimpleDataClass [ "attribute of a DataClass" ]
}
Behavior {
Operation operation1(par1: boolean): uint32 '''
// your operation code
return attribute1; // returning a member variable'''
}
}
ActorClass ActorClassWithAttributes2 {
Structure {
Attribute arrayAttribute [8]: uint32 [ "attribute with multiplicity"]
Attribute refAttribue: voidType ref [ "attribute as a reference (void pointer)"]
}
}
ActorClass ActorClassWithAttributeInitialization {
Structure {
Attribute attribute1: uint32 = "3"
Attribute attribute2: SimpleDataClass = "{1, 2}"
Attribute arrayAttribute [8]: uint32 = "0" // or {0,0,0, ...}
Attribute refAttribue: voidType ref = "NULL" // set reference in constructor or in state machine
}
}
}