C# Class BACnet.Core.App.Transactions.ClientTransaction

Inheritance: IDisposable, IDeviceSearchCallback
Mostrar archivo Open project: LorenVS/bacstack Class Usage Examples

Public Properties

Property Type Description
RequestTimeout System.TimeSpan
SegmentTimeout System.TimeSpan

Public Methods

Method Description
Abort ( AbortReason reason ) : void

Aborts the transaction

ClientTransaction ( Host host, TransactionManager manager, ClientTransactionHandle handle, byte invokeId, Address deviceAddress, byte serviceChoice, byte request ) : System

Constructs a new ClientTransaction instance

ClientTransaction ( Host host, TransactionManager manager, ClientTransactionHandle handle, byte invokeId, uint deviceInstance, byte serviceChoice, byte request ) : System

Constructs a new ClientTransaction instance

Dispose ( ) : void

Disposes of the transaction

IDeviceSearchCallback ( ) : void

Called when a device search times out

IDeviceSearchCallback ( DeviceTableEntry entry ) : void

Called when the device search completes, and results in a device table entry

Matches ( Address address, byte invokeId ) : bool

Determines whether this transaction matches a supplied remote address and invoke id pair

OnAbort ( AbortMessage message ) : void

Called whenever an abort message is received for this transaction

OnComplexAck ( ComplexAckMessage message, BufferSegment segment ) : void

Called whenever a complex ack is received for this transaction

OnError ( ErrorMessage message ) : void

Called whenever an error message is received for this transaction

OnReject ( RejectMessage message ) : void

Called whenever a reject message is received for this transaction

OnSegmentAck ( SegmentAckMessage message ) : void

Called whenever a segment ack is received for this transaction

OnSimpleAck ( SimpleAckMessage message ) : void

Called whenever a simple ack is received for this transaction

Private Methods

Method Description
_disposeAll ( ) : void

Disposes of all resources held by the transaction

_inWindow ( byte sequenceNumber ) : int

Determines whether the supplied sequence number is within the current window

_requestTick ( object state ) : void

Called whenever the request timer ticks

_segmentTick ( object state ) : void

Called whenever the segment timer ticks

_sendAbort ( AbortReason reason ) : void

Sends an abort message

_sendInitialRequestSegment ( ) : void

Sends the very first segment in the request

_sendSegmentAck ( bool nack = false ) : void

Sends a segment ack

_startRequestTimer ( ) : void

Starts the request timer

_startSegmentTimer ( ) : void

Starts the segment timer

_stopRequestTimer ( ) : void

Disposes of the request timer

_stopSegmentTimer ( ) : void

Disposes of the segment timer

_transitionTo ( ClientState state ) : void

Performs necessary transitions operations to move to the supplied state

Method Details

Abort() public method

Aborts the transaction
public Abort ( AbortReason reason ) : void
reason AbortReason
return void

ClientTransaction() public method

Constructs a new ClientTransaction instance
public ClientTransaction ( Host host, TransactionManager manager, ClientTransactionHandle handle, byte invokeId, Address deviceAddress, byte serviceChoice, byte request ) : System
host Host The host that initiated the transaction
manager TransactionManager The transaction manager
handle ClientTransactionHandle The handle used to control this transaction and process its response
invokeId byte The invocation id for the transaction
deviceAddress BACnet.Core.Network.Address The address of the destination device
serviceChoice byte The service choice of the request
request byte The request content
return System

ClientTransaction() public method

Constructs a new ClientTransaction instance
public ClientTransaction ( Host host, TransactionManager manager, ClientTransactionHandle handle, byte invokeId, uint deviceInstance, byte serviceChoice, byte request ) : System
host Host The host that initiated the transaction
manager TransactionManager The transaction manager
handle ClientTransactionHandle The handle used to control this transaction and process its response
invokeId byte The invocation id for the transaction
deviceInstance uint The instance of the destination device
serviceChoice byte The service choice of the request
request byte The request content
return System

Dispose() public method

Disposes of the transaction
public Dispose ( ) : void
return void

IDeviceSearchCallback() public method

Called when a device search times out
public IDeviceSearchCallback ( ) : void
return void

IDeviceSearchCallback() public method

Called when the device search completes, and results in a device table entry
public IDeviceSearchCallback ( DeviceTableEntry entry ) : void
entry DeviceTableEntry The entry that was found
return void

Matches() public method

Determines whether this transaction matches a supplied remote address and invoke id pair
public Matches ( Address address, byte invokeId ) : bool
address BACnet.Core.Network.Address The remote address
invokeId byte The invoke id
return bool

OnAbort() public method

Called whenever an abort message is received for this transaction
public OnAbort ( AbortMessage message ) : void
message BACnet.Core.App.Messages.AbortMessage The abort message
return void

OnComplexAck() public method

Called whenever a complex ack is received for this transaction
public OnComplexAck ( ComplexAckMessage message, BufferSegment segment ) : void
message BACnet.Core.App.Messages.ComplexAckMessage The received message
segment BufferSegment The segment
return void

OnError() public method

Called whenever an error message is received for this transaction
public OnError ( ErrorMessage message ) : void
message BACnet.Core.App.Messages.ErrorMessage The error message
return void

OnReject() public method

Called whenever a reject message is received for this transaction
public OnReject ( RejectMessage message ) : void
message BACnet.Core.App.Messages.RejectMessage The reject message
return void

OnSegmentAck() public method

Called whenever a segment ack is received for this transaction
public OnSegmentAck ( SegmentAckMessage message ) : void
message BACnet.Core.App.Messages.SegmentAckMessage The segment ack message
return void

OnSimpleAck() public method

Called whenever a simple ack is received for this transaction
public OnSimpleAck ( SimpleAckMessage message ) : void
message BACnet.Core.App.Messages.SimpleAckMessage The received message
return void

Property Details

RequestTimeout public_oe static_oe property

The time to wait fro a response to the transaction
public static TimeSpan,System RequestTimeout
return System.TimeSpan

SegmentTimeout public_oe static_oe property

The time to wait for the next segment
public static TimeSpan,System SegmentTimeout
return System.TimeSpan