Introducing the FOM/SOM file: Part 2

In this post I will cover the data types.  The general recommendation is to aways use custom data types instead basic data types.

Let’s see this attribute:

<attribute>
    <name>FreeMemory</name>
    <dataType>HLAinteger64BE</dataType>
    <updateType>Conditional</updateType>
    <updateCondition>On change</updateCondition>
    <ownership>NoTransfer</ownership>
    <sharing>PublishSubscribe</sharing>
    <dimensions/>
    <transportation>HLAbestEffort</transportation>
    <order>Receive</order>
    <semantics>Free memory.</semantics>
</attribute>

Here you will find a attribute named “FreeMemory”, of type “HLAinteger64BE”. But we must change this basic type to a custom type. Doing this will help you to change same attribute types in several classes at once.

First, create the custom type of type “HLAinteger64BE”:

<dataTypes>
    <simpleDataTypes>
        <simpleData>
            <name>FreeMemoryType</name>
            <representation>HLAinteger64BE</representation>
            <units>Bytes</units>
            <resolution>1</resolution>
            <accuracy>1</accuracy>
            <semantics>Integer to describe free RAM memory.</semantics>
        </simpleData>

    </simpleDataTypes>
</dataTypes>

Now you can change the type in your class:

<attribute>
    <name>FreeMemory</name>
    <dataType>FreeMemoryType</dataType>
    <updateType>Conditional</updateType>
    <updateCondition>On change</updateCondition>
    <ownership>NoTransfer</ownership>
    <sharing>PublishSubscribe</sharing>
    <dimensions/>
    <transportation>HLAbestEffort</transportation>
    <order>Receive</order>
    <semantics>Free memory.</semantics>
</attribute>

You can find a good document to help you here : HLA Module 1 /Part 3 ( Dr. Pichaya Tandayya ). Its a kind old but will give you the basics.

Here is a very good document from the HLA Group : HLA OMT Fundamentals.

 

 

Add Comment