This is probably a common problem with reading responses from RS232 devices but I can't seem to find a concrete answer anywhere.
Basically I'm trying to get a response from a device when I send in a list of values from an array. E.g The array would contain a string for requesting the volume value from a device as well as microphone value as another value.
What seems to be happening from what I understand is there are not enough bytes available in the inputstream when a request is made so thats why the answer is in pieces. I.E printing out each line in the buffer returns:
Vol
080
Where it should be Vol080.
Here's is my class, ignore the parts with "oldvalues" and "parsedvalues" as thats code related to other parts of my code.
Basically I'm trying to get a response from a device when I send in a list of values from an array. E.g The array would contain a string for requesting the volume value from a device as well as microphone value as another value.
What seems to be happening from what I understand is there are not enough bytes available in the inputstream when a request is made so thats why the answer is in pieces. I.E printing out each line in the buffer returns:
Vol
080
Where it should be Vol080.
Here's is my class, ignore the parts with "oldvalues" and "parsedvalues" as thats code related to other parts of my code.