dnp3 (C API) 1.6.0
Loading...
Searching...
No Matches
dnp3_file_reader_t Struct Reference

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...
 

Detailed Description

Callbacks for reading a file from the outstation asynchronously.

Field Documentation

◆ aborted

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.

Parameters
errorError describing why the transfer aborted
ctxContext data

◆ block_received

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.

Parameters
block_numThe block number which increments as the transfer proceeds
dataiterator of bytes in the block
ctxContext data
Returns
True to continue, false to abort

◆ completed

void(* dnp3_file_reader_t::completed) (void *)

Called when the transfer completes successfully.

Parameters
ctxContext data

◆ ctx

void* dnp3_file_reader_t::ctx

Context data.

◆ on_destroy

void(* dnp3_file_reader_t::on_destroy) (void *arg)

Callback when the underlying owner doesn't need the interface anymore.

Parameters
argContext data

◆ opened

bool(* dnp3_file_reader_t::opened) (uint32_t, void *)

Called when the file is successfully opened.

May optionally abort the operation by returning false

Parameters
sizeSize of the file returned by the outstation
ctxContext data
Returns
True to continue, false to abort

The documentation for this struct was generated from the following file: