05-22-2014 05:24 PM
does any one have any experience of sending psh on the end of a tcp write command,
is there a method of ensuring each write has a tcp [psh] push code added at the end of the string.
I would prefer to keep the tcp rather than visa libraries as these allow the tcp callbacks to determine data ready
Many Thanks
05-27-2014 04:27 AM
I hope you are well.
I understand you would like to essentially concatiate a string to the end of your TCP write for example, your transmitted string may be "Hello World!" and you wish to concatinate "PSH" to the end of it so it reads "Hello World!PSH"
If this is correct then you will be able to use the strncat function.
Here is a screen shot taken from the CVI help file.
Kind Regards
05-28-2014 05:24 AM
Hi Kev
Thanks for the reponse, but I think you missed the point.
The tcp protocol uses flow control to determine whether communication is succesful. usually the receiver acknowledges the sender with an [ACK] to every message received, if the sender does not receive this [ACK] the sender retries. There is an option for the sender to add a [PSH] to let the receiver know this is the end of message and that it should now respond.
Adding [ACK] in the string would confuse the device listening, the [ACK] or [PSH] is not part of the message string but an additional structure on the TCP. Is there a method for setting up this in CVI.
05-28-2014 11:03 AM
I have answered my own qusetion..
I was addressing the device as port 23 , which would allow open and communication, however if addressing port 8081 (equipment port address) the correct tcp protocol is then observed.