Author Topic: Modeling data streams and field orders  (Read 1137 times)

ig

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Modeling data streams and field orders
« on: September 23, 2021, 03:38:51 pm »
Hello,
I have the following modelling problem:

We have a byte stream, which I need to model; e.g. frames coming from somewhere.

The frame may look something like:
Field1 = length: 2 bytes  -> offset 0
Field2 = SequenceId: 4 bytes -> offset 2
Field 3 = SourceId: 1 byte -> offset 6
Field 4 = EncodingType: 1 byte -> offset 7


Using the names field1…field4 does not pose an issue when modelling the class, but when I change the attributes to something more meaningful then this becomes a mess.

The class will make something like this:
EncodingType: TEncodingType
Length: uint16
SequenceID: int32
SourceID: short

This does not resemble the actual structure of the stream, i.e. de order of the fields within the stream. I would like to show the sequence of fields in the right order. I understand when using classes and methods this is not that import because getSourceId() will solve my issue, but to users not familiar with this, a more conventional approach is favorable, specially when documenten the stream in an interface control document.

How do I model this in EA showing the real sequence of the fields, so preserving the order of the fields in the class. Do you model this in an class diagram or an other type of diagram?

Help is much appreciated.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11251
  • Karma: +415/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Modeling data streams and field orders
« Reply #1 on: September 23, 2021, 04:13:08 pm »
You can change the order of attributes using Ctrl+ arrow in the features window (F9)

Geert