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

B08 get custom report #294

Merged
merged 12 commits into from
Jan 10, 2024
Merged

B08 get custom report #294

merged 12 commits into from
Jan 10, 2024

Conversation

SNSubramanya
Copy link
Contributor

This use case describes how the CSMS requests a Charging Station to send a report of all
Components and Variables limited to those that match ComponentCriteria and/or the list of
ComponentVariables. The result will be returned asynchronously in one or more
NotifyReportRequest messages.

@SNSubramanya SNSubramanya linked an issue Dec 18, 2023 that may be closed by this pull request
Signed-off-by: Soumya Subramanya <[email protected]>
@SNSubramanya SNSubramanya marked this pull request as ready for review January 4, 2024 15:29
Copy link
Contributor

@marcemmers marcemmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the code I think get_report_data can be way simplified now since it only gets called from get base report which only ever provides a report_base argument. The component_variables and component_criteria arguments are always nullopt there.

This probably also means that you can replace component_criteria_match with your function since it is not used anymore and some more simplifications following from that.

Signed-off-by: Soumya Subramanya <[email protected]>

Modify component_criteria_match

Signed-off-by: Soumya Subramanya <[email protected]>

change mutability

Signed-off-by: Soumya Subramanya <[email protected]>

report only component matchign the criteria

Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>

Push report values to vector

Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>

Send component variables not having, active,available or enabled

Signed-off-by: Soumya Subramanya <[email protected]>

Add a not supported criteria variable

Signed-off-by: Soumya Subramanya <[email protected]>

Send all variables of a component criteria component

Signed-off-by: Soumya Subramanya <[email protected]>

Send component variables NOT having component criteria except Problem

Signed-off-by: Soumya Subramanya <[email protected]>

fix formatting

Signed-off-by: Soumya Subramanya <[email protected]>

B08>FR.02

Signed-off-by: Soumya Subramanya <[email protected]>

Fix B08.FR.02

Signed-off-by: Soumya Subramanya <[email protected]>

return values if no instance is present

Signed-off-by: Soumya Subramanya <[email protected]>

return values if no variables are present in the request

Signed-off-by: Soumya Subramanya <[email protected]>

Add a condition for evse missing

Signed-off-by: Soumya Subramanya <[email protected]>

remove bug

Signed-off-by: Soumya Subramanya <[email protected]>

divide component queries into with and without variable values

Signed-off-by: Soumya Subramanya <[email protected]>

divide component variable into has variable and not

Signed-off-by: Soumya Subramanya <[email protected]>

intermidiate commit

Signed-off-by: Soumya Subramanya <[email protected]>

works for no instance

Signed-off-by: Soumya Subramanya <[email protected]>

Add more conditions

Signed-off-by: Soumya Subramanya <[email protected]>

Add comment

Signed-off-by: Soumya Subramanya <[email protected]>

make notSupported criteria readwrite

Signed-off-by: Soumya Subramanya <[email protected]>

change incorrect evse_id for EVSE component

Signed-off-by: Soumya Subramanya <[email protected]>

Generate report for no evse id

Signed-off-by: Soumya Subramanya <[email protected]>

comment out B08.FR.19

Signed-off-by: Soumya Subramanya <[email protected]>

revert to without B08.FR.19

Signed-off-by: Soumya Subramanya <[email protected]>

[Ver3] rewrite

Signed-off-by: Soumya Subramanya <[email protected]>

Tests for with variables and with/without evseId

Signed-off-by: Soumya Subramanya <[email protected]>

fix fomatting

Signed-off-by: Soumya Subramanya <[email protected]>

Fix bug in B08.FR.02

Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>

Fix formatting

Signed-off-by: Soumya Subramanya <[email protected]>

formatting

Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>

fix bug in matching

Signed-off-by: Soumya Subramanya <[email protected]>

fix formatting

Signed-off-by: Soumya Subramanya <[email protected]>

fix more formatting

Signed-off-by: Soumya Subramanya <[email protected]>

some more strange formatting

Signed-off-by: Soumya Subramanya <[email protected]>

PR changes

Signed-off-by: Soumya Subramanya <[email protected]>

fix formatting

Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Copy link
Contributor

@marcemmers marcemmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question left, otherwise looks good to me


// if a criteria is not supported then send a not supported response.
auto sup_criteria =
this->device_model->get_optional_value<std::string>(ControllerComponentVariables::SupportedCriteria);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if this optional value is not implemented? What do you want to happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... that would void one of the requirements ...

@marcemmers marcemmers self-requested a review January 10, 2024 13:41
@SNSubramanya SNSubramanya merged commit f79c7cd into main Jan 10, 2024
3 checks passed
@SNSubramanya SNSubramanya deleted the B08-get-cutom-report branch January 10, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use case B08: Get custom report
2 participants