Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExceptionSchedule Property - Write #131

Open
VitorKawao opened this issue Nov 17, 2023 · 0 comments
Open

ExceptionSchedule Property - Write #131

VitorKawao opened this issue Nov 17, 2023 · 0 comments

Comments

@VitorKawao
Copy link

VitorKawao commented Nov 17, 2023

Hello,
I am trying to read the property exceptionSchedule from object Schedule, but the api throws an exception. I can read correctly but I cannot write.

Using a simple exemple (below), reading than trying to write the same value

BacnetClient _client = new BacnetClient(new BacnetIpUdpProtocolTransport(30051, false));
_client.Start();

BacnetAddress bacnetAddress = new BacnetAddress(BacnetAddressTypes.IP, "192.168.1.152");

BacnetObjectTypes bacnetObject = BacnetObjectTypes.OBJECT_SCHEDULE;
BacnetPropertyIds propertyIds = BacnetPropertyIds.PROP_EXCEPTION_SCHEDULE;
uint instance = 1;
BacnetObjectId objId = new BacnetObjectId(bacnetObject, instance);

_client.ReadPropertyRequest(bacnetAddress, objId, propertyIds, out IList<BacnetValue> valueList);
_client.WritePropertyRequest(bacnetAddress, objId, propertyIds, valueList);

It throws an encode exception, because value.Value is not a IEncode, it is a BacnetValue[]
image

Trying to do something like this
image

It stops to throw this exception, but it send another one: "Reject from device, reason: MISSING_REQUIRED_PARAMETER"

image

Am I doing something wrong?

Thank you,
Vítor Guedes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant