2626@option (
2727 "-o" ,
2828 "--output" ,
29- help = "file to save received data" ,
29+ help = "File to save received data" ,
3030 type = File ("wb" , encoding = "utf8" , lazy = True )
3131)
3232@option (
3333 "--eof" ,
34- help = "end -of-file marker (i.e. the last line to receive)" ,
34+ help = "End -of-file marker (i.e. the last line to receive)" ,
3535 type = str ,
3636 default = ""
3737)
3838@option (
3939 "--autoclose/--no-autoclose" ,
40- help = "close transfer automatically upon timeout or when EOF is received" ,
40+ help = "Close transfer automatically upon timeout or when EOF is received" ,
4141 default = True
4242)
4343@option (
4444 "--include-eof/--no-include-eof" ,
4545 help = (
46- "wether the EOF marker is part of the output format "
46+ "Wether the EOF marker is part of the output format "
4747 "(or just sent by the instrument regardless of the format in question)"
4848 ),
4949 default = False
5050)
5151def cli_download (** kwargs : Any ) -> None :
52- """Receive data sent from the instrument."""
52+ """
53+ Receive data sent from the instrument.
54+
55+ This command is intended to receive and save ASCII or extended ASCII
56+ documents line by line, such as typical data exports from instruments.
57+
58+ To sucessfully receive the data, the program has to be started before the
59+ instrument starts sending the lines.
60+
61+ Since not all ASCII export formats have an EOF marker, the download can be
62+ closed by two mechanisms if no marker is set. The process can be closed
63+ manually by keyboard interrupt once all data expected was received.
64+ Alternatively the process can close automatically at the first connection
65+ timeout (only if a first line was ever received, otherwise the program
66+ waits indefinitely and has to be interrupted manually).
67+ """
5368 from .app import main_download
5469
5570 main_download (** kwargs )
@@ -63,20 +78,34 @@ def cli_download(**kwargs: Any) -> None:
6378@com_port_argument ()
6479@argument (
6580 "file" ,
66- help = "data file to upload" ,
81+ help = "Data file to upload" ,
6782 type = File ("rt" , encoding = "ascii" )
6883)
6984@com_baud_option (1200 )
7085@com_timeout_option ()
7186@option (
7287 "-s" ,
7388 "--skip" ,
74- help = "number of header rows to skip" ,
89+ help = "Number of header rows to skip" ,
7590 type = IntRange (min = 0 ),
7691 default = 0
7792)
7893def cli_upload (** kwargs : Any ) -> None :
79- """Upload ASCII data to the instrument."""
94+ """
95+ Upload ASCII data to the instrument.
96+
97+ This command can be used to send ASCII data line by line to an instrument,
98+ that supports serial data transfer. Such data can be a CSV formatted
99+ coordinate list, or an instrument specific format type (e.g. Leica GSI,
100+ Sokkia SDR).
101+
102+ To ensure the successful reception of the data, it is recommended to use
103+ 1200 baud. At higher speeds the instrument might not be able to process the
104+ data quickly enough, leading to the receiving buffer filling up, which will
105+ result in loss of data.
106+
107+ The instrument should be set to receiving mode before starting the upload.
108+ """
80109 from .app import main_upload
81110
82111 main_upload (** kwargs )
0 commit comments