GetReady - method of the PmaCommMsg object
Description:
Detects whether the PmaCommMsg object is ready to transfer the message.
Syntax:
Boolean GetReady()
Return value:
true - Object is ready to transfer the message (the
Run method can be called)
false - Object is not ready to transfer the message (the message from the previous calling the
Run method is still transferring)
Note:
The
PmaCommMsg object gets in the
transfer data state by the
Run method.
During the transfer the
Run method cannot be re-called over the object and
GetReady method then returns the
false value.
After the transfer (i.e. after the
onEndOfTransfer event is triggered) the
Run method can be called again and
GetReady method returns the
true value.
This method is functional only if the message is of the
Master type (i.e. if the "
Message type" configurator is set to "
Master").
Example:
JavaScriptVBScriptSelect and copy to clipboard
var oCommMsg = pMe.Pm("/Comm/mr");
if (oCommMsg.GetReady())
{
oCommMsg.Run();
}
else
{
Pm.Debug("PmaCommMsg is not ready (the previous message is being transmitted)");
}
Dim oCommMsg
Set oCommMsg = pMe.Pm("/Comm/mr")
If oCommMsg.GetReady() Then
oCommMsg.Run
Else
Pm.Debug "PmaCommMsg is not ready (the previous message is being transmitted)"
End If