dnp3 (C++ API) 1.6.0
Loading...
Searching...
No Matches
dnp3::FileReader Class Referenceabstract

Callbacks for reading a file from the outstation asynchronously. More...

#include <dnp3.hpp>

Public Member Functions

virtual bool opened (uint32_t size)=0
 Called when the file is successfully opened. More...
 
virtual bool block_received (uint32_t block_num, ByteIterator &data)=0
 Called when the next block is received. More...
 
virtual void aborted (FileError error)=0
 Called when the transfer is aborted before completion due to an error or user request. More...
 
virtual void completed ()=0
 Called when the transfer completes successfully. More...
 

Detailed Description

Callbacks for reading a file from the outstation asynchronously.

Note
this class is an "interface" and only has virtual methods, some of which may have default implementations.

Member Function Documentation

◆ aborted()

virtual void dnp3::FileReader::aborted ( FileError  error)
pure virtual

Called when the transfer is aborted before completion due to an error or user request.

Parameters
errorError describing why the transfer aborted

◆ block_received()

virtual bool dnp3::FileReader::block_received ( uint32_t  block_num,
ByteIterator data 
)
pure virtual

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
Returns
True to continue, false to abort

◆ completed()

virtual void dnp3::FileReader::completed ( )
pure virtual

Called when the transfer completes successfully.

◆ opened()

virtual bool dnp3::FileReader::opened ( uint32_t  size)
pure virtual

Called when the file is successfully opened.

May optionally abort the operation by returning false

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

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