Represents a Loconet packet used to program DCC decoders on the track.

Namespace: RRAutoLib.Loconet
Assembly: RRAutoLib (in RRAutoLib.dll) Version: 1.4.4420.16901

Syntax

C#
[SerializableAttribute]
public class PkDccProgram : PkRdWrSlotData
Visual Basic
<SerializableAttribute> _
Public Class PkDccProgram _
	Inherits PkRdWrSlotData

Remarks

A PkLongAck response is expected indicating if programming with given parameters is allowed. If a valid programming task is started, a PkDccProgram response will also follow echoing most of the request values plus the ProgErrFlags indicating if the task returned an error. This packet type writes and reads from command station slot 124.

Examples

The following are four examples communicating with decoders.
CopyVB.NET
'assumes objLoconetService has been previously initialized and started


'sets CV57 (speed compensation) and is performed on the service track
objLoconetService.TxPacket(New PkDccProgram(True, DccProgMode.ServTrkPagedByte, 57, 5))

'also sets CV57 but in opperation mode; note: decoder address 2045 is also specified
objLoconetService.TxPacket(New PkDccProgram(True, DccProgMode.OperByteNoFeedback, 2045, 57, 5))

'gets value of CV57 on the service track; note the CvValue can be any value like 0
objLoconetService.TxPacket(New PkDccProgram(False, DccProgMode.ServTrkPagedByte, 57, 0))

'simple way to set CV17 and CV18 to the 4 digit address of 2045
'this is a Shared helper function that internally sends two PkDccProgram packets
PkDccProgram.SetDcc4DigitAddress(objLoconetService, DccProgMode.ServTrkPagedByte, 2045)

Inheritance Hierarchy

System..::..Object
  RRAutoLib.Loconet..::..Packet
    RRAutoLib.Loconet..::..PkRdWrSlotData
      RRAutoLib.Loconet..::..PkDccProgram

See Also