SequentialBroadcast Constructor

Initializes a new SequentialBroadcast object which inherits from Broadcast.

Definition

Namespace: Peak.Can.Basic
Assembly: PCANBasic.NET (in PCANBasic.NET.dll) Version: 5.1.0
C#
public SequentialBroadcast(
	PcanMessage message,
	int interval,
	int sequenceLength = 1
)

Parameters

message  PcanMessage
Represents the CAN message to be written when the given interval expires.
interval  Int32
Represents the interval used to write the message periodically.
sequenceLength  Int32  (Optional)
The number of bytes from the message data that are used for the sequence counter.

Remarks

After creating a SequentialBroadcast object, it must be registered using the AddBroadcast method. Unregistered objects can be recognized by checking their index. An unregistered SequentialBroadcast object has -1 (0xFFFFFFFF) as index value.

The registration process assign an object a valid index in the broadcast list, trigger it for the first time, and starts its interval timer.

  Note

After a Broadcast object is registered, any change made to it is applied directly, this means, changes made to the Interval or the Message (the whole message or part of it), will be reflected when the next interval expires.

Exceptions

ArgumentExceptionThrown if sequenceLength is less than or equal to 0, or if it is greater then the data length of message.

See Also