How to get current subscription status
-
Hello All,
I'm collecting data from devices using subscription with below parameters in the request.
SubscribeCOVRequest covRequest = new SubscribeCOVRequest( new UnsignedInteger(1), /* Process identifier; same for all subscription requests */ oid, /* Object identifier for subscription */ new Boolean( false ), /* Subscription request with unconfirmed notification; done to reduce overhead on my devices */ new UnsignedInteger( 3600 ) /* TTL in seconds */ );
As the TTL is set for an hour, after every one hour I re-subscribe them again.
Since I'm requesting unconfirmed notification, time-to-time I'm not getting any subscription for some of the objects at all.
Is there a way by which I can get the current subscription status of an object identifier in the device?
Appreciate any response on this.
Thanks
Manoj -
Hi Manoj,
I suspect you're looking for the LocalDevice's getCovContexts method, and maybe the CovReportingMixin's findCovSubscription method.
-
Hello Phildunlap,
Thank you very much for your quick response. Much appreciated !!
I got your point, will check on those two APIs over this weekend and let you know whether I'm able to find a solution.
Thank you very much.
Manoj