probleme de communiaion

Posté par stefcna le 19/5/2009 11:09:51
Bonjour,

J ai recu une machine avec qui je dois communiquer pour qu elle m envo des données et j ai recu simplement ce code la :


Initial value of setting related to TCP/IP
Network IP Address 192.168.2.211
Net Mask 255.255.255.0
Default Gateway 192.168.2.254
Listen Port 54321
Conection1 Use Conection2-8 Not Use
Connection Type TCP Client
Remote IP Address 192.168.2.1
Remote Port 12345
Form of a Packet
A packet consists of ASCII character strings and a <CR>(carriage return=0x0d) is “terminated”.
5
The command of basic Communication Command
N command (from Receiver to HOST)
Nhhhhx-----x<cr>
To send (Data index number (hhhh) to be sent) next time and name (x---x) of Receiver.
'hhhh' is character strings in hexa-decimal with fixed 4 digits.(0000 to FFFF)
'x-----x is ASCII character strings extendable up to 32 characters(max.).
Receiver send ‘N command’ upon finishing connection with successfully.
If host does not receive N command within 10 second, host will cut the connection.
Note: About (Data index number to be sent)
In case that it sent the number up to '0010', 'hhhh' will be '0011'.
Upon turning on power switch, if it has not started measuring,or if it has not read any tag data after start measuring, it will be '0000'.
S command (from HOST to Receiver)
Shhhh<cr>
To let Receiver start sending data from Data index number 'hhhh'.
In case that it has already started sending data, data index number shall be altered by 'hhhh'.
'hhhh' is character strings in hexa-decimal with fixed 4 digits. (0000 - FFFF)
Note: Processing at Receiver side.
It will not change Pointer which manage sending data at that time when (Data index number -1) appointed by S command does not exist at that time.
It will change Pointer at that time when Data index number is '0000' appointed by
‘S command’.
It will not send data unless it receives S command from HOST after successful connection and issuing ‘N command’.
E command (from HOST to Receiver)
E<cr>
To let Receiver stop sending data.
If it stops sending data, it will not do anything.
D command (from Receiver to HOST)
Dx-----------x<cr>
Receiver will send tag data to HOST up to the time when it receives 'E command' or it cuts connection since it receives 'S command' after successful connection.
'x-----------x' is Tag data.




est ce que quelqu un saitl interpreter merci

Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=19&topic_id=6200&post_id=24704