![]() |
dnp3 (C API) 1.8.0-RC1
|
Callbacks for reading a file from the outstation asynchronously. More...
#include <dnp3.h>
Data Fields | |
| bool(* | opened )(uint32_t, void *) |
| Called when the file is successfully opened. More... | |
| bool(* | block_received )(uint32_t, dnp3_byte_iterator_t *, void *) |
| Called when the next block is received. More... | |
| void(* | aborted )(dnp3_file_error_t, void *) |
| Called when the transfer is aborted before completion due to an error or user request. More... | |
| void(* | completed )(void *) |
| Called when the transfer completes successfully. More... | |
| void(* | on_destroy )(void *arg) |
| Callback when the underlying owner doesn't need the interface anymore. More... | |
| void * | ctx |
| Context data. More... | |
Callbacks for reading a file from the outstation asynchronously.
These callbacks are the source of truth for the transfer. The dnp3_association_information_t may report DNP3_TASK_TYPE_FILE_READ as a success even though the transfer was aborted, for example when this reader aborts it or the file exceeds the configured maximum size.
| void(* dnp3_file_reader_t::aborted) (dnp3_file_error_t, void *) |
Called when the transfer is aborted before completion due to an error or user request.
| error | Error describing why the transfer aborted |
| ctx | Context data |
| bool(* dnp3_file_reader_t::block_received) (uint32_t, dnp3_byte_iterator_t *, void *) |
Called when the next block is received.
May optionally abort the transfer. This allows the application abort on internal errors like being or by user request.
| block_num | The block number which increments as the transfer proceeds |
| data | iterator of bytes in the block |
| ctx | Context data |
| void(* dnp3_file_reader_t::completed) (void *) |
Called when the transfer completes successfully.
| ctx | Context data |
| void* dnp3_file_reader_t::ctx |
Context data.
| void(* dnp3_file_reader_t::on_destroy) (void *arg) |
Callback when the underlying owner doesn't need the interface anymore.
| arg | Context data |
| bool(* dnp3_file_reader_t::opened) (uint32_t, void *) |
Called when the file is successfully opened.
May optionally abort the operation by returning false
| size | Size of the file returned by the outstation |
| ctx | Context data |