|
WSF
|
Enumerations | |
| enum | Recipient { cCOMMANDER = 1 , cPEERS = 2 , cSUBORDINATES = 4 } |
Selection methods | |
| Comm * | SelectDevice (WsfPlatform *aSourcePtr, WsfPlatform *aTargetPtr) |
| void | SelectRecipients (WsfCommandChain *aCmdChainPtr, int aRecipientMask, std::vector< WsfPlatform * > &aRecipients) |
| void | SelectRecipients (WsfPlatform *aSenderPtr, WsfGroup *aGroupPtr, std::vector< WsfPlatform * > &aRecipients) |
| std::string | LocalSlaveNetworkName (Comm &aComm) |
| std::string | LocalMasterNetworkName (Comm &aComm) |
These calls are temporary functionality to enable legacy comm behavior in various objects/plugins/etc. that have yet to be updated to fully utilize the new comm framework as intended. It is fully intended that the 'SelectDevice' and 'SelectRecipients' methods will be removed upon full adoption of the new comm enhancements, as these calls are typically needed due to tight coupling with the platform-targeted legacy comm model and command chains, which is undesirable.
| Enumerator | |
|---|---|
| cCOMMANDER | |
| cPEERS | |
| cSUBORDINATES | |
| WSF_EXPORT std::string wsf::comm::util::LocalMasterNetworkName | ( | Comm & | aComm | ) |
The LocalMasterNetworkName returns the name of the correct network to join to (or already is a part of) when the provided comm device uses the legacy <local:master> value. This method exists to support the legacy use of creating networks based off of command chains.
| aComm | The WsfComm object that received the command. |
References WsfObject::GetName(), and WsfPlatformPart::GetPlatform().
Referenced by wsf::comm::NetworkManager::ManageComm().
| WSF_EXPORT std::string wsf::comm::util::LocalSlaveNetworkName | ( | Comm & | aComm | ) |
The LocalSlaveNetworkName returns the name of the correct network to join to (or already is a part of) when the provided comm device uses the legacy <local:slave> value. This method exists to support the legacy use of creating networks based off of command chains.
| aComm | The WsfComm object that received the command. |
The following are methods are used to support legacy comms, or to help maintain the original behavior of the comms library.
These methods support legacy usage of the master/slave network name idiom. While this is not standard comm functionality, this provides legacy support and a generic way of specifying network inclusion (and by extension, comm addressing) that does not intrude on basic comm functionality. It simply provides a common way to specify string identifiers for networks based on the platform owning the comm and its relationship within a command chain.
References WsfComponentList::GetComponent(), WsfCommandChain::GetDefaultNameId(), and WsfPlatformPart::GetPlatform().
Referenced by wsf::comm::NetworkManager::ManageComm().
| WSF_EXPORT Comm * wsf::comm::util::SelectDevice | ( | WsfPlatform * | aSourcePtr, |
| WsfPlatform * | aTargetPtr ) |
Find a comm device on the sending platform over which a message can be sent and then received by the target platform. The algorithm will only choose a device which is valid only at the time of the request.
| aSourcePtr | The platform wishing to send the message. |
| aTargetPtr | The platform to whom the message is intended. |
References WsfComponentList::RoleIterator< T >::AtEnd().
Referenced by WsfBMDisseminateC2::SelectCommDevice(), and WsfTaskManager::SelectCommDevice().
| WSF_EXPORT void wsf::comm::util::SelectRecipients | ( | WsfCommandChain * | aCmdChainPtr, |
| int | aRecipientMask, | ||
| std::vector< WsfPlatform * > & | aRecipients ) |
A helper method to select the recipient platforms from a command chain.
| aCmdChainPtr | The command chain from which the recipients are to be selected. |
| aRecipientMask | A bit mask of 'Recipient' values indicating which recipients are to be selected. |
| aRecipients | An updated list of platforms containing the selected recipients. The selected platforms are appended to the list! |
References cCOMMANDER, cPEERS, cSUBORDINATES, WsfCommandChain::GetCommander(), WsfCommandChain::GetPeers(), WsfCommandChain::GetPlatform(), WsfCommandChain::GetSubordinates(), and platformPtr.
Referenced by WsfL16::ComputerPart::SendJMessage(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
| WSF_EXPORT void wsf::comm::util::SelectRecipients | ( | WsfPlatform * | aSenderPtr, |
| WsfGroup * | aGroupPtr, | ||
| std::vector< WsfPlatform * > & | aRecipients ) |
A helper method to select the recipient addresses from a group.
| aSenderPtr | The platform sending the message. |
| aGroupPtr | The group from which the recipients are to be selected. |
| aRecipients | An updated list of platforms containing the selected recipients. The selected platforms are appended to the list! |
References WsfGroup::GetMembers(), WsfSimulation::GetPlatformByIndex(), and WsfPlatform::GetSimulation().