How to read multiple objects (not properties) at once using .Net Bacnet library

119 views Asked by At

I am experimenting the usage flexibility of BACnet .NET Library hosted in this GitHub repo, now that I checked the example codes and tried the following function which is working perfectly to read property form the device.

private string ReadScalarValue(BacnetClient sender, BacnetAddress adr, BacnetObjectId BacnetObjet, BacnetPropertyIds Propriete)
{
    try
    {
        IList<BacnetValue> NoScalarValue;

        if (sender.ReadPropertyRequest(adr, BacnetObjet, Propriete, out NoScalarValue) == false || NoScalarValue?.Count == 0)
            return String.Empty;

        return NoScalarValue?.First().Value?.ToString() ?? String.Empty;
    }
    catch
    {
        return String.Empty;
    }
}

I to read the multiple properties they provided another method called "ReadPropertyMultipleRequest", which honestly speaking I haven't tested yet, but it seems it will fetch the multiple properties of single/specific device object.

My question is how I can read the single property e.g. "PROP_PRESENT_VALUE" of multiple device objects.

1

There are 1 answers

0
Edward On

Multiple Device Objects implies multiple devices (physical or virtual). A BACnet Device can only have one Device Object A Read_Property_Multiple, even though it can span multiple objects and properties, can only include objects/properties inside the addressed device.

i.e. You can't.