C# 클래스 EXILANT.Labs.CoAP.Channels.TimedQueue

In CoAP, confirmable messages must wait for an ACK or RST. As long as we do not receive ACK or RST we continue to send the confirmable message, provided, we have not exhausted the maximum number of retries. This queue maintains a list of confirmable messages that are waiting for ACK or RST If we do not receive the response within the timeout, this queue raises a timed-out event
파일 보기 프로젝트 열기: silverspringnetworks/developer_program

보호된 프로퍼티들

프로퍼티 타입 설명
_conMessageQ ArrayList
_isDone bool
_minTimeoutSecs uint
_waitEvent AutoResetEvent

공개 메소드들

메소드 설명
AddToWaitQ ( AbstractCoAPMessage coapMsg ) : void

Add message to wait queue

GetInUseMessageIDs ( ) : ArrayList

Each CON/NON message is associated with a message ID. CON messages cannot be discarded unless ACK/RST is received or delivery attempt fails. This method tells us which message IDs are associated with pending CON messages

GetRequestPendingResponse ( UInt16 msgId ) : CoAPRequest

Get the request message that was pending response

RemoveFromWaitQ ( UInt16 msgId ) : void

Remove message from wait queue

Shutdown ( ) : void

Shutdown the polling

TimedQueue ( uint minTimeoutSecs ) : System

We start a thread here that keeps polling the confirmable messages It checks if the message timed-out, and if yes, raises the timeout event

보호된 메소드들

메소드 설명
PollQ ( ) : void

The thread procedure that continues to poll the queue for timeout

메소드 상세

AddToWaitQ() 공개 메소드

Add message to wait queue
public AddToWaitQ ( AbstractCoAPMessage coapMsg ) : void
coapMsg AbstractCoAPMessage AbstractCoAPMessage
리턴 void

GetInUseMessageIDs() 공개 메소드

Each CON/NON message is associated with a message ID. CON messages cannot be discarded unless ACK/RST is received or delivery attempt fails. This method tells us which message IDs are associated with pending CON messages
public GetInUseMessageIDs ( ) : ArrayList
리턴 ArrayList

GetRequestPendingResponse() 공개 메소드

Get the request message that was pending response
public GetRequestPendingResponse ( UInt16 msgId ) : CoAPRequest
msgId UInt16 The message Id corresponding to the message that needs to be extracted
리턴 CoAPRequest

PollQ() 보호된 메소드

The thread procedure that continues to poll the queue for timeout
protected PollQ ( ) : void
리턴 void

RemoveFromWaitQ() 공개 메소드

Remove message from wait queue
public RemoveFromWaitQ ( UInt16 msgId ) : void
msgId UInt16 The message Id corresponding to the message that needs to be removed
리턴 void

Shutdown() 공개 메소드

Shutdown the polling
public Shutdown ( ) : void
리턴 void

TimedQueue() 공개 메소드

We start a thread here that keeps polling the confirmable messages It checks if the message timed-out, and if yes, raises the timeout event
public TimedQueue ( uint minTimeoutSecs ) : System
minTimeoutSecs uint What is the minimum timeout in seconds
리턴 System

프로퍼티 상세

_conMessageQ 보호되어 있는 프로퍼티

Holds all the confirmable messages waiting for ACK or RST
protected ArrayList _conMessageQ
리턴 ArrayList

_isDone 보호되어 있는 프로퍼티

For thread lifetime management
protected bool _isDone
리턴 bool

_minTimeoutSecs 보호되어 있는 프로퍼티

The minimum timeout in seconds
protected uint _minTimeoutSecs
리턴 uint

_waitEvent 보호되어 있는 프로퍼티

For thread synchronization
protected AutoResetEvent _waitEvent
리턴 AutoResetEvent