Comments (3)
Hi @joproulx, thanks for sharing details with your issue. So far I only had segmentation in responses but BACnet supports also segmentation in requests, so your use case if valid.
Does this imply that segmentation on transmit is not supported? Or there is a different way to achieve this, that I don't see?
Unfortunately, based on my quick review, this codebase is not prepared to send requests in more than one frame. There are fragments that seem prepared for that:
Lines 40 to 44 in 9a7e227
but BacnetPduTypes.SEGMENTED_MESSAGE
is never set in case of sending confirmed service request.
If segmentation on transmit is not supported, what would be the best way to determine that my request is too big?
First of all, as a workaround, I suggest you split your request into two or more (asking for a subset of all the properties you need) and then combine the responses (I guess you know this but just in case anyone reading this doesn't).
I think currently you won't know your request is too big unless you try to send it (and fix the silent error).
If I were to send a PR to help fix the silent error, what would you suggest? Log an error in that case? Or let the exception bubble up?
Originally this codebase was in C/C++ and later was ported to C#. That's why you don't get exceptions in most places but rather result codes or boolean results. As a C# developer however, I would expect an exception to be thrown when I try to send something that can't be sent. I don't know however where would be the best place to determine it - you can suggest something.
from bacnet.
Ok thanks for the explanation @gralin. I split the ReadPropertyMultipleRequest
as suggested and it works fine.
Originally this codebase was in C/C++ and later was ported to C#. That's why you don't get exceptions in most places but rather result codes or boolean results. As a C# developer however, I would expect an exception to be thrown when I try to send something that can't be sent. I don't know however where would be the best place to determine it - you can suggest something.
I see. your point. I would suggest to just avoid swallowing the exception and let it bubble up.
But again, this is not a critical issue since it doesn't really break any functionality.
Thanks again for your answer!
from bacnet.
Sure, I agree, I would only wrap the original exception with something more meaningful than OutOfRangeException
, so that it's clear that you are trying to send too much data and since segmentation of requests is not implemented, this has failed. Feel free to submit a PR if you want to improve the codebase.
from bacnet.
Related Issues (20)
- problem with 'shared port' in bacnet ip/udp module HOT 1
- Setting up a notification class
- Trouble Publishing Due to Out-Of-Date Dependencies HOT 1
- Throws exception when parsing 'BacnetAddress' structure with broadcast mac address HOT 1
- IndexOutOfRangeException when calling BacnetClient.ReadPropertyResponse
- Setting `.DontFragment` on `UdpClient` on MacOS fails with an exception HOT 1
- SEGMENTATION NOT SUPPORTED WHEN REQUESTING DEVICE WITH MANY OBJECT PROPERTIES HOT 5
- Secure Bacnet (BACnetSC)
- BasicReadAndWrite Example got Nullreference exception when reading Analog input HOT 1
- Is it Possible to Create a BACnet/IP to BACnet/MSTP Router using This Library?
- VS2022 Compile issues with BasicReadWrite Example
- YABE compatibility
- ExceptionSchedule Property - Write
- Notification Class not receiving all notifications in .Net 6.0 Windows/Linux
- Problem in Discovering devices in a network from docker container running in Ubuntu 18 HOT 2
- Decode error when reading PROP_ACTIVE_COV_SUBSCRIPTIONS HOT 2
- False negative address comparison for some BACnet Devices HOT 1
- Error on notification class reception
- Failed to read property PROP_OBJECT_LIST
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bacnet.