C API for BALTECH SDK
ftob.h
Go to the documentation of this file.
1 
10 #ifndef __BRP_BALTECH_API_CMDS_FTOB_H__
11 #define __BRP_BALTECH_API_CMDS_FTOB_H__
12 #include "../typedefs.h"
16 #define BRP_Ftob_ErrInvalidFilename BRP_ERR_STATUS(0x0300, 0x01)
17 
20 #define BRP_Ftob_ErrFileAccessDenied BRP_ERR_STATUS(0x0300, 0x02)
21 
24 #define BRP_Ftob_ErrWriteBlock BRP_ERR_STATUS(0x0300, 0x03)
25 
28 #define BRP_Ftob_ErrReadBlock BRP_ERR_STATUS(0x0300, 0x04)
29 
32 #define BRP_Ftob_ErrNoFileActive BRP_ERR_STATUS(0x0300, 0x05)
33 
36 #define BRP_Ftob_ErrOutOfMemory BRP_ERR_STATUS(0x0300, 0x06)
37 
40 #define BRP_Ftob_ErrBroken BRP_ERR_STATUS(0x0300, 0x07)
41 
50 brp_errcode brp_Ftob_OpenReadFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len);
61 brp_errcode brp_Ftob_OpenWriteFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len, unsigned* MaxBlockLen);
72 brp_errcode brp_Ftob_ReadFileBlock(brp_protocol protocol, bool ToggleBit, unsigned MaxBlockLength, brp_buf* BlockData, size_t* BlockData_len, brp_mempool *mempool);
81 brp_errcode brp_Ftob_WriteFileBlock(brp_protocol protocol, bool ToggleBit, brp_buf BlockData, size_t BlockData_len);
88 brp_errcode brp_Ftob_CloseFile(brp_protocol protocol, bool Success);
89 #endif
90 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:27
brp_errcode brp_Ftob_OpenWriteFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len, unsigned *MaxBlockLen)
This commands starts writing a file to the reader.
brp_errcode brp_Ftob_ReadFileBlock(brp_protocol protocol, bool ToggleBit, unsigned MaxBlockLength, brp_buf *BlockData, size_t *BlockData_len, brp_mempool *mempool)
Use this command to receive a file block by block.
brp_errcode brp_Ftob_WriteFileBlock(brp_protocol protocol, bool ToggleBit, brp_buf BlockData, size_t BlockData_len)
This command writes a file block by block.
brp_errcode brp_Ftob_CloseFile(brp_protocol protocol, bool Success)
This commands quits transferring a file.
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61
brp_errcode brp_Ftob_OpenReadFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len)
This commands starts reading a file from the reader.