OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
OSDP.Net.Model.CommandData.FileTransferFragment Class Reference

Command data to send a data fragment of a file to a PD. More...

Inheritance diagram for OSDP.Net.Model.CommandData.FileTransferFragment:
OSDP.Net.Model.CommandData.CommandData OSDP.Net.Model.PayloadData

Public Member Functions

 FileTransferFragment (byte type, MessageDataFragment fragment)
 Initializes a new instance of the FileTransferFragment class.
override ReadOnlySpan< byte > SecurityControlBlock ()
override byte[] BuildData ()
override string ToString ()
Public Member Functions inherited from OSDP.Net.Model.PayloadData
byte[] BuildData ()
 Converts the payload into a byte array to be sent over the wire.
ReadOnlySpan< byte > SecurityControlBlock ()
 Retrieves the security control block for a specific command data type.
virtual void CustomMessageUpdate (Span< byte > messageBuffer)
 Updates the message data before sending in the specified byte buffer.

Static Public Member Functions

static FileTransferFragment ParseData (ReadOnlySpan< byte > data)
 Parses the message payload bytes.

Properties

byte Type [get]
 Get the file transfer type.
MessageDataFragment Fragment [get]
 Get the message data fragment.
override CommandType CommandType [get]
override byte Code [get]
Properties inherited from OSDP.Net.Model.CommandData.CommandData
CommandType CommandType [get]
 Message command code.
Properties inherited from OSDP.Net.Model.PayloadData
byte Code [get]
 Gets the command or reply code byte value that represent the type of data.
virtual bool IsSecurityInitialization [get]
 Gets a value indicating whether the security initialization is performed by this payload.

Additional Inherited Members

Static Protected Member Functions inherited from OSDP.Net.Model.CommandData.CommandData
static T[] SplitData< T > (int size, Func< byte[], T > parseDataFunction, ReadOnlySpan< byte > payloadData)
 Splits data into multiple elements of type T based on a specified size.

Detailed Description

Command data to send a data fragment of a file to a PD.

Sent by the ACU as osdp_FILETRANSFER (0x7C) and received by a PD, which answers with an Model.ReplyData.FileTransferStatus. See OSDP v2.2.2 subclause 6.26.

Definition at line 16 of file FileTransferFragment.cs.

Constructor & Destructor Documentation

◆ FileTransferFragment()

OSDP.Net.Model.CommandData.FileTransferFragment.FileTransferFragment ( byte type,
MessageDataFragment fragment )
inline

Initializes a new instance of the FileTransferFragment class.

Parameters
typeFile transfer type
fragmentMessage data fragment

Definition at line 23 of file FileTransferFragment.cs.

References Fragment, and Type.

Referenced by ParseData().

Member Function Documentation

◆ BuildData()

override byte[] OSDP.Net.Model.CommandData.FileTransferFragment.BuildData ( )
inline

Definition at line 49 of file FileTransferFragment.cs.

References Fragment, and Type.

◆ ParseData()

FileTransferFragment OSDP.Net.Model.CommandData.FileTransferFragment.ParseData ( ReadOnlySpan< byte > data)
inlinestatic

Parses the message payload bytes.

Parameters
dataMessage payload as bytes
Returns
An instance of FileTransferFragment representing the message payload

Definition at line 82 of file FileTransferFragment.cs.

References FileTransferFragment(), and OSDP.Net.Model.CommandData.MessageDataFragment.ParseData().

Referenced by OSDP.Net.Device.EnqueuePollReply(), and OSDP.Net.Model.Packet.ParsePayloadData().

◆ ToString()

override string OSDP.Net.Model.CommandData.FileTransferFragment.ToString ( )
inline

Definition at line 57 of file FileTransferFragment.cs.

Referenced by OSDP.Net.Device.HandleFileTransfer().

Property Documentation

◆ Code

override byte OSDP.Net.Model.CommandData.FileTransferFragment.Code
get

Definition at line 43 of file FileTransferFragment.cs.

◆ CommandType

override CommandType OSDP.Net.Model.CommandData.FileTransferFragment.CommandType
get

Definition at line 40 of file FileTransferFragment.cs.

◆ Fragment

MessageDataFragment OSDP.Net.Model.CommandData.FileTransferFragment.Fragment
get

Get the message data fragment.

Definition at line 37 of file FileTransferFragment.cs.

Referenced by OSDP.Net.FileTransferReceiver.AcceptFragment(), BuildData(), and FileTransferFragment().

◆ Type

byte OSDP.Net.Model.CommandData.FileTransferFragment.Type
get

Get the file transfer type.

Definition at line 32 of file FileTransferFragment.cs.

Referenced by OSDP.Net.FileTransferReceiver.AcceptFragment(), BuildData(), and FileTransferFragment().


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