LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

[LabWindows] tcp/ip hexa

Hello

I need to send / receive requests for the TCP / IP using LabWindows.

 
My requests are as hexadecimal strings: '00, 00,01,02, FF, 00 '.
In the example given by LabWindows, the data is sent to a string of char.
So I joined a convertiseurs Hexadécimalen my requests in ASCII.
The worry: when I want to send the character 'NUL' or are corresponding hexadecimal 0x00, which is simply not sent.
Indeed on the request that I récuper with a network analysis tool for the request: '00, 00,01,02, FF, 00' I truly shipments: '01, 02, FF'.

Do you have an idea how I could send to the type of request?

In advance, thank you.

Antelme

 

P. S.
Esque functions sending / receiving will be easily integrated to create a DLL in TestStand?
Because the functions are called in CALLBACK so I wonder if it is compatible.

 [Sorry for my english, I used google translation]

0 Kudos
Message 1 of 2
(2,752 Views)

One common error when treating binary data is to use string-related functions like for example strlen (): since the null character is the normal string terminator for C language, everything past the first nul byte is not considered by such functions. So for example if you are using ServerTCPWrite (..., string, strlen (string), 0); and 'string' contains nul bytes the embedded strlen will return a lenght shorter than data in the string. If this is the case, you will need to put away all string functions and manually track data  lenght to be used when accumulating data to the string and transmitting it over TCP.

 

If this is not the case we will need some more details over the way you are sending your data on the network.

 

If you are not comfortable discussing in English you may post this discussion to the French forum, as I seem to understand French is you preferred language.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,742 Views)