How to find the length of a buffer?

Guys,

My inverters send in responses to queries on UDP port 8899 - there is no differentiation or ability to say for different inverters to send to different ports etc.

I have 3 inverters talking and they all send responses to different commands to the same port.

So i need to be able to switch the inputs based on buffer length (different requests have the same response length each time) so for instance if the incoming stream is 89 bytes i know that is a response to an ID query so i would want to send that off to a buffer parser to decide which device it is by parsing through the data

On the other hand some of the queries will return info that is 129 bytes long and i will need to send that to a different parser

Is there a buffer.length property or something similar ?

Craig

I got it - its just the length of the payload - i was over thinking it again

Craig

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.