UDP sensor data receiving and TCP request response Implemented#6
Merged
Conversation
Implemented UDP receiving thread along with handshake validation for the sender.
Added udp data sender simution, implemented the data collector thread, which gets notified when the udp data receiver thread receives data and pushes to queue. Then the thread will route the data to sensor data receiver.
…ll DataPool receives the data Implemented the JSON parsing logic in SensorDataReceiver, created a struct SensorData which will be having the Sensor data present in the JSON. After successful parsing and Validation, the fetched data will be sent to DataPool for storing there. Changed the name of deploy.sh script to run.sh for match it's action, added coredump in the run script for debugging.
…r JsonParser As Config Parser contains JSON parsing, and all JSON releated activities should be performed under jsonparser module, it is moved from SensorMoniteringHubManager module to JsonParser module
…RequestService Implemented code for socket creation and binding (TCP) for Client Request Service, removed NotificationSender module and added ClientRequestService class which will be handling the requests from TCP client and responds them. Modified the config file with extra params for port details to which client will be communicating.
…tion Implemented till receiving the raw string and sending to clientRequestService for further processing. Next actions: Parse the string to JSON, set flags regarding which request it is and relevant details during JSON parsing, call the right API from datapool, with the gathered data, form the JSON, make it as string, respond back to the client.
…ation II Added JSON parsing for incoming request in JSON parser, added struct (RequestData) for filling and handling request data
…tion III Added TCP query simulator, started the implementation for RequestParser class for "GET_EVENTS" req (not completed), implemented the filtration of stored data in datapool on basis of zoneid and timestamp (with or without limit param), (for "GET_EVENTS" query)
…tion IV Implemented the complete flow for TCP req response for GET_EVENTS query
…tion V Implemented GET_LATEST query
Added implementation for handling TCP queries "GET_STATUS", "GET_STATS"
…pointers directly
Issue details:
std::function won't accept static method pointers directly
The ternary result needs both sides to be the exact same type — static methods decay to function pointers, not std::function
Because of this issue. Max memory calculated is 0, so UDP data was not accepting.
Fixed this issue
Added "GET_ZONES" and completed
UDP data receiving
UDP data parsing and validation
UDP parsed and validated data storage
TCP request
TCP request parsing and validation
TCP response acquisition from storage
TCP response send back to client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completed the following