Hello,
as this is my first post, I start by saying many thanks for bacnet4j, great work!
I am "updating" this thread because I have seen a couple of questions about implementing COV subscriptions, but not many answers.
The SimpleSubscriptionClient, which is mentioned in another thread, seems to be missing from the current release (?)
I also have difficulties with COV. More concretely:
I am trying to subscribe using the following method, passing it a RemoteDevice for which I have checked that d.getServicesSupported().isSubscribeCovProperty() returns true and an oid which corresponds to a Binary Input:
public int subscribeCOV(RemoteDevice d, ObjectIdentifier oid) {
SubscribeCOVRequest covReq = new SubscribeCOVRequest(new UnsignedInteger(0), oid, new Boolean(true), new UnsignedInteger(0));
try {
localDevice.send(d, covReq);
System.out.println("Subsciption of " + oid.getObjectType() + "-" + oid.getInstanceNumber() + " done.");
return Properties.SUCCESS;
} catch (BACnetException be) {
System.out.println("Unable to send <SubscribeCOVRequest> for the Object " + oid.getObjectType()+ "-" + oid.getInstanceNumber()+ ":\n"+ be.getMessage());
return Properties.FAIL;
}
}
and the exception occurs giving the message:
ErrorAPDU(choice=5, errorClass=Services, errorCode=Cov subscription failed)
Can someone tell me when and why this occurs?
Thanks a lot in advance. I will post again here if I solve the problem.
Best regards,
Gatos