@@ -21,26 +21,46 @@ pub enum HeaderType {
2121
2222#[ derive( PartialEq , Clone , Copy , Debug ) ]
2323pub enum ZFrameType {
24- RQInit = 0 , // Request receive init
25- RIinit = 1 , // Receive init
26- Sinit = 2 , // Send init sequence (optional)
27- Ack = 3 , // ACK to above
28- File = 4 , // File name from sender
29- Skip = 5 , // To sender: skip this file
30- Nak = 6 , // Last packet was garbled
31- Abort = 7 , // Abort batch transfers
32- Fin = 8 , // Finish session
33- RPos = 9 , // Resume data trans at this position
34- Data = 10 , // Data packet(s) follow
35- Eof = 11 , // End of file
36- FErr = 12 , // Fatal Read or Write error Detected
37- Crc = 13 , // Request for file CRC and response
38- Challenge = 14 , // Receiver's Challenge
39- Compl = 15 , // Request is complete
40- Can = 16 , // Other end canned session with CAN*5
41- FreeCnt = 17 , // Request for free bytes on filesystem
42- Command = 18 , // Command from sending program
43- StdErr = 19 , // Output to standard error, data follows
24+ /// Request receive init (s->r)
25+ RQInit = 0 ,
26+ /// Receive init (r->s)
27+ RIinit = 1 ,
28+ // Send init sequence (optional) (s->r)
29+ Sinit = 2 ,
30+ // ACK to RQInit, RInit or SInit (s<->r)
31+ Ack = 3 ,
32+ /// File name from sender (s->r)
33+ File = 4 ,
34+ /// To sender: skip this file (r->s)
35+ Skip = 5 ,
36+ /// Last packet was garbled (???)
37+ Nak = 6 ,
38+ /// Abort batch transfers (???)
39+ Abort = 7 ,
40+ /// Finish session (s<->r)
41+ Fin = 8 ,
42+ /// Resume data trans at this position (r->s)
43+ RPos = 9 ,
44+ /// Data packet(s) follow (s->r)
45+ Data = 10 ,
46+ /// End of file (s->r)
47+ Eof = 11 ,
48+ /// Fatal Read or Write error Detected (?)
49+ FErr = 12 ,
50+ /// Request for file CRC and response (?)
51+ Crc = 13 ,
52+ /// Receiver's Challenge (r->s)
53+ Challenge = 14 ,
54+ /// Request is complete (?)
55+ Compl = 15 ,
56+ /// Other end canned session with CAN*5 (?)
57+ Can = 16 ,
58+ /// Request for free bytes on filesystem (s->r)
59+ FreeCnt = 17 ,
60+ /// Command from sending program (s->r)
61+ Command = 18 ,
62+ /// Output to standard error, data follows (?)
63+ StdErr = 19 ,
4464}
4565
4666#[ derive( PartialEq , Clone , Debug ) ]
@@ -171,7 +191,7 @@ impl Header {
171191 header_type : HeaderType ,
172192 escape_ctrl_chars : bool ,
173193 ) -> TerminalResult < usize > {
174- println ! ( "send header:{:?} - {:?}" , header_type, self ) ;
194+ // println!("send header:{:?} - {:?}", header_type, self);
175195 com. send ( self . build ( header_type, escape_ctrl_chars) ) ?;
176196 Ok ( 12 )
177197 }
0 commit comments