![]() |
EVE 1.0
|
Structure for holding variables related to Transfer File function. More...
#include <modbus.h>
Data Fields | |
uint32_t | PartNum |
Last file part transmitted (for client) or received (for server). It is 0 for file header. Highest bit is a flag of the last part, so 0x8000000A is the 10th and last part of the file. | |
uint8_t | Targets [MB_TFILE_TARGET_SIZE] |
Bit vector of targets for file transfer. So f.ex. if bit #0 in byte #1 is 1 - it means file transfers (among others) to server with Id 8. | |
uint8_t | TargetsTmp [MB_TFILE_TARGET_SIZE] |
Temporary copy of targets vector used by client to verify part completion for all targets. | |
uint32_t | FileSize |
Total file size. | |
uint32_t | FilePtr |
Bytes already transmitted. Used by client to determine the size of the last part. | |
uint32_t | FileCrc32 |
CRC32 of file name (w/o trailing zeroes) + file length + file data. Computed by crc32_compute() function. | |
uint8_t | FileName [MB_TFILE_FNAMELEN_MAX] |
File name is ASCII null-terminated string of 1-31 chars. | |
uint32_t | CurSize |
Bytes already received. Used by server to discover possible file size error. | |
uint32_t | CurCrc32 |
CRC32 of file name + file length + part of data received so far. Used by server to discover possible file CRC error. Computed by crc32_compute() function. | |
uint8_t | PartLen |
Current packet file part length. | |
uint8_t * | PartData |
Pointer to current part data. | |
uint8_t | Active |
Transfer file operation is in progress (even if the actual function is read reg) | |
struct mwork_t | Mwork |
Timer for timeouts and transfer abortion. For server: when the next part wasn't arrived. For client: when one of servers still doesn't confirmed part reception. | |