File Transfer¶
Description¶
Module: geocompy.geo.ftr
Definitions for the GeoCOM File transfer subsystem.
Types¶
GeoComPFTR
Definitions¶
- class GeoComFTR(parent: GeoComType)[source]¶
File transfer subsystem of the GeoCOM protocol.
This subsystem provides access to the internal file system of the instrument, and provides methods to list or download files.
Added in version GeoCOM-TPS1200.
- Parameters:
- parent: GeoComType¶
The parent protocol instance of this subsystem.
- abort_download() GeoComResponse[None][source]¶
RPC 23305,
FTR_AbortDownloadAborts current file download setup.
- Return type:
See also
- abort_listing() GeoComResponse[None][source]¶
RPC 23308,
FTR_AbortListAborts current file listing setup.
- Return type:
See also
-
delete(filename: str, time: datetime | None =
None, device: Device | str =Device.CFCARD, filetype: File | str =File.UNKNOWN) GeoComResponse[int][source]¶ RPC 23309,
FTR_DeleteDeletes one or more files. Wildcards can be used to delete multiple items. If a date is given, only files older than that date are deleted.
- Parameters:
- Returns:
- Params:
int: Number of files deleted.
- Error codes:
IVPARAM: Memory device unavailable, or cannot find file path.
- Return type:
See also
-
delete_directory(dirname: str, time: datetime | None =
None, device: Device | str =Device.INTERNAL) GeoComResponse[int][source]¶ RPC 23315,
FTR_DeleteDirAdded in version GeoCOM-VivaTPS.
Deletes one or more directories. Wildcards can be used to delete multiple items. If a date is given, only directories older than that date are deleted.
- Parameters:
- Returns:
- Params:
int: Number of directories deleted.
- Error codes:
IVPARAM: Memory device unavailable, or cannot find file path.
- Return type:
See also
- download(block: int) GeoComResponse[bytes][source]¶
RPC 23304,
FTR_DownloadDownloads a single data block of a previously defined download sequence.
- Parameters:
- Returns:
- Params:
bytes: Data block.
- Error codes:
FTR_MISSINGSETUP: No active download setup.FTR_INVALIDINPUT: First block is missing.FTR_FILEACCESS: File access error.
- Return type:
See also
- download_large(block: int) GeoComResponse[bytes][source]¶
RPC 23314,
FTR_DownloadXLAdded in version GeoCOM-VivaTPS.
Downloads a single data block of a previously defined large file download sequence.
- Parameters:
- Returns:
- Params:
bytes: Data block.
- Error codes:
FTR_MISSINGSETUP: No active download setup.FTR_INVALIDINPUT: First block is missing.FTR_FILEACCESS: File access error.
- Return type:
See also
-
list(next: bool =
False) GeoComResponse[tuple[bool, str, int, datetime | None]][source]¶ RPC 23307,
FTR_ListGets a single file entry according to the predefined listing setup.
- Parameters:
- Returns:
- Params:
bool: If file is last in listing.
str: Name of the file.
int: File size [byte].
datetime | None: Date and time of last modification.
- Error codes:
FTR_MISSINGSETUP: No active listing setup.FTR_INVALIDINPUT: First item is missing, or last call was already the last.
- Return type:
See also
-
setup_download(filename: str, blocksize: int, device: Device | str =
Device.CFCARD, filetype: File | str =File.UNKNOWN) GeoComResponse[int][source]¶ RPC 23303,
FTR_SetupDownloadPrepares download of the specified file of the specified type, on the selected memory device.
- Parameters:
- Returns:
- Params:
int: Number of download blocks needed.
- Error codes:
IVPARAM: Memory device unavailable, or cannot find file path.NOTOK: Setup already exists, previous setup was not aborted.FTR_INVALIDINPUT: Block size too big.FTR_FILEACCESS: File access error.
- Return type:
See also
-
setup_large_download(filename: str, blocksize: int, device: Device | str =
Device.INTERNAL, filetype: File | str =File.UNKNOWN) GeoComResponse[int][source]¶ RPC 23313,
FTR_SetupDownloadLargeAdded in version GeoCOM-VivaTPS.
Prepares download of the specified large file of the specified type, on the selected memory device.
- Parameters:
- Returns:
- Params:
int: Number of download blocks needed.
- Error codes:
IVPARAM: Memory device unavailable, or cannot find file path.NOTOK: Setup already exists, previous setup was not aborted.FTR_INVALIDINPUT: Block size too big.FTR_FILEACCESS: File access error.
- Return type:
See also
-
setup_listing(device: Device | str =
Device.CFCARD, filetype: File | str =File.UNKNOWN, path: str ='') GeoComResponse[None][source]¶ RPC 23306,
FTR_SetupListPrepares file listing of the specified file type, on the selected memory device.
- Parameters:
- Returns:
- Error codes:
IVPARAM: Memory device unavailable, or cannot find search path.NOTOK: Setup already exists, previous setup was not aborted.FTR_FILEACCESS: File access error.
- Return type:
See also