Book a Demo

Author Topic: Modeling data streams and field orders  (Read 5585 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: 13523
  • Karma: +574/-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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Modeling data streams and field orders
« Reply #2 on: January 16, 2023, 03:53:35 pm »
You can change the order of attributes using the Ctrl+ arrow in the features window (F9)

Geert
I tried this (as I have done over the years), and although the order changed in the dialog, the diagram and browser remained, annoyingly (and unexpectedly), in alphabetical order! This is under both v16.1 and v15.2  I have marked the [X] Free Sorting checkbox in the [Ctrl+F9] General Dialog.

What secret sauce am I missing?  Also, if I try this in the browser, the sorting arrows are disabled (as I move from the object to the attributes).

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Modeling data streams and field orders
« Reply #3 on: January 16, 2023, 04:07:46 pm »
I don't know what to say.

For me this works, also in v16.
The diagram updated immediately.
The project browser needed a reload to show the new attribute order.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Modeling data streams and field orders
« Reply #4 on: January 16, 2023, 07:23:58 pm »
I don't know what to say.

For me, this works, also in v16.
The diagram was updated immediately.
The project browser needed a reload to show the new attribute order.

Geert
Thanks, Geert,

I'll keep looking and trying.

Paolo

[Edit: it was machine specific. Feature ordering is controlled by a second option under Preferences | Object.]
« Last Edit: January 16, 2023, 07:46:17 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Modeling data streams and field orders
« Reply #5 on: January 16, 2023, 09:22:19 pm »
[Edit: it was machine specific. Feature ordering is controlled by a second option under Preferences | Object.]
Only two? Keep searching for the third option!  :-X

q.