C# 클래스 PBCaGw.DataPacket

Handles messages between workers. Can contain either a TCP/UDP packet or an EPICS message
상속: ICloneable
파일 보기 프로젝트 열기: ISISComputingGroup/EPICS-epicssharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Data byte[]
Destination System.Net.IPEndPoint
Kind DataPacketKind
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, 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

비공개 메소드들

메소드 설명
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, bool reuse = false ) : DataPacket
packet DataPacket
size System.UInt32
reuse bool
리턴 DataPacket

Create() 공개 정적인 메소드

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

Create() 공개 정적인 메소드

public static Create ( int size ) : DataPacket
size int
리턴 DataPacket

Create() 공개 정적인 메소드

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
리턴 DataPacket

GetDataAsString() 공개 메소드

Retreives the payload as string.
public GetDataAsString ( ) : string
리턴 string

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

Padding() 공개 정적인 메소드

public static Padding ( int size ) : int
size int
리턴 int

SetBytes() 공개 메소드

public SetBytes ( int position, byte buff ) : void
position int
buff byte
리턴 void

SetDataAsString() 공개 메소드

public SetDataAsString ( string str ) : void
str string
리턴 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

ShowPools() 공개 정적인 메소드

public static ShowPools ( ) : void
리턴 void

SkipSize() 공개 메소드

Skips a given size from the data block
public SkipSize ( UInt32 size, bool reuse = false ) : DataPacket
size System.UInt32
reuse bool
리턴 DataPacket

프로퍼티 상세

Data 공개적으로 프로퍼티

public byte[] Data
리턴 byte[]

Destination 공개적으로 프로퍼티

public IPEndPoint,System.Net Destination
리턴 System.Net.IPEndPoint

Kind 공개적으로 프로퍼티

public DataPacketKind Kind
리턴 DataPacketKind

ReverseAnswer 공개적으로 프로퍼티

Allows to change the sending rules
public bool ReverseAnswer
리턴 bool

Sender 공개적으로 프로퍼티

public IPEndPoint,System.Net Sender
리턴 System.Net.IPEndPoint