KGergo88 / RDB_Monitor

A generic measurement display program originally developed for the RDB Diplomaterv project
GNU General Public License v3.0
2 stars 1 forks source link

Design and implement a container like the Python OrderedDict #37

Closed KGergo88 closed 3 years ago

KGergo88 commented 4 years ago

Description

The MDP protocol has ordered datalines, that means that every line has to contain a value for every dataline and they have to be in the same order as they were defined by the header.

On the other hand the CMDP protocol (see #30) does not necessary contain a value in every data message for every dataline. Also these values do not need to be ordered. This is possible because the dataline are referenced with an ID in this protocol (Y0, Y1...etc).

To be able to handle both of them effectively with the DataLine and Diagram classes we need to design and implement a class that is similar to the OrderedDict in Python.

See description for this container here: https://docs.python.org/3.8/library/collections.html#collections.OrderedDict https://www.geeksforgeeks.org/ordereddict-in-python/

TODO