probleme de communiaion
Stagiaire WDF
Inscrit:
08/02/2005 16:58
Post(s): 4
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

Contribution le : 19/05/2009 11:09
Créer un fichier PDF de la contribution Imprimer



 Haut   Précédent   Suivant




Enregistrer votre réponse
CompteNom   Mot de passe   Authentification
Message:


Vous ne pouvez pas débuter de nouveaux sujets.
Vous pouvez voir les sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

[Recherche avancée]


Connexion
Menu
Chercher WDForge
Chercher Web
Partenaires
Visualiser tous les Partenaires...
WinDev, WebDev, WinDev Mobile et HyperFile sont des marques déposées par PCSoft. |  Voter |  Legal |  Contact |   XOOPS 2.0.13.2