Hi, John M. Dlugosz Thanks for your help! here I elaborate my question.
First, the prog I intend to finish is to provide data to remote server. Data transfer could be by ethternet, serial etc.
Second, whatever way of transfer, the process runs over a request-answer-mode protocol which is defined by server side and exist already. it's like
Send:(data request packet)
68 15 15 68 73 01 00 78 01 06 01 00 0B 01 05 19 0B CA 03 06 1E 0B
+CA 03 06 03 16
Receive:(confirm)
E5
Step 2:
Send :(request data)
10 5A 01 00 5B 16
Receive :(data)
68 15 15 68 28 01 00 78 01 07 01 00 0B 01 05 19 0B CA 03 06 1E 0B
+CA 03 06 B9 16
as I mentioned in this thread before, every byte has its own meaning d
+efined by protocol, e.g. length of data, checksum, end flag.
Third, I've had some experience about pack/unpack, but I've stuck most because I feel like many details about implementation of this protocol is ahead. like,
- How can I assert the data packet send from server is finished? because the size of data packet is variable by waiting time or check the end char?
- How check checksum?
- if the data packet is broken, how can I treat this session? close this session or wait the next packet?
- ...
Since I have no any experience about this, I have many questiones to be insighted. Before I indulge into the similar impleation in C, I'd like to know if there is relative mature implementation in perl.
I hope gurus here could help me out! Thanks!
I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.