Hello,
I'm creating multiple services in a Thing and i would like to know if it is possible to call function i've created in "Service1" in "Service2" ?
This to not rewrite the function again to have a proper code.
Thank you,
Best Regards,
You can call the service, but not a specific function inside that service, unless you set it up with some input parameters to function like that.
If you have functions you want to 're-use' you should create some 'Toolbox' Thing with those supporting services, or create an extension and add them as a resource.
Hi,
If I understand you correctly:
1. You have a Thing with two services, Service1 and Service2
2. To call Service1 from any other service of the same thing you can use the "me" like that.
result = me.Service1();
See the example attached.
Hope it helps.