Digi XBee(R) ANSI C Host Library
|
Support of Local/Remote File System Request/Response frames on XBee/XBee 3 Cellular (firmware x16 and later) and XBee 3 802.15.4/DigiMesh/Zigbee (firmware x00D and later). More...
Files | |
file | file_system.h |
file | xbee_file_system.c |
Data Structures | |
struct | xbee_header_file_system_req_t |
Frame format for the header of File System Request frame. More... | |
struct | xbee_header_remote_fs_req_t |
Frame format for the header of Remote File System Request frame. More... | |
struct | xbee_fs_req_path_and_name_t |
Format for the payload of File System Request with path_id and name: More... | |
struct | xbee_fs_req_file_open_t |
Format for the payload of "File Open" File System Request. More... | |
struct | xbee_fs_req_file_read_t |
Format for the payload of "File Read" File System Request. More... | |
struct | xbee_fs_req_file_write_t |
Format for the payload of "File Write" File System Request. More... | |
struct | xbee_fs_req_file_close_t |
Format for the payload of "File Close" File System Request. More... | |
struct | xbee_fs_req_dir_read_t |
Format for the payload of "Directory Read/Close" File System Requests. More... | |
struct | xbee_header_file_system_resp_t |
Frame format for the header of File System Response frame. More... | |
struct | xbee_header_remote_fs_resp_t |
Frame format for the header of Remote File System Response frame. More... | |
struct | xbee_payload_fs_dir_entry_t |
Format for a directory entry in a Directory Read Response. More... | |
struct | xbee_payload_fs_file_open_resp_t |
Format for the payload of File System Response: File Open. More... | |
struct | xbee_payload_fs_file_rw_resp_t |
Format for the payload of File System Response: File Read/File Write. More... | |
struct | xbee_payload_fs_volume_resp_t |
Format for the payload of File System Response: Volume Stat/Format. More... | |
Macros | |
#define | XBEE_FRAME_FILE_SYSTEM_REQ 0x3B |
File System Request frame type. | |
#define | XBEE_FRAME_REMOTE_FS_REQ 0x3C |
Remote File System Request frame type (on XBee3 802.15.4/DigiMesh/Zigbee) | |
#define | XBEE_FS_CMD_ID_FILE_OPEN 0x01 |
#define | XBEE_FS_CMD_ID_FILE_CLOSE 0x02 |
#define | XBEE_FS_CMD_ID_FILE_READ 0x03 |
#define | XBEE_FS_CMD_ID_FILE_WRITE 0x04 |
#define | XBEE_FS_CMD_ID_FILE_HASH 0x08 |
#define | XBEE_FS_CMD_ID_DIR_CREATE 0x10 |
#define | XBEE_FS_CMD_ID_DIR_OPEN 0x11 |
#define | XBEE_FS_CMD_ID_DIR_CLOSE 0x12 |
#define | XBEE_FS_CMD_ID_DIR_READ 0x13 |
#define | XBEE_FS_CMD_ID_GET_PATH_ID 0x1C |
#define | XBEE_FS_CMD_ID_RENAME 0x21 |
#define | XBEE_FS_CMD_ID_DELETE 0x2F |
#define | XBEE_FS_CMD_ID_VOL_STAT 0x40 |
#define | XBEE_FS_CMD_ID_VOL_FORMAT 0x4F |
#define | XBEE_FS_OPT_CREATE (1<<0) |
#define | XBEE_FS_OPT_EXCLUSIVE (1<<1) |
#define | XBEE_FS_OPT_READ (1<<2) |
#define | XBEE_FS_OPT_WRITE (1<<3) |
#define | XBEE_FS_OPT_TRUNCATE (1<<4) |
#define | XBEE_FS_OPT_APPEND (1<<5) |
#define | XBEE_FS_OPT_SECURE (1<<7) |
#define | XBEE_FS_OFFSET_CURRENT 0xFFFFFFFF |
Value for .offset_be field of File Read/Write to use remote file's current offset. More... | |
#define | XBEE_FS_BYTE_COUNT_MAX 0xFFFF |
Value for .byte_count_be field of File Read to read maximum number of bytes. | |
#define | XBEE_FRAME_FILE_SYSTEM_RESP 0xBB |
File System Response frame type. | |
#define | XBEE_FRAME_REMOTE_FS_RESP 0xBC |
Remote File System Response frame type (on XBee3 802.15.4/DigiMesh/Zigbee) | |
#define | XBEE_FS_STATUS_SUCCESS 0x00 |
#define | XBEE_FS_STATUS_UNKNOWN_ERROR 0x01 |
#define | XBEE_FS_STATUS_INVALID_COMMAND 0x02 |
#define | XBEE_FS_STATUS_INVALID_PARAM 0x03 |
#define | XBEE_FS_STATUS_ACCESS_DENIED 0x50 |
#define | XBEE_FS_STATUS_ALREADY_EXISTS 0x51 |
#define | XBEE_FS_STATUS_DOES_NOT_EXIST 0x52 |
#define | XBEE_FS_STATUS_INVALID_NAME 0x53 |
#define | XBEE_FS_STATUS_IS_DIRECTORY 0x54 |
#define | XBEE_FS_STATUS_DIR_NOT_EMPTY 0x55 |
#define | XBEE_FS_STATUS_EOF 0x56 |
#define | XBEE_FS_STATUS_HW_FAILURE 0x57 |
#define | XBEE_FS_STATUS_NO_DEVICE 0x58 |
#define | XBEE_FS_STATUS_VOLUME_FULL 0x59 |
#define | XBEE_FS_STATUS_TIMED_OUT 0x5A |
#define | XBEE_FS_STATUS_BUSY 0x5B |
#define | XBEE_FS_STATUS_RESOURCE_FAILURE 0x5C |
#define | XBEE_FS_DIR_ENTRY_IS_DIR (UINT32_C(1)<<31) |
#define | XBEE_FS_DIR_ENTRY_IS_SECURE (UINT32_C(1)<<30) |
#define | XBEE_FS_DIR_ENTRY_IS_LAST (UINT32_C(1)<<24) |
#define | XBEE_FS_DIR_ENTRY_FLAG_MASK UINT32_C(0xFF000000) |
#define | XBEE_FS_MAX_PATH_ELEMENT_LEN 64 |
#define | xbee_fs_req_send(xbee, header_data, header_len, target) xbee_fs_req_send_data(xbee, NULL, 0, header_data, header_len, target) |
#define | xbee_fs_req_send_str(xbee, header_data, header_len, var_str, target) |
Functions | |
int | xbee_fs_extract_dir_entry (xbee_fs_dir_entry_t *entry, const uint8_t FAR *payload, int length) |
Send a File System Request to the local or a remote XBee module. More... | |
int | xbee_fs_req_send_data (xbee_dev_t *xbee, const void *header_data, uint16_t header_len, const void *payload, uint16_t payload_len, const addr64 FAR *target_ieee) |
Send a File System Request to the local or a remote XBee module. More... | |
Support of Local/Remote File System Request/Response frames on XBee/XBee 3 Cellular (firmware x16 and later) and XBee 3 802.15.4/DigiMesh/Zigbee (firmware x00D and later).
#define XBEE_FS_OFFSET_CURRENT 0xFFFFFFFF |
Value for .offset_be field of File Read/Write to use remote file's current offset.
#define xbee_fs_req_send_str | ( | xbee, | |
header_data, | |||
header_len, | |||
var_str, | |||
target | |||
) |
int xbee_fs_extract_dir_entry | ( | xbee_fs_dir_entry_t * | entry, |
const uint8_t FAR * | payload, | ||
int | length | ||
) |
Send a File System Request to the local or a remote XBee module.
[out] | entry | Structure to hold the parsed entry. |
[in] | payload | Remaining payload to parse. |
[in] | length | Number of bytes remaining in the payload. |
>0 | number of bytes extracted from payload |
<0 | error trying to send |
int xbee_fs_req_send_data | ( | xbee_dev_t * | xbee, |
const void * | header_data, | ||
uint16_t | header_len, | ||
const void * | payload, | ||
uint16_t | payload_len, | ||
const addr64 FAR * | target_ieee | ||
) |
Send a File System Request to the local or a remote XBee module.
[in] | xbee | Local device receiving the frame. |
[in] | header_data | Header starting with fs_cmd_id field. |
[in] | header_len | Number of bytes in header_data. |
[in] | payload | Payload bytes following header. |
[in] | payload_len | Number of bytes in payload. |
[in] | target_ieee | Address of remote device or NULL for local. |
>0 | frame_id assigned to the request |
<0 | error trying to send |
References EMSGSIZE, XBEE_FRAME_FILE_SYSTEM_REQ, XBEE_FRAME_REMOTE_FS_REQ, xbee_frame_write(), and xbee_next_frame_id().