WSF
WsfExchange Namespace Reference

Classes

class  Tender
class  Result
class  Query
 Callback Query class. More...
class  Container
class  Transactor

Enumerations

enum  CapabilityType {
  cSUPPLY_PAYLOAD = 0 , cSUPPLY_FUEL = 1 , cVEHICLE_RECOVERY = 2 , cVEHICLE_REPAIR = 3 ,
  cSUPPLY_ADS_B = 4 , cNO_CAPABILITY = 5
}

Functions

void InitializeStatics ()
void ModifyCapabilities (WsfPlatform *aPlatformPtr, unsigned int aOldCapability, unsigned int aNewCapability)
void SetCapabilityFlag (WsfPlatform *aPlatformPtr, CapabilityType aCapability, bool aValue)
void SetCapabilityFlag (unsigned int &aCurrentCapability, CapabilityType aCapability, bool aValue)
bool IsCapable (unsigned int aCapabilityWord, CapabilityType aCapability)
unsigned int CapabilityToBitNumber (CapabilityType aCapability)
CapabilityType BitNumberToCapability (unsigned int aBitNumber)
CapabilityType NameIdToCapability (WsfStringId aCapabilityNameId)
bool IsCapable (const WsfPlatform *aPlatformPtr, CapabilityType aCapability)
WsfStringId CapabilityToNameId (CapabilityType aCapability)

Variables

static WsfStringId sSTATE_READY
static WsfStringId sSTATE_REQUESTING
static WsfStringId sSTATE_ACCEPTING
static WsfStringId sSTATE_OFFERING
static WsfStringId sSTATE_SUPPLYING
static WsfStringId sEVENT_REQUESTED
static WsfStringId sEVENT_OFFERED
static WsfStringId sEVENT_ACCEPTED
static WsfStringId sEVENT_SUPPLIED
static WsfStringId sEVENT_RECEIVED
static WsfStringId sEVENT_CANCELLED
static WsfStringId sEVENT_OFFEROR_COMPLETED
static WsfStringId sEVENT_REQUESTOR_RESPONDED

Detailed Description

A namespace for platform-to-platform suppling or receiving of a commodity or service. Four contained classes: Tender, Container, Query, and Transactor. Requires a WsfExchangeProcessor to stimulate the callback events for platform-to-platform Exchanges. Terminology recommendation: Avoid using the term 'receiver', as in this context it may be ambiguous as to whether it is the receiver of a commodity, or the receiver of an event notif- ication. Recommend using "Originator" for the sender of a message or event, "Requester" for player desiring commodities or services, and "Responder" for the provider of the commodity or service.

Enumeration Type Documentation

◆ CapabilityType

Enumerator
cSUPPLY_PAYLOAD 
cSUPPLY_FUEL 
cVEHICLE_RECOVERY 
cVEHICLE_REPAIR 
cSUPPLY_ADS_B 
cNO_CAPABILITY 

Function Documentation

◆ BitNumberToCapability()

CapabilityType WsfExchange::BitNumberToCapability ( unsigned int aBitNumber)

◆ CapabilityToBitNumber()

unsigned int WsfExchange::CapabilityToBitNumber ( CapabilityType aCapability)

◆ CapabilityToNameId()

WsfStringId WsfExchange::CapabilityToNameId ( CapabilityType aCapability)

◆ InitializeStatics()

◆ IsCapable() [1/2]

bool WsfExchange::IsCapable ( const WsfPlatform * aPlatformPtr,
CapabilityType aCapability )

This is a convenience method to make the Capabilities record in the platform more user-friendly, as the DIS-driven implementation requires bit-mapping the capability bits. This function abstracts away those unpleasant details.

References WsfPlatform::GetCapabilities(), and IsCapable().

◆ IsCapable() [2/2]

bool WsfExchange::IsCapable ( unsigned int aCapabilityWord,
CapabilityType aCapability )

◆ ModifyCapabilities()

void WsfExchange::ModifyCapabilities ( WsfPlatform * aPlatformPtr,
unsigned int aOldCapability,
unsigned int aNewCapability )

◆ NameIdToCapability()

◆ SetCapabilityFlag() [1/2]

void WsfExchange::SetCapabilityFlag ( unsigned int & aCurrentCapability,
CapabilityType aCapability,
bool aValue )

◆ SetCapabilityFlag() [2/2]

void WsfExchange::SetCapabilityFlag ( WsfPlatform * aPlatformPtr,
CapabilityType aCapability,
bool aValue )

Variable Documentation

◆ sEVENT_ACCEPTED

◆ sEVENT_CANCELLED

◆ sEVENT_OFFERED

◆ sEVENT_OFFEROR_COMPLETED

◆ sEVENT_RECEIVED

◆ sEVENT_REQUESTED

◆ sEVENT_REQUESTOR_RESPONDED

◆ sEVENT_SUPPLIED

◆ sSTATE_ACCEPTING

◆ sSTATE_OFFERING

◆ sSTATE_READY

◆ sSTATE_REQUESTING

◆ sSTATE_SUPPLYING

Copyrights Multiple, All Rights Reserved