Broadcast Constructor

Initializes a new Broadcast object.

Definition

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

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.

Remarks

After creating a Broadcast object, it must be registered using the AddBroadcast method. Unregistered objects can be recognized by checking their index. An unregistered Broadcast 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

ArgumentNullExceptionThe message parameter value is null. An object of type PcanMessage is required.

See Also