digi.xbee.filesystem module¶
-
class
digi.xbee.filesystem.FileSystemElement(name, path=None, is_dir=False, size=0, is_secure=False)[source]¶ Bases:
objectClass used to represent XBee file system elements (files and directories).
Class constructor. Instantiates a new
FileSystemElementobject with the given parameters.- Parameters
name (String) – Name of the file system element.
path (String, optional, default=`None`) – Absolute path of the element.
is_dir (Boolean, optional, default=`True`) – True if the element is a directory, False for a file.
size (Integer, optional, default=0) – Element size in bytes. Only for files.
is_secure (Boolean, optional, default=`False`) – True for a secure element, False otherwise.
- Raises
ValueError – If any of the parameters are invalid.
-
property
name¶ Returns the file system element name.
- Returns
File system element name.
- Return type
String
-
property
path¶ Returns the file system element absolute path.
- Returns
File system element absolute path.
- Return type
String
-
property
is_dir¶ Returns whether the file system element is a directory.
- Returns
True for a directory, False otherwise.
- Return type
Boolean
-
property
size¶ Returns the size in bytes of the element.
- Returns
The size in bytes of the file, 0 for a directory.
- Return type
Integer
-
property
size_pretty¶ Returns a human readable size (e.g., 1K 234M 2G).
- Returns
Human readable size.
- Return type
String
-
property
is_secure¶ Returns whether the element is secure.
- Returns
True for a secure element, False otherwise.
- Return type
Boolean
-
static
from_data(name, size, flags, path=None)[source]¶ Creates a file element from its name and the bytearray with info and size.
- Parameters
name (String) – The name of the element to create.
size (Bytearray) – Byte array containing file size.
flags (Integer) – Integer with file system element information.
path (String, optional, default=`None`) – The absolute path of the element (without its name).
- Returns
The new file system element.
- Return type
-
exception
digi.xbee.filesystem.FileSystemException(message, fs_status=None)[source]¶ Bases:
digi.xbee.exception.XBeeException- This exception will be thrown when any problem related with the XBee
file system occurs.
All functionality of this class is the inherited from Exception.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
exception
digi.xbee.filesystem.FileSystemNotSupportedException(message, fs_status=None)[source]¶ Bases:
digi.xbee.filesystem.FileSystemExceptionThis exception will be thrown when the file system feature is not supported in the device.
All functionality of this class is the inherited from Exception.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
digi.xbee.filesystem.FileProcess(f_mng, file, timeout)[source]¶ Bases:
objectThis class represents a file process.
Class constructor. Instantiates a new
_FileProcessobject with the provided parameters.- Parameters
(class (f_mng) – .FileSystemManager): The file system manager.
file (
FileSystemElementor String) – File or its absolute path.timeout (Float) – Timeout in seconds.
-
property
running¶ Returns if this file command is running.
- Returns
True if it is running, False otherwise.
- Return type
Boolean
-
property
status¶ Returns the status code.
- Returns
The status.
- Return type
Integer
-
property
block_size¶ Returns the size of the block for this file operation.
- Returns
Size of the block for this file operation.
- Return type
Integer
-
class
digi.xbee.filesystem.FileSystemManager(xbee)[source]¶ Bases:
objectHelper class used to manage local or remote XBee file system.
Class constructor. Instantiates a new
FileSystemManagerwith the given parameters.- Parameters
xbee (
AbstractXBeeDevice) – XBee to manage its file system.- Raises
FileSystemNotSupportedException – If the XBee does not support filesystem.
-
property
xbee¶ Returns the XBee of this file system manager.
- Returns
XBee to manage its file system.
- Return type
-
property
np_value¶ The ‘NP’ parameter value of the local XBee.
- Returns
The ‘NP’ value.
- Return type
Integer
-
get_root()[source]¶ Returns the root directory.
- Returns
The root directory.
- Return type
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
-
make_directory(dir_path, base=None, mk_parents=True, timeout=20)[source]¶ Creates the provided directory.
- Parameters
dir_path (String) – Path of the new directory to create. It is relative to the directory specify in base.
base (
FileSystemElement, optional, default=`None) – Base directory. If not specify it refers to ‘/flash’.mk_parents (Boolean, optional, default=`True`) – True to make parent directories as needed, False otherwise.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion. If mk_parents this is the timeout per directory creation.
- Returns
List of
FileSystemElementcreated directories.- Return type
List
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
-
list_directory(directory=None, timeout=20)[source]¶ Lists the contents of the given directory.
- Parameters
directory (
FileSystemElementor String) – Directory to list or its absolute path.timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- List of :class:.FilesystemElement` objects contained in
the given directory, empty list if status is not 0.
- Return type
List
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
-
remove(entry, rm_children=True, timeout=20)[source]¶ Removes the given file system entry.
All files in a directory must be deleted before removing the directory. On XBee 3 802.15.4, DigiMesh, and Zigbee, deleted files are marked as as unusable space unless they are at the “end” of the file system (most-recently created). On these products, deleting a file triggers recovery of any deleted file space at the end of the file system, and can lead to a delayed response.
- Parameters
entry (
FileSystemElementor String) – File system entry to remove or its absolute path.rm_children (Boolean, optional, default=`True`) – True to remove directory children if they exist, False otherwise.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
-
read_file(file, offset=0, progress_cb=None)[source]¶ Reads from the provided file starting at the given offset. If there is no progress callback the function blocks until the required amount of bytes is read.
- Parameters
file (
FileSystemElementor String) – File to read or its absolute path.offset (Integer, optional, default=0) – File offset to start reading.
progress_cb (Function, optional, default=`None`) –
Function called when new data is read. Receives three arguments:
The chunk of data read as byte array.
The progress percentage as float.
The total size of the file.
The status when process finishes.
- Returns
The process to read data from the file.
- Return type
- Raises
FileSystemException – If there is any error performing the operation and progress_cb is None.
ValueError – If any of the parameters is invalid.
See also
-
write_file(file, offset=0, secure=False, options=None, progress_cb=None)[source]¶ Writes to the provided file the data starting at the given offset. The function blocks until the all data is written.
- Parameters
file (
FileSystemElementor String) – File to write or its absolute path.offset (Integer, optional, default=0) – File offset to start writing.
secure (Boolean, optional, default=`False`) – True to store the file securely (no read access), False otherwise.
options (Dictionary, optional) – Other write options as list: exclusive, truncate, append.
progress_cb (Function, optional, default=`None`) –
Function call when data is written. Receives three arguments:
The amount of bytes written (for each chunk).
The progress percentage as float.
The status when process finishes.
- Raises
FileSystemException – If there is any error performing the operation and progress_cb is None.
ValueError – If any of the parameters is invalid.
See also
-
get_file(src, dest, progress_cb=None)[source]¶ Downloads the given XBee file in the specified destination path.
- Parameters
src (
FileSystemElementor String) – File to download or its absolute path.dest (String) – The absolute path of the destination file.
progress_cb (Function, optional) –
Function call when data is being downloaded. Receives one argument:
The progress percentage as float.
Destination file path.
Source file path.
- Raises
FileSystemException – If there is any error performing the operation and progress_cb is None.
ValueError – If any of the parameters is invalid.
-
put_file(src, dest, secure=False, overwrite=False, mk_parents=True, progress_cb=None)[source]¶ Uploads the given file to the specified destination path of the XBee.
- Parameters
src (String) – Absolute path of the File to upload.
dest (
FileSystemElementor String) – The file in the XBee or its absolute path.secure (Boolean, optional, default=`False`) – True if the file should be stored securely, False otherwise.
overwrite (Boolean, optional, default=`False`) – True to overwrite the file if it exists, False otherwise.
mk_parents (Boolean, optional, default=`True`) – True to make parent directories as needed, False otherwise.
progress_cb (Function, optional) –
Function call when data is being uploaded. Receives one argument:
The progress percentage as float.
Destination file path.
Source file path.
- Returns
The new created file.
- Return type
- Raises
FileSystemException – If there is any error performing the operation and progress_cb is None.
ValueError – If any of the parameters is invalid.
-
put_dir(src, dest='/flash', verify=True, progress_cb=None)[source]¶ Uploads the given source directory contents into the given destination directory in the XBee.
- Parameters
src (String) – Local directory to upload its contents.
dest (
FileSystemElementor String) – The destination dir in the XBee or its absolute path. Defaults to ‘/flash’.verify (Boolean, optional, default=`True`) – True to check the hash of the uploaded content.
progress_cb (Function, optional) –
Function call when data is being uploaded. Receives two argument:
The progress percentage as float.
Destination file path.
The absolute path of the local being uploaded as string.
- Raises
FileSystemException – If there is any error performing the operation and progress_cb is None.
ValueError – If any of the parameters is invalid.
-
get_file_hash(file, timeout=20)[source]¶ Returns the SHA256 hash of the given file.
- Parameters
file (
FileSystemElementor String) – File to get its hash or its absolute path.timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
SHA256 hash of the given file.
- Return type
Bytearray
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
-
move(source, dest, timeout=20)[source]¶ Moves the given source element to the given destination path.
- Parameters
source (
FileSystemElementor String) – Source entry to move.dest (String) – Destination path of the element to move.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
-
get_volume_info(vol='/flash', timeout=20)[source]¶ Returns the file system volume information. Currently ‘/flash’ is the only supported value.
- Parameters
vol (
FileSystemElement`or String, optional, default=/flash`) – Volume name.timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
Collection of pair values describing volume information.
- Return type
Dictionary
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
format(vol='/flash', timeout=30)[source]¶ Formats provided volume. Currently ‘/flash’ is the only supported value. Formatting the file system takes time, and any other requests will fail until it completes and sends a response.
- Parameters
vol (
FileSystemElement`or String, optional, default=/flash`) – Volume name.timeout (Float, optional, default=`DEFAULT_FORMAT_TIMEOUT`) – Maximum number Of seconds to wait for the operation completion.
- Returns
Collection of pair values describing volume information.
- Return type
Dictionary
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
pget_path_id(dir_path, path_id=0, timeout=20)[source]¶ Returns the directory path id of the given path. Returned directory path id expires if not referenced in 2 minutes.
- Parameters
dir_path (String) – Path of the directory to get its id. It is relative to the directory path id.
path_id (Integer, optional, default=0) – Directory path id. 0 for the root directory.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file system command
execution, new directory path id (-1 if status is not 0) and its absolute path (empty if status is not 0). The full path may be None or empty if it is too long and exceeds the communication frames length.
- Return type
Tuple (Integer, Integer, String)
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
pmake_directory(dir_path, path_id=0, timeout=20)[source]¶ Creates the provided directory. Parent directories of the one to be created must exist. Separate requests must be dane to make intermediate directories.
- Parameters
dir_path (String) – Path of the new directory to create. It is relative to the directory path id.
path_id (Integer, optional, default=0) – Directory path id. 0 for the root directory.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion. If mk_parents this is the timeout per directory creation.
- Returns
- Status of the file system command execution
(see
FSCommandStatus).
- Return type
Integer
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
plist_directory(dir_path, path_id=0, timeout=20)[source]¶ Lists the contents of the given directory.
- Parameters
dir_path (String) – Path of the directory to list. It is relative to the directory path id.
path_id (Integer, optional, default=0) – Directory path id. 0 for the root directory.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file system command execution
and a list of :class:.FilesystemElement` objects contained in the given directory, empty list if status is not 0.
- Return type
Tuple (Integer, List)
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
premove(entry_path, path_id=0, timeout=20)[source]¶ Removes the given file system entry.
All files in a directory must be deleted before removing the directory. On XBee 3 802.15.4, DigiMesh, and Zigbee, deleted files are marked as as unusable space unless they are at the “end” of the file system (most-recently created). On these products, deleting a file triggers recovery of any deleted file space at the end of the file system, and can lead to a delayed response.
- Parameters
entry_path (String) – Path of the entry to remove. It is relative to the directory path id.
path_id (Integer, optional, default=0) – Directory path id. 0 for the root directory.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file system command execution
(see
FSCommandStatus).
- Return type
Integer
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
popen_file(file_path, path_id=0, options=<FileOpenRequestOption.READ: 4>, timeout=20)[source]¶ Open a file for reading and/or writing. Use the FileOpenRequestOption.SECURE (0x80) bitmask for options to upload a write-only file (one that cannot be downloaded or viewed), useful for protecting files on the device. Returned file id expires if not referenced in 2 minutes.
- Parameters
file_path (String) – Path of the file to open. It is relative to the directory path id.
path_id (Integer, optional, default=0) – Directory path id. 0 for the root directory.
options (Integer, optional, default=`FileOpenRequestOption.READ`) – Bitmask that specifies the options to open the file. It defaults to FileOpenRequestOption.READ which means open for reading. See
FileOpenRequestOptionfor more options.timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file system
command execution (see
FSCommandStatus), the file id to use in later requests, and the size of the file (in bytes), 0xFFFFFFFF if unknown.
- Return type
Tuple (Integer, Integer, Integer)
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
-
pclose_file(file_id, timeout=20)[source]¶ Closes an open file and releases its file handle.
- Parameters
file_id (Integer) – File id returned when opening.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file system command execution
(see
FSCommandStatus).
- Return type
Integer
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
pread_file(file_id, offset=- 1, size=- 1, timeout=20)[source]¶ Reads from the provided file the given amount of bytes starting at the given offset. The file must be opened for reading first.
- Parameters
file_id (Integer) – File id returned when opening.
offset (Integer, optional, default=-1) – File offset to start reading. -1 to use current position.
size (Integer, optional, default=-1) – Number of bytes to read. -1 to read as many as possible.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file
system command execution (see
FSCommandStatus), the file id, the offset of the read data, and the read data.
- Return type
Tuple (Integer, Integer, Integer, Bytearray)
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
pwrite_file(file_id, data, offset=- 1, timeout=20)[source]¶ Writes to the provided file the given data bytes starting at the given offset. The file must be opened for writing first.
- Parameters
file_id (Integer) – File id returned when opening.
data (Bytearray, bytes or String) – Data to write.
offset (Integer, optional, default=-1) – File offset to start writing. -1 to use current position.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file system
command execution (see
FSCommandStatus), the file id, and the current offset after writing.
- Return type
Tuple (Integer, Integer, Integer)
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
pget_file_hash(file_path, path_id=0, timeout=20)[source]¶ Returns the SHA256 hash of the given file.
- Parameters
file_path (String) – Path of the file to get its hash. It is relative to the directory path id.
path_id (Integer, optional, default=0) – Directory path id. 0 for the root directory.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file system command
execution and SHA256 hash of the given file (empty bytearray if status is not 0).
- Return type
Tuple (Integer, Bytearray)
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
prename(current_path, new_path, path_id=0, timeout=20)[source]¶ Rename provided file.
- Parameters
current_path (String) – Current path name. It is relative to the directory path id.
new_path (String) – New name. It is relative to the directory path id.
path_id (Integer, optional, default=0) – Directory path id. 0 for the root directory.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
- Status of the file system command execution
(see
FSCommandStatus).
- Return type
Integer
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
prelease_path_id(path_id, timeout=20)[source]¶ Releases the provided directory path id.
- Parameters
path_id (Integer) – Directory path id to release.
timeout (Float, optional, default=`DEFAULT_TIMEOUT`) – Maximum number of seconds to wait for the operation completion.
- Returns
Status of the file system command execution.
- Return type
Integer
- Raises
FileSystemException – If there is any error performing the operation or the function is not supported.
ValueError – If any of the parameters is invalid.
See also
-
class
digi.xbee.filesystem.LocalXBeeFileSystemManager(xbee_device)[source]¶ Bases:
objectHelper class used to manage the local XBee file system.
Class constructor. Instantiates a new
LocalXBeeFileSystemManagerwith the given parameters.- Parameters
xbee_device (
XBeeDevice) – The local XBee to manage its file system.
-
property
is_connected¶ Returns whether the file system manager is connected or not.
- Returns
- True if the file system manager is connected, False
otherwise.
- Return type
Boolean
-
connect()[source]¶ Connects the file system manager.
- Raises
FileSystemException – If there is any error connecting the file system manager.
FileSystemNotSupportedException – If the device does not support filesystem feature.
-
disconnect()[source]¶ Disconnects the file system manager and restores the device connection.
- Raises
XBeeException – If there is any error restoring the XBee connection.
-
get_current_directory()[source]¶ Returns the current device directory.
- Returns
Current device directory.
- Return type
String
- Raises
FileSystemException – If there is any error getting the current directory or the function is not supported.
-
change_directory(directory)[source]¶ Changes the current device working directory to the given one.
- Parameters
directory (String) – New directory to change to.
- Returns
Current device working directory after the directory change.
- Return type
String
- Raises
FileSystemException – If there is any error changing the current directory or the function is not supported.
-
make_directory(directory)[source]¶ Creates the provided directory.
- Parameters
directory (String) – New directory to create.
- Raises
FileSystemException – If there is any error creating the directory or the function is not supported.
-
list_directory(directory=None)[source]¶ Lists the contents of the given directory.
- Parameters
directory (String, optional) – the directory to list its contents. If not provided, the current directory contents are listed.
- Returns
- list of :class:.FilesystemElement` objects contained in
the given (or current) directory.
- Return type
List
- Raises
FileSystemException – if there is any error listing the directory contents or the function is not supported.
-
remove_element(element_path)[source]¶ Removes the given file system element path.
- Parameters
element_path (String) – Path of the file system element to remove.
- Raises
FileSystemException – If there is any error removing the element or the function is not supported.
-
move_element(source_path, dest_path)[source]¶ Moves the given source element to the given destination path.
- Parameters
source_path (String) – Source path of the element to move.
dest_path (String) – Destination path of the element to move.
- Raises
FileSystemException – If there is any error moving the element or the function is not supported.
-
put_file(source_path, dest_path, secure=False, progress_callback=None)[source]¶ Transfers the given file in the specified destination path of the XBee.
- Parameters
source_path (String) – the path of the file to transfer.
dest_path (String) – the destination path to put the file in.
secure (Boolean, optional, default=`False`) – True if the file should be stored securely, False otherwise.
progress_callback (Function, optional) –
Function to execute to receive progress information. Takes the following arguments:
The progress percentage as integer.
- Raises
FileSystemException – If there is any error transferring the file or the function is not supported.
-
put_dir(source_dir, dest_dir=None, progress_callback=None)[source]¶ Uploads the given source directory contents into the given destination directory in the device.
- Parameters
source_dir (String) – Local directory to upload its contents.
dest_dir (String, optional) – Remote directory to upload the contents to. Defaults to current directory.
progress_callback (Function, optional) –
Function to execute to receive progress information. Takes the following arguments:
The file being uploaded as string.
The progress percentage as integer.
- Raises
FileSystemException – If there is any error uploading the directory or the function is not supported.
-
get_file(source_path, dest_path, progress_callback=None)[source]¶ Downloads the given XBee device file in the specified destination path.
- Parameters
source_path (String) – Path of the XBee device file to download.
dest_path (String) – Destination path to store the file in.
progress_callback (Function, optional) –
Function to execute to receive progress information. Takes the following arguments:
The progress percentage as integer.
- Raises
FileSystemException – If there is any error downloading the file or the function is not supported.
-
format_filesystem()[source]¶ Formats the device file system.
- Raises
FileSystemException – If there is any error formatting the file system.
-
get_usage_information()[source]¶ Returns the file system usage information.
- Returns
Collection of pair values describing the usage information.
- Return type
Dictionary
- Raises
FileSystemException – If there is any error retrieving the file system usage information.
-
get_file_hash(file_path)[source]¶ Returns the SHA256 hash of the given file path.
- Parameters
file_path (String) – Path of the file to get its hash.
- Returns
SHA256 hash of the given file path.
- Return type
String
- Raises
FileSystemException – If there is any error retrieving the file hash.
-
digi.xbee.filesystem.update_remote_filesystem_image(remote_device, ota_filesystem_file, max_block_size=0, timeout=None, progress_callback=None, _prepare=True)[source]¶ Performs a remote filesystem update operation in the given target.
- Parameters
remote_device (
RemoteXBeeDevice) – Remote XBee to update its filesystem image.ota_filesystem_file (String) – Path of the OTA filesystem file to upload.
max_block_size (Integer, optional) – Maximum size of the ota block to send.
timeout (Integer, optional) – Timeout to wait for remote frame requests.
progress_callback (Function, optional) –
Function to execute to receiveç progress information. Receives two arguments:
The current update task as a String
The current update task percentage as an Integer
- Raises
FileSystemNotSupportedException – If the target does not support filesystem update.
FileSystemException – If there is any error updating the remote filesystem image.
-
digi.xbee.filesystem.check_fs_support(xbee, min_fw_vers=None, max_fw_vers=None)[source]¶ Checks if filesystem API feature is supported.
- Parameters
xbee (
:AbstractXBeeDevice) – The XBee to check.min_fw_vers (Dictionary, optional, default=`None`) – A dictionary with protocol as key, and minimum firmware version with filesystem support as value.
max_fw_vers (Dictionary, optional, default=`None`) – A dictionary with protocol as key, and maximum firmware version with filesystem support as value.
- Returns
True if filesystem is supported, False otherwise.
- Return type
Boolean