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

Feature Request: Direct Measurement Upload Without Local Storage #48

Open
markuskae opened this issue Oct 24, 2023 · 6 comments
Open

Feature Request: Direct Measurement Upload Without Local Storage #48

markuskae opened this issue Oct 24, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@markuskae
Copy link
Collaborator

Enable direct measurement upload without the need to save them on the computer first.

@MaxClerkwell MaxClerkwell added the enhancement New feature or request label Oct 24, 2023
@R-Abbasi
Copy link
Collaborator

Do you mean instead of storing the buffers in msg:

std::string msg{ID};
// have each entry on a new line
msg += '\n';
msg += vinBuffer;
msg += '\n';
msg += milage;
// ...
if (ImGui::Button(" Send "))
{
    // example url
    const std::string url{"https://raw.githubusercontent.com/skunkforce/omniview/"};
    sendData(msg, url);
 }

use them directly for uploading:

if (ImGui::Button(" Send "))
{
    // example url
    const std::string url{"https://raw.githubusercontent.com/skunkforce/omniview/"};
    sendData(std::move(std::string(ID) + "\n" + vinBuffer + "\n" + milage), url);
 }

?

@AKMaily
Copy link
Collaborator

AKMaily commented Feb 26, 2024

I believe he is referring to the current implementation. The data can be sent along with the message in the 'Generate Training Data' menu, even if the user has not saved the measurement before. @R-Abbasi

@AKMaily
Copy link
Collaborator

AKMaily commented Apr 23, 2024

To address this issue, we need to implement two methods for sending data. Currently, sending data to the FFT API works regardless of whether the data has been saved or not, as the FFT API requires a JSON string. However, the battery API requires a file, necessitating that the data be saved, at least temporarily. The HUB API, on the other hand, accepts both approaches. @R-Abbasi, what are your thoughts on the best approach to handle all of these scenarios?

@R-Abbasi
Copy link
Collaborator

R-Abbasi commented Apr 23, 2024

The data (measurement values and string literals) are all inserted into a JSNO object in memory and then sent to the server. The object will be destroyed at the end of its block automatically, so nothing is required to be saved on machine's disk using the Generate Training Data popup.
#142

@AKMaily
Copy link
Collaborator

AKMaily commented Apr 24, 2024

For the HUB API a .csv file is required because this API does not expect a JSON but a .csv file. @R-Abbasi Only the analyze APIs currently require a JSON. Therefore we need to implement two ways to send the data to this different APIs in different formats. I would appreciate your insights on the most effective approach to accomplish this.

@R-Abbasi
Copy link
Collaborator

I'm not much experienced in networking but I guess the case is not that complex. If the data itself is sufficient for an API, we can put that data into a container and still use the http POST service to upload it. If an API needs a file in a specific format, that could also be handled using the FTP protocol, supposedly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants