Chapter 13 Device Logic (Pawn)
13.2.16.3 Callback functions
public func(id, cmd, const data{}, len, ofs);
Function to be provided by the script developer, that is called up when a file transfer command is
received. The callback function must be able to handle all file transfer commands (see "File transfer
commands" in chapter "Constants" on page 188).
Parameter
Explanation
id
Unique identification with which the file is referenced (specified during
registration)
cmd
File transfer command that was received from the system and that has to be
processed by the callback function
data
This parameter is only relevant when the following file transfer commands are
received:
l
FT_CMD_STORE: Array that contains the properties of the file that should
be newly created. Structure:
Offset
Bytes
Explanation
0
4
Time stamp of the file
8
4
File size in byte
12
4
Ethernet CRC32 of the file
16
2
File flags
18
256
File name
l
FT_CMD_WRITE: Array that contains the data received from the
myDatanet server.
len
This parameter is only relevant when the following file transfer commands are
received:
l
FT_CMD_READ: Number of bytes requested by the myDatanet server
(max. 4kB)
l
FT_CMD_STORE: Size of the file property block received from the
myDatanet server
l
FT_CMD_WRITE: Number of bytes received from the myDatanet server
ofs
This parameter is only relevant when the following file transfer commands are
received:
l
FT_CMD_READ: Byte offset within the file of the data block to be
transferred to the myDatanet server
l
FT_CMD_WRITE: Byte offset within the file of the data block received
from the myDatanet server
Rev. 05
189
Summary of Contents for myDatalogEASY V3
Page 2: ......
Page 13: ...Chapter 2 Declaration of conformity Chapter 2 Declaration of conformity Rev 05 13 ...
Page 14: ......
Page 42: ......
Page 76: ......
Page 88: ......
Page 102: ......
Page 110: ......
Page 116: ......
Page 234: ......
Page 244: ......
Page 252: ......
Page 254: ......
Page 266: ......
Page 276: ......