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

Getting ven_id in the process of registering a report #121

Open
c-zam opened this issue Jun 16, 2022 · 3 comments
Open

Getting ven_id in the process of registering a report #121

c-zam opened this issue Jun 16, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@c-zam
Copy link

c-zam commented Jun 16, 2022

Hello Stan.
I have a VTN-server on which I am trying to register/update a report. If I use "compact mode" for registration I get ven_id like this:

async def on_register_report(ven_id, resource_id, measurement, unit, scale, min_sampling_interval, max_sampling_interval):
    myVenId = ven_id

But, if I use "full mode" i'm having problems:

async def on_register_report(report):
    myVenId = ???

The same situation for "on_update_report(payload)".

Maybe I'm doing something wrong or I don't understand something... Could you help me?
Thanks for your work.

@stan-janssen
Copy link
Member

Hm, that might have been an oversight. I know I added ven_id to the 'normal' report mode a while back, but I must not have added it to the full mode. I'll have to add that to the interface.

Can I ask what the reason for using the full mode is? Is there a use case that the normal mode does not cover?

@c-zam
Copy link
Author

c-zam commented Jun 17, 2022

Yes, sure. I will try to explain my case. I have a NOSQL database with two tables for reports.

First table for report meta data with following columns - ven_id, report_specifier_id, measurement, unit, scale, ...
If I use "normal" mode, I can't get the "report_specifier_id" parameter. If I use "full" mode, I can't get the "ven_id" parameter.

Second table for report payload with following columns - ven_id, report_specifier_id, date_time, value, ...
For this table I can't get "ven_id" parameter when executing the function "on_update_report(payload)".

@c-zam
Copy link
Author

c-zam commented Jun 17, 2022

I have attached the modified "report_service.py" file which helped me solve my issue. Perhaps this will be of interest to you.
report_service.zip

@axmsoftware axmsoftware added the bug Something isn't working label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants