C# Class PBCaGw.DataPacket

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

Méthodes publiques

Свойство Type Description
Data byte[]
Destination System.Net.IPEndPoint
Kind DataPacketKind
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, bool reuse = false ) : DataPacket

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

Create ( byte buff ) : DataPacket
Create ( byte buff, int size, WorkerChain chain, bool reuseBuffer = false ) : DataPacket

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

Create ( int size ) : DataPacket
Create ( int payloadSize, WorkerChain chain ) : DataPacket

Creates a new message with the given payload size and sets the payload size correctly.

GetDataAsString ( ) : string

Retreives the payload as string.

GetUInt16 ( int position ) : UInt16

Returns an UInt16 at a given position

GetUInt32 ( int position ) : UInt32

Returns an UInt32 at a given position

Padding ( int size ) : int
SetBytes ( int position, byte buff ) : void
SetDataAsString ( string str ) : 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

ShowPools ( ) : void
SkipSize ( UInt32 size, bool reuse = false ) : 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, bool reuse = false ) : DataPacket
packet DataPacket
size System.UInt32
reuse bool
Résultat DataPacket

Create() public static méthode

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, WorkerChain chain, bool reuseBuffer = false ) : DataPacket
buff byte
size int
chain PBCaGw.Workers.WorkerChain
reuseBuffer bool
Résultat DataPacket

Create() public static méthode

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

Create() public static méthode

Creates a new message with the given payload size and sets the payload size correctly.
public static Create ( int payloadSize, WorkerChain chain ) : DataPacket
payloadSize int
chain PBCaGw.Workers.WorkerChain
Résultat DataPacket

GetDataAsString() public méthode

Retreives the payload as string.
public GetDataAsString ( ) : string
Résultat string

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

Padding() public static méthode

public static Padding ( int size ) : int
size int
Résultat int

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

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

ShowPools() public static méthode

public static ShowPools ( ) : void
Résultat void

SkipSize() public méthode

Skips a given size from the data block
public SkipSize ( UInt32 size, bool reuse = false ) : DataPacket
size System.UInt32
reuse bool
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

Kind public_oe property

public DataPacketKind Kind
Résultat DataPacketKind

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