lib60870.NET 2.3.0
IEC 60870-5-101/104 Protocol Source Code Library for C#/.NET
Loading...
Searching...
No Matches
lib60870.CS101.TransparentFile Class Reference

Simple implementation of IFileProvider that can be used to provide transparent files. Derived classed should override the TransferComplete method. More...

Inheritance diagram for lib60870.CS101.TransparentFile:
Collaboration diagram for lib60870.CS101.TransparentFile:

Public Member Functions

 TransparentFile (int ca, int ioa, NameOfFile nof)
 
void AddSection (byte[] section)
 
int GetCA ()
 Returns the CA (Comman address) of the file.
 
int GetIOA ()
 Returns the IOA (information object address of the file)
 
NameOfFile GetNameOfFile ()
 Gets the type ("name") of the file.
 
DateTime GetFileDate ()
 
int GetFileSize ()
 Gets the size of the file in bytes.
 
int GetSectionSize (int sectionNumber)
 Gets the size of a section in byzes.
 
bool GetSegmentData (int sectionNumber, int offset, int segmentSize, byte[] segmentData)
 Gets the segment data.
 
virtual void TransferComplete (bool success)
 Indicates that the transfer is complete. When success equals true the file data can be deleted.
 

Detailed Description

Simple implementation of IFileProvider that can be used to provide transparent files. Derived classed should override the TransferComplete method.

Member Function Documentation

◆ GetCA()

int lib60870.CS101.TransparentFile.GetCA ( )

Returns the CA (Comman address) of the file.

Returns
The CA

Implements lib60870.CS101.IFileProvider.

◆ GetFileDate()

DateTime lib60870.CS101.TransparentFile.GetFileDate ( )

◆ GetFileSize()

int lib60870.CS101.TransparentFile.GetFileSize ( )

Gets the size of the file in bytes.

Returns
The file size in bytes

Implements lib60870.CS101.IFileProvider.

◆ GetIOA()

int lib60870.CS101.TransparentFile.GetIOA ( )

Returns the IOA (information object address of the file)

Returns
The IOA

Implements lib60870.CS101.IFileProvider.

◆ GetNameOfFile()

NameOfFile lib60870.CS101.TransparentFile.GetNameOfFile ( )

Gets the type ("name") of the file.

Returns
The file type

Implements lib60870.CS101.IFileProvider.

◆ GetSectionSize()

int lib60870.CS101.TransparentFile.GetSectionSize ( int sectionNumber)

Gets the size of a section in byzes.

Returns
The section size in bytes or -1 if the section does not exist
Parameters
sectionNumberNumber of section (starting with 0)

Implements lib60870.CS101.IFileProvider.

◆ GetSegmentData()

bool lib60870.CS101.TransparentFile.GetSegmentData ( int sectionNumber,
int offset,
int segmentSize,
byte[] segmentData )

Gets the segment data.

Returns
true, if segment data was gotten, false otherwise.
Parameters
sectionNumberSection number.
offsetOffset.
segmentSizeSegment size.
segmentDataSegment data.

Implements lib60870.CS101.IFileProvider.

◆ TransferComplete()

virtual void lib60870.CS101.TransparentFile.TransferComplete ( bool success)
virtual

Indicates that the transfer is complete. When success equals true the file data can be deleted.

Parameters
successIf set to true success.

Implements lib60870.CS101.IFileProvider.


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