Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ascii conversion w/ 7 bits
Message
De
15/01/2003 23:34:14
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00741726
Message ID:
00742234
Vues:
24
>Sorry but now I'm stuck w/ couple more things.

I never really did this in practice - so please try to find additional information elsewhere. I am helping you with my theoretical knowledge on the subject.

>When constructing the data packet, do I just build a string containing all the binaries and chain them together, end to end? Such as: cData="100011010010001000011000"

In principle yes, but the 1s and 0s represent bits, not bytes. 8 bits together make up one byte. So, for instance, if you set cDATA = "A", you are sending the character 65, that is, in binary, "01000001".

> or do I put spaces or CR's between them? Or something entirely different?

I think the receiving end expects one byte after another. You don't need a separator.

>And I assume when you say I need to add the last bit to send it as an even parity, so it's (8) digit of 0's & 1's that I need to send. Or do I need to send (7) 0's & 1's and then the receiving server add's the last bit?

You have to send the additional bit. The idea of the parity is that the sender sends an additional bit, calculated so that the number of 1s is even. If the receiver then receives an odd number of 1s in a byte, the receiver knows that something went wrong in the transmission.

>And finally, how does one calculate a Longitudinal Redundancy Check of this packet?

If you mean cyclical redundancy check, I don't think it is required. I mentioned it for purposes of comparison - the cyclical redundancy check is another, more sophisticated, method to check for errors in data transmission. In the present case, you only have to worry about the "even parity" stuff.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform