WsfCommMediumMessageStatus

WsfCommMediumMessageStatus

Description

The WsfCommMediumMessageStatus script class provides access to the internal data maintained by medium objects during typical processing. Usage of this class allows inspection by the user of message transmission and propagation states for higher complexity script method logic and analysis purposes. The only mutable factor available to users using this class is to prevent future message delivery, and all other script objects available via this object are not mutable.

Methods

WsfCommMessage GetMessage()

Returns the message associated with this message status object.

bool IsTransmitting()

Returns true if the message associated with this object is currently being transmitted over the medium. Returns false if the message has finished transmitting and is currently propagating.

Note

If a message is transmitting, it is also implicitly propagating.

double GetTimeStart()

Returns the simulation time that this message began transmitting over the medium.

double GetTimeTransmissionEnd()

If a message is currently transmitting, provides the time this transmission is expected to end transmission over the medium. If the message is not currently transmitting, this is the exact time this message ended transmission over the medium.

Note

In the case that the message is currently transmitting, this time may be modified due to various conditions within the communication framework that are encountered during transmission. While usage of this time is the typical use case, it is not guaranteed.

double GetTimeDelivery()

Returns the simulation time this message is expected to be delivered over this medium.

Note

This is always an estimation, as the message status object is removed upon message delivery. Various conditions within the communications framework that are encountered during transmission and propagation may alter this time, or prevent the delivery of this message completely.

bool GetDeliveryFailure()

Returns true if this message is indicated to NOT be delivered. Messages that fail transmission or propagation for various reasons internal to the communications framework still progress through the typical medium processing even if indicated to not be delivered. The receiving communications object will not receive this message.

Returns false if the message is processing normally, and is currently indicated to be delivered.

Note

This value may change at any point in the processing of a message over a medium. It is only valid at the time this method is called.

bool SetDeliveryFailure()

Changes the abort delivery flag for this message such that it will NOT be delivered. Returns true if this action was successful, false otherwise.

Note

This call is only applicable for messages that are currently not indicated to abort delivery. Users may not change a message already indicated to not be delivered to one that will be delivered.

Auxiliary Data Methods

Auxiliary Data is a collection of optional named user data attributes that can be stored with the object. The framework will maintain the attributes but in no other way attempts to use the data contained within. The definition and use of any attribute is defined purely by the user.

bool AuxDataBool(string aName)
int AuxDataInt(string aName)
double AuxDataDouble(string aName)
string AuxDataString(string aName)
Object AuxDataObject(string aName)

Retrieve the value of the auxiliary data attribute with the indicated name. If the attribute does not exist then a default value will be returned (false for bool, 0 for int and 0.0 for double).

bool AuxDataExists(string aName)
bool CheckAuxData(string aName)

Returns true if an auxiliary data member exists with the specified name.

bool HasAuxData()

Returns true if the object has auxiliary data.

bool DeleteAuxData(string aName)

Delete the auxiliary data attribute with the indicated name. Returns true if the attribute exists and was deleted, or false if the attribute did not exist.

void SetAuxData(string aName, bool aValue)
void SetAuxData(string aName, int aValue)
void SetAuxData(string aName, double aValue)
void SetAuxData(string aName, string aValue)
void SetAuxData(string aName, Object aValue)

Set the value of the auxiliary data attribute with the indicated name. The last form of SetAuxData() can store any script object type.

Map<string, string> GetAllAuxDataTypes()

Return the names and types of all auxiliary data attributes in the form of a Map<string,string>. Map keys are valid names of auxiliary data attributes. Map values are type names corresponding to valid auxiliary data attribute names.