C# Class PSI.EpicsClient2.DataPacket

Handles messages between workers. Can contain either a TCP/UDP packet or an EPICS message
Inheritance: ICloneable, IDisposable
Afficher le fichier Open project: ISISComputingGroup/EPICS-epicssharp Class Usage Examples

Méthodes publiques

Свойство Type Description
Data byte[]
Destination System.Net.IPEndPoint
NeedToFlush bool
ReverseAnswer bool
Sender System.Net.IPEndPoint

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
DataPacket ( ) : System

Method Details

Clone() public méthode

Clone this packet, creating an exact copy. As the clone function is an implementation of IClonable it must return an object.
public Clone ( ) : object
Résultat object

Create() public static méthode

Merges 2 packets together
public static Create ( DataPacket remaining, DataPacket newPacket ) : DataPacket
remaining DataPacket
newPacket DataPacket
Résultat DataPacket

Create() public static méthode

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
Résultat DataPacket

Create() public static méthode

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
Résultat DataPacket

Create() public static méthode

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
Résultat DataPacket

Create() public static méthode

public static Create ( int size ) : DataPacket
size int
Résultat DataPacket

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetDataAsString() public méthode

Retreives the payload as string.
public GetDataAsString ( int offset, int maxSize = 40 ) : string
offset int
maxSize int
Résultat string

GetDouble() public méthode

public GetDouble ( int position ) : double
position int
Résultat double

GetFloat() public méthode

public GetFloat ( int position ) : float
position int
Résultat float

GetInt16() public méthode

public GetInt16 ( int position ) : short
position int
Résultat short

GetInt32() public méthode

public GetInt32 ( int position ) : Int32
position int
Résultat System.Int32

GetPayload() public méthode

public GetPayload ( ) : byte[]
Résultat byte[]

GetSByte() public méthode

public GetSByte ( int position ) : sbyte
position int
Résultat sbyte

GetUInt16() public méthode

Returns an UInt16 at a given position
public GetUInt16 ( int position ) : UInt16
position int
Résultat System.UInt16

GetUInt32() public méthode

Returns an UInt32 at a given position
public GetUInt32 ( int position ) : UInt32
position int
Résultat System.UInt32

SetBytes() public méthode

public SetBytes ( int position, byte buff ) : void
position int
buff byte
Résultat void

SetDataAsString() public méthode

public SetDataAsString ( string str ) : void
str string
Résultat void

SetDouble() public méthode

public SetDouble ( int position, double value ) : void
position int
value double
Résultat void

SetFloat() public méthode

public SetFloat ( int position, float value ) : void
position int
value float
Résultat void

SetInt16() public méthode

public SetInt16 ( int position, short value ) : void
position int
value short
Résultat void

SetInt32() public méthode

public SetInt32 ( int position, int value ) : void
position int
value int
Résultat void

SetSByte() public méthode

public SetSByte ( int position, sbyte value ) : void
position int
value sbyte
Résultat void

SetUInt16() public méthode

Writes an UInt16 at a given position
public SetUInt16 ( int position, UInt16 value ) : void
position int
value System.UInt16
Résultat void

SetUInt32() public méthode

Writes an UInt32 at a given position
public SetUInt32 ( int position, UInt32 value ) : void
position int
value System.UInt32
Résultat void

SkipSize() public méthode

Skips a given size from the data block
public SkipSize ( UInt32 size ) : DataPacket
size System.UInt32
Résultat DataPacket

Property Details

Data public_oe property

public byte[] Data
Résultat byte[]

Destination public_oe property

public IPEndPoint,System.Net Destination
Résultat System.Net.IPEndPoint

NeedToFlush public_oe property

public bool NeedToFlush
Résultat bool

ReverseAnswer public_oe property

Allows to change the sending rules
public bool ReverseAnswer
Résultat bool

Sender public_oe property

public IPEndPoint,System.Net Sender
Résultat System.Net.IPEndPoint