Transmits a packet synchronously with normal priority.
Namespace: RRAutoLib.LoconetAssembly: RRAutoLib (in RRAutoLib.dll) Version: 1.4.4504.18867
Syntax
| C# |
|---|
public bool TxSyncPacket( Packet objTxPacket, ref Packet objRxPacket ) |
| Visual Basic |
|---|
Public Function TxSyncPacket ( _ objTxPacket As Packet, _ ByRef objRxPacket As Packet _ ) As Boolean |
Parameters
- objTxPacket
- Type: RRAutoLib.Loconet..::..Packet
The Packet to be transmited.
- objRxPacket
- Type: RRAutoLib.Loconet..::..Packet%
Returns a response Packet or Nothing if transmitted packet does not require a response or if the response timeout expired.
Return Value
Returns True if the objTxPacket was echoed meaning it was transmitted successfully, otherwise False.
Remarks
This packet transmission method is similar to the preferred TxPacket(Packet), but unlike the others, performs the transmission synchronously.
The calling thread will be blocked until the packet is fully processed -- transmission and response is complete. This method should be used sparingly as
it could interfere with time sensitive code awaiting execution.