C# Класс PSI.EpicsClient2.DataPacket

Handles messages between workers. Can contain either a TCP/UDP packet or an EPICS message
Наследование: ICloneable, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Data byte[]
Destination System.Net.IPEndPoint
NeedToFlush bool
ReverseAnswer bool
Sender System.Net.IPEndPoint

Открытые методы

Метод Описание
Clone ( ) : object

Clone this packet, creating an exact copy. As the clone function is an implementation of IClonable it must return an object.

Create ( DataPacket remaining, DataPacket newPacket ) : DataPacket

Merges 2 packets together

Create ( DataPacket packet, UInt32 size ) : DataPacket

Creates a new message based on an existing packed and use the "size" to extract only the first part.

Create ( byte buff ) : DataPacket

Creates a new message based on the byte buffer however use only the first "size" byte for it.

Create ( byte buff, int size ) : DataPacket

Creates a new message based on the byte buffer however use only the first "size" byte for it.

Create ( int size ) : DataPacket
Dispose ( ) : void
GetDataAsString ( int offset, int maxSize = 40 ) : string

Retreives the payload as string.

GetDouble ( int position ) : double
GetFloat ( int position ) : float
GetInt16 ( int position ) : short
GetInt32 ( int position ) : Int32
GetPayload ( ) : byte[]
GetSByte ( int position ) : sbyte
GetUInt16 ( int position ) : UInt16

Returns an UInt16 at a given position

GetUInt32 ( int position ) : UInt32

Returns an UInt32 at a given position

SetBytes ( int position, byte buff ) : void
SetDataAsString ( string str ) : void
SetDouble ( int position, double value ) : void
SetFloat ( int position, float value ) : void
SetInt16 ( int position, short value ) : void
SetInt32 ( int position, int value ) : void
SetSByte ( int position, sbyte value ) : void
SetUInt16 ( int position, UInt16 value ) : void

Writes an UInt16 at a given position

SetUInt32 ( int position, UInt32 value ) : void

Writes an UInt32 at a given position

SkipSize ( UInt32 size ) : DataPacket

Skips a given size from the data block

Приватные методы

Метод Описание
DataPacket ( ) : System

Описание методов

Clone() публичный Метод

Clone this packet, creating an exact copy. As the clone function is an implementation of IClonable it must return an object.
public Clone ( ) : object
Результат object

Create() публичный статический Метод

Merges 2 packets together
public static Create ( DataPacket remaining, DataPacket newPacket ) : DataPacket
remaining DataPacket
newPacket DataPacket
Результат DataPacket

Create() публичный статический Метод

Creates a new message based on an existing packed and use the "size" to extract only the first part.
public static Create ( DataPacket packet, UInt32 size ) : DataPacket
packet DataPacket
size System.UInt32
Результат DataPacket

Create() публичный статический Метод

Creates a new message based on the byte buffer however use only the first "size" byte for it.
public static Create ( byte buff ) : DataPacket
buff byte
Результат DataPacket

Create() публичный статический Метод

Creates a new message based on the byte buffer however use only the first "size" byte for it.
public static Create ( byte buff, int size ) : DataPacket
buff byte
size int
Результат DataPacket

Create() публичный статический Метод

public static Create ( int size ) : DataPacket
size int
Результат DataPacket

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

GetDataAsString() публичный Метод

Retreives the payload as string.
public GetDataAsString ( int offset, int maxSize = 40 ) : string
offset int
maxSize int
Результат string

GetDouble() публичный Метод

public GetDouble ( int position ) : double
position int
Результат double

GetFloat() публичный Метод

public GetFloat ( int position ) : float
position int
Результат float

GetInt16() публичный Метод

public GetInt16 ( int position ) : short
position int
Результат short

GetInt32() публичный Метод

public GetInt32 ( int position ) : Int32
position int
Результат System.Int32

GetPayload() публичный Метод

public GetPayload ( ) : byte[]
Результат byte[]

GetSByte() публичный Метод

public GetSByte ( int position ) : sbyte
position int
Результат sbyte

GetUInt16() публичный Метод

Returns an UInt16 at a given position
public GetUInt16 ( int position ) : UInt16
position int
Результат System.UInt16

GetUInt32() публичный Метод

Returns an UInt32 at a given position
public GetUInt32 ( int position ) : UInt32
position int
Результат System.UInt32

SetBytes() публичный Метод

public SetBytes ( int position, byte buff ) : void
position int
buff byte
Результат void

SetDataAsString() публичный Метод

public SetDataAsString ( string str ) : void
str string
Результат void

SetDouble() публичный Метод

public SetDouble ( int position, double value ) : void
position int
value double
Результат void

SetFloat() публичный Метод

public SetFloat ( int position, float value ) : void
position int
value float
Результат void

SetInt16() публичный Метод

public SetInt16 ( int position, short value ) : void
position int
value short
Результат void

SetInt32() публичный Метод

public SetInt32 ( int position, int value ) : void
position int
value int
Результат void

SetSByte() публичный Метод

public SetSByte ( int position, sbyte value ) : void
position int
value sbyte
Результат void

SetUInt16() публичный Метод

Writes an UInt16 at a given position
public SetUInt16 ( int position, UInt16 value ) : void
position int
value System.UInt16
Результат void

SetUInt32() публичный Метод

Writes an UInt32 at a given position
public SetUInt32 ( int position, UInt32 value ) : void
position int
value System.UInt32
Результат void

SkipSize() публичный Метод

Skips a given size from the data block
public SkipSize ( UInt32 size ) : DataPacket
size System.UInt32
Результат DataPacket

Описание свойств

Data публичное свойство

public byte[] Data
Результат byte[]

Destination публичное свойство

public IPEndPoint,System.Net Destination
Результат System.Net.IPEndPoint

NeedToFlush публичное свойство

public bool NeedToFlush
Результат bool

ReverseAnswer публичное свойство

Allows to change the sending rules
public bool ReverseAnswer
Результат bool

Sender публичное свойство

public IPEndPoint,System.Net Sender
Результат System.Net.IPEndPoint