Dear developers and everybody working with Californium,
I don't know if this is the right place to post my question.
I am working on a system with wireless sensors interacting with a resource directory, and I am using cf-rd as the resource directory. My sensor is sending a get message to the RD to retrieve the root resource of the rd, as described in the draft, paragraph
5.1 (draft dated 11 december 2013). Then, I send a post message with the link-format resource that I want to register in the rd. When the lifetime of the resource expires, ExpiryTask and then ValidationTask are run (I am talking about the file RDNodeResource.java).
I have noticed that ValidationTask prepares a GET message, to be sent to the sensor. I suppose the purpose of this message is to alert the sensor of the forthcoming resource cancellation from the RD, and cause a possible update. The function validationRequest.waitForResponse
causes serverMessageDeliverer to be run, which, according to my understanding, fails execution when doing findResource: in fact, getChild(sensor_URI) does not find any child resource and so validationRequest then prints on screen:
Did not find resource [aaaa:0:0:0:280:e103:0:7be3:5683, .well-known, core]
The address is the address of my sensor (the sensor_URI).
I can't figure out why this is happening, considering that if I use Copper I can easily access that location and check all the resources on the sensor board.
Another thing which I don't understand, is the fact that since the RD can't find the resource, it doesn't remove it from it's records, as it can be deduced from the last if-else statements in RDNodeResource.
I am sorry if this message is a bit naive or what, and I apologize if this is not the right place for questions like this. I have only a little experience in this field, but I am willing to learn more.
I wait for your reply,
Giulio
|