WsfCommMedium

WsfCommMedium inherits WsfObject

Description

This script class provides access to medium objects of all types in the script context.

Methods

int ModeCount()

Provides the number of modes that are available for this medium.

int CurrentModeIndex()

Provides the index for the mode that is currently defined as the default used for transmissions.

string CurrentModeName()

Provides the string name for the mode that is currently defined as the default used for transmissions.

WsfCommMediumMode GetCurrentMode()

Returns a reference to the mode that is currently defined as the default used for transmissions.

WsfCommMediumMode GetMode(int aIndex)

Returns a reference to the mode at the index provided by the user.

WsfCommMediumMode GetMode(string aModeName)

Returns a reference to the mode with the name provided by the user.

int ChannelCount()

Returns the maximum number of channels available for this medium.

int TransmissionCount()

Returns the number of currently active transmissions using this medium object.

int MessageStatusCount()

Returns the number of messages currently being handled by this medium, regardless of state.

WsfCommMediumMessageStatus GetMessageStatus(int aSerialNumber, WsfAddress aMessageSource, WsfAddress aMessageDestination)

Returns the message status object specified by the user provided message serial number, the address of the message originator, and the address of the ultimate message destination, if found.

WsfCommMediumMessageStatus GetMessageStatusByIndex(int aIndex)

Returns the message status object specified by the user provided index.

bool IsShared()

Returns true if this medium object is a sharable medium, and potentially has multiple objects using it.

bool SetMode(int aIndex)

Sets the default mode for any subsequent message transmissions using this medium to the supplied mode index.

Note

This method resolves immediately, where message transmissions are scheduled. If the user calls this method multiple times at the same time, the last call of this type will determine the mode for all messages indicated to be transmitted at the same time. Either delay message transmissions slightly between usage of this method call, or utilize the script method overload available with the medium definition.

Returns true if the mode was successfully set to the indicated index, false otherwise.

bool SetMode(string aModeName)

Sets the default mode for any subsequent message transmissions using this medium to the supplied mode name.

Note

This method resolves immediately, where message transmissions are scheduled. If the user calls this method multiple times at the same time, the last call of this type will determine the mode for all messages indicated to be transmitted at the same time. Either delay message transmissions slightly between usage of this method call, or utilize the script method overload available with the medium definition.

Returns true if the mode was successfully set to the indicated mode name, false otherwise.