Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intoduce Formula Data Record: (signal for message database) #9

Open
mdabrowski1990 opened this issue Feb 9, 2021 · 0 comments
Open
Assignees
Labels
implementation Changes to code

Comments

@mdabrowski1990
Copy link
Owner

mdabrowski1990 commented Feb 9, 2021

Requires

#6

Description

As a user, I want to have Formula Data Record that supports raw to physical value calculation, so I can either use physical or raw values to decode/encode values of these data records.

Example:
Data Record Vehicle Speed is 16 bit value. Exact vehicle speed is calculated using formula:
[vehicle speed km/h] = [vehicle speed raw] / 125

Testing

  • unit tests
    • Value encoding and decoding using Formula Data Record
    • There is exception raised whenever out of range physical value is being decoded
    • There is exception raised whenever out of range raw value is being encoded

Acceptance criteria

  • Formula Data Record class is defined
    • inherits after Abstract Data Record class
    • provide encode method (input: raw value, output: physical value)
    • provide decode method (input: physical value, output: raw value)
  • proper error handling is implemented
  • provide an option to mix with other Data Record types (e.g. physical value in certain range and mapping for other values like 'error', 'init')
  • provide an option to have different mapping in various range (e.g. 1-10 -> 0.1-1; 11-20 -> 10-100)
@mdabrowski1990 mdabrowski1990 added the implementation Changes to code label Feb 9, 2021
@mdabrowski1990 mdabrowski1990 added this to the Database introduction milestone Feb 9, 2021
@mdabrowski1990 mdabrowski1990 removed this from the X) Database introduction milestone Sep 6, 2021
@mdabrowski1990 mdabrowski1990 changed the title Intoduce Data Record: Calculated Physical Value [refine] Intoduce Data Record: Calculated Physical Value Sep 8, 2021
@mdabrowski1990 mdabrowski1990 changed the title [refine] Intoduce Data Record: Calculated Physical Value Intoduce Formula Data Record: (signal for message database) Oct 30, 2024
@n135c10r n135c10r self-assigned this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementation Changes to code
Projects
None yet
Development

No branches or pull requests

2 participants