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

Add generic response parsing #31

Merged
merged 20 commits into from
Nov 23, 2023
Merged

Add generic response parsing #31

merged 20 commits into from
Nov 23, 2023

Conversation

abeltrano
Copy link
Contributor

This pull request includes a wide range of changes to improve the functionality and structure of the codebase. The most important changes include adding a new header file for defining a struct representing key-value pairs in the WPA control protocol, rearranging header file inclusion and adding new functions and classes for parsing and handling response payloads.

Main interface changes:

  • linux/wpa-controller/include/Wpa/WpaKeyValuePair.hxx: Added a new header file defining a struct for key-value pairs in the WPA control protocol.
  • linux/wpa-controller/WpaCommandStatus.cxx: Rearranged header file inclusion, added a new function to create a response parser, and added a new class for parsing the response payload and setting the status state.
  • linux/wpa-controller/Hostapd.cxx: Modified the Hostapd::Ping() function and the GetStatus() function to use new classes and functions for handling responses. [1] [2]
  • linux/wpa-controller/WpaCommand.cxx: Added new member functions to the WpaCommand class for parsing responses.
  • linux/wpa-controller/WpaController.cxx: Modified the WpaController::SendCommand function to store the response payload and handle unknown errors.
  • linux/wpa-controller/CMakeLists.txt: Modified the CMakeLists.txt file to include new source files and rearrange header file inclusion. [1] [2] [3]
  • src/shared/notstd/CMakeLists.txt: Updated the header guard and added a new header file to the list of public headers.
  • linux/wpa-controller/include/Wpa/ProtocolHostapd.hxx: Added a new static member variable to represent a response status property key.
  • linux/wpa-controller/include/Wpa/ProtocolWpa.hxx: Added a new static member variable to represent the key-value delimiter in the WPA control protocol.
  • src/shared/notstd/include/notstd/Exceptions.hxx: Updated the header guard to avoid naming conflicts.
  • tests/unit/linux/wpa-controller/TestHostapd.cxx: Removed unused variable to eliminate unnecessary code.
  • linux/wpa-controller/include/Wpa/WpaController.hxx: Added a new member function and included necessary header files. [1] [2]
  • linux/wpa-controller/include/Wpa/WpaCommandStatus.hxx: Added necessary header files and improved the functionality of the struct. [1] [2]
  • linux/wpa-controller/WpaKeyValuePair.cxx: Added a new utility function to convert an enumeration value to its underlying type.
  • src/shared/notstd/include/notstd/Utility.hxx: Added a new header file containing a utility function for converting enumeration values.
  • linux/wpa-controller/include/Wpa/WpaCommand.hxx: Added necessary header files.
  • linux/wpa-controller/WpaResponseParser.cxx: Added a new source file containing the implementation of a response parser class.
  • linux/wpa-controller/include/Wpa/WpaResponseParser.hxx: Added a new header file containing the declaration of response parser structs.

@abeltrano abeltrano requested a review from a team as a code owner November 22, 2023 23:21
@abeltrano abeltrano merged commit 0dfbef3 into develop Nov 23, 2023
2 checks passed
@abeltrano abeltrano deleted the responseparsing branch November 23, 2023 00:14
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.

1 participant