Creates a copy of the packet.
Namespace:
RRAutoLib.Loconet
Assembly:
RRAutoLib (in RRAutoLib.dll) Version: 4.0.8678.28884
Syntax
Remarks
Only the following methods are cloned. The rest are initialized instead:
A packet should not be altered in any way after its transmission since the Loconet service
will proccess it at an indeterminant time on another thread. If you must send the same
packet repeatedly, send a clone of it instead to insure packet uniqueness and immutability.
Examples
The following example shows the correct way of transmitting a packet repeatedly:
Dim packet As New PkReqSlotData(3)
locServ.TxPacket(packet.Clone)
packet.Slot = 4
locServ.TxPacket(packet.Clone)
packet.Slot = 5
locServ.TxPacket(packet)
See Also