Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » Ask a question about subscribe a lamp event(How to get DAO value?)
Ask a question about subscribe a lamp event [message #1735402] Sat, 18 June 2016 12:46 Go to next message
Emelie Chen is currently offline Emelie ChenFriend
Messages: 3
Registered: June 2016
Junior Member
Hi all
I would like to get
ShortName.CURRENT_BYTE_SIZE cs value from the lamp example.
@XmlElement(required = true, name = ShortName.CURRENT_BYTE_SIZE)
@XmlSchemaType(name = "nonNegativeInteger")
How can I get DAO value from the Lamp IPE Example?
Do you have any sample code?
Thanks for your help!!

Emelie Chen
Re: Ask a question about subscribe a lamp event [message #1735902 is a reply to message #1735402] Thu, 23 June 2016 13:15 Go to previous messageGo to next message
Guillaume Garzone is currently offline Guillaume GarzoneFriend
Messages: 38
Registered: April 2015
Member
Hello,

Could you please clarify a bit?
I don't really understand: are you trying to get the current byte size value of a specific container through the REST Api, or directly in the code?

Regards,
Guillaume
Re: Ask a question about subscribe a lamp event [message #1737772 is a reply to message #1735902] Tue, 12 July 2016 18:31 Go to previous messageGo to next message
Emelie Chen is currently offline Emelie ChenFriend
Messages: 3
Registered: June 2016
Junior Member
My purpose is to directly access H2 database value.
The lamp sample code includes some data resocure tree. Whenever I click the lamp0, lamp1 and I can see the lamp information, for example, resource byte size, location, type, etc. in the webUI.
I think these resource information is sotred in a xml file for H2 database.
I hope to access the H2 databse. Do you have any sample code for this? Thanks a lot.
Re: Ask a question about subscribe a lamp event [message #1737774 is a reply to message #1737772] Tue, 12 July 2016 18:36 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 227
Registered: November 2013
Senior Member
Hello Emelie

Technically it is possible. But, I don't understand why you need to have such direct access to the H2 database. This is against the concept of interoperability. Why not simply access the information through the current Restful API ? Do you something missing ?
Please give more details about your use case.

You are welcome.
Re: Ask a question about subscribe a lamp event [message #1737788 is a reply to message #1737774] Wed, 13 July 2016 00:13 Go to previous message
Emelie Chen is currently offline Emelie ChenFriend
Messages: 3
Registered: June 2016
Junior Member
I am just curious that how to compute each lamp on/off "cs" value to sum the "cbs" value because I can't see the source code in the om2m source code. I think you store the "cs" value in the H2 database and after that it can easily to do DAO manager easily and compute the accumulate value.
I don't know which REST API can do this. Is is possible to do by JAXB? How can I do?
Thanks.
  • Attachment: lamp.png
    (Size: 121.63KB, Downloaded 59 times)
  • Attachment: lamp3.png
    (Size: 149.77KB, Downloaded 53 times)
  • Attachment: lamp2.png
    (Size: 145.70KB, Downloaded 56 times)
Previous Topic:Communication between two plugins
Next Topic:Two general questions: Managing library dependencies and referencing local directories
Goto Forum:
  


Current Time: Wed Nov 14 09:44:31 GMT 2018

Powered by FUDForum. Page generated in 0.01736 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top