MobiledgeX.MobiledgeXIntegration Class Reference
Inheritance diagram for MobiledgeX.MobiledgeXIntegration:

Classes

class  LocationFromIPAddress
 
class  Messaging
 

Public Member Functions

 MobiledgeXIntegration (CarrierInfo carrierInfo=null, NetInterface netInterface=null, UniqueID uniqueId=null, DeviceInfo deviceInfo=null)
 Constructor for MobiledgeXIntegration. This class has functions that wrap DistributedMatchEngine functions for ease of use
 
 MobiledgeXIntegration (string orgName, string appName, string appVers, string developerAuthToken="")
 Constructor for MobiledgeXIntegration. This class has functions that wrap DistributedMatchEngine functions for ease of use
 
async Task< bool > RegisterAndFindCloudlet (string dmeHost=null, uint dmePort=0)
 Wrapper for RegisterAndFindCloudlet. Returns false if either Register or FindCloudlet fails. RegisterClientException and FindCloudletException will give more details on reason for failure More...
 
async Task< bool > VerifyLocation (string dmeHost=null, uint dmePort=0)
 Wrapper for VerifyLocation. Verification of location based on the device location and the cell tower location More...
 
AppPort GetAppPort (LProto proto, int port=0)
 Wrapper for Get[]AppPorts. This will return the AppPort object mapped to the given port. If no port is given, this will return the first AppPort in the dictionary More...
 
string GetUrl (string l7Proto, AppPort appPort=null, int port=0, string path="")
 Wrapper for CreateUrl. Returns the L7 url for application backend More...
 
string GetHost (AppPort appPort=null)
 Wrapper for GetPort. Returns the port of specified service in the application backend (use with GetHost) More...
 
int GetPort (AppPort appPort=null, int port=0)
 Wrapper for GetHost. Returns the host of the application backend (use with GetPort) More...
 
async Task< ClientWebSocket > GetWebsocketConnection (AppPort appPort=null, int port=0, string path="")
 Wrapper for GetWebsocketConnection More...
 
void Dispose ()
 
void ConfigureMobiledgeXSettings ()
 Uses MobiledgeXSetting Scriptable object to load and save orgName, appName, appVers
 
void UseWifiOnly (bool useWifi)
 Use for testing In UnityEditor, Won't work in Production More...
 
void UseFindCloudletPerformanceMode (bool performanceMode)
 Changes how FindCloudlet will find the "nearest" cloudlet Proximity Mode: Default. Gets the cloudlet that is nearest based on gps Performance Mode: Does latency test for all cloudlets and returns the fastest cloudlet. (takes longer to return)
 
void SetFallbackLocation (double longitude, double latitude)
 Fallback Location will be used if LocationServices is down or if running in UnityEditor
 
async Task< bool > Register (string dmeHost=null, uint dmePort=0)
 Wrapper for Register Client. First call to establish the connection with your backend(server) deployed on MobiledgeX More...
 
async Task< bool > FindCloudlet (string dmeHost=null, uint dmePort=0)
 Wrapper for FindCloudlet. Will find the "nearest" cloudlet hosting the application backend To use Performance mode. Call UseFindCloudletPerformanceMode(true) More...
 
bool IsNetworkDataPathEdgeEnabled ()
 Checks whether the default network data path Edge is Enabled on the device or not, Edge requires connections to run over cellular interface. This status is independent of the UseWiFiOnly setting. More...
 

Static Public Member Functions

static async Task< LocationFromIPAddressGetLocationFromIP ()
 

Public Attributes

MatchingEngine matchingEngine
 
bool useFallbackLocation = false
 set to true to use Fallback Location instead of the device location in production, use SetFallbackLocation() to define the FallbackLocation set to true if you are using a device that doesn't provide location data such as magic leap Fallback location is used by default in Unity Editor
 
bool useSelectedRegionInProduction = false
 You don't need this option in UnityEditor by default the region used will be the region selected in MobiledgeX Editor Window Set to true to use the Region selected in MobiledgeX Editor Window in production It's not recommended to use this option in production since the SDK will automatically select the best region. You can use this option for non-sim card devices such as Oculus or MagicLeap
 

Static Public Attributes

static MobiledgeXSettings settings = Resources.Load<MobiledgeXSettings>("MobiledgeXSettings")
 Scriptable Object Holding MobiledgeX Settings (OrgName, AppName, AppVers)
 

Properties

static string sdkVersion [getset]
 
string carrierName = "" [getset]
 MatchingEngine API parameters
 
string orgName = "" [getset]
 
string appName = "" [getset]
 
string appVers = "" [getset]
 
string developerAuthToken = "" [getset]
 
uint cellID = 0 [getset]
 
string uniqueIDType = "" [getset]
 
string uniqueID = "" [getset]
 
Loc location = new Loc() [getset]
 
bool RegisterStatus [get]
 Public MatchingEngine Reply/ State properties
 
FindCloudletReply FindCloudletReply [get]
 
bool VerifyLocationStatus [get]
 
FindCloudletMode Mode [get]
 
AppPort AppPort [get]
 
AppPort[] AppPortList [get]
 

Member Function Documentation

◆ FindCloudlet()

async Task< bool > MobiledgeX.MobiledgeXIntegration.FindCloudlet ( string  dmeHost = null,
uint  dmePort = 0 
)
inline

Wrapper for FindCloudlet. Will find the "nearest" cloudlet hosting the application backend To use Performance mode. Call UseFindCloudletPerformanceMode(true)

Returns
FindCloudletReply Task

◆ GetAppPort()

AppPort MobiledgeX.MobiledgeXIntegration.GetAppPort ( LProto  proto,
int  port = 0 
)
inline

Wrapper for Get[]AppPorts. This will return the AppPort object mapped to the given port. If no port is given, this will return the first AppPort in the dictionary

Parameters
protoLProto protocol (L_PROTO_TCP, L_PROTO_UDP, or L_PROTO_HTTP)
portport for developer specific backend service
Returns
AppPort

◆ GetHost()

string MobiledgeX.MobiledgeXIntegration.GetHost ( AppPort  appPort = null)
inline

Wrapper for GetPort. Returns the port of specified service in the application backend (use with GetHost)

Parameters
appPortAppPort (from GetAppPort)
portport for developer specific backend service
Returns
string

◆ GetPort()

int MobiledgeX.MobiledgeXIntegration.GetPort ( AppPort  appPort = null,
int  port = 0 
)
inline

Wrapper for GetHost. Returns the host of the application backend (use with GetPort)

Parameters
appPortAppPort (from GetAppPort)
Returns
int

◆ GetUrl()

string MobiledgeX.MobiledgeXIntegration.GetUrl ( string  l7Proto,
AppPort  appPort = null,
int  port = 0,
string  path = "" 
)
inline

Wrapper for CreateUrl. Returns the L7 url for application backend

Parameters
appPortAppPort (from GetAppPort)
l7ProtoLayer 7 communication protocol (eg. http, https, ws, wss)
portport for developer specific backend service
pathoptional path to append to end of url
Returns
string

◆ GetWebsocketConnection()

async Task< ClientWebSocket > MobiledgeX.MobiledgeXIntegration.GetWebsocketConnection ( AppPort  appPort = null,
int  port = 0,
string  path = "" 
)
inline

Wrapper for GetWebsocketConnection

Parameters
pathstring path for ex. roomId
portInteger TCP port
Returns
ClientWebSocket Task

◆ IsNetworkDataPathEdgeEnabled()

bool MobiledgeX.MobiledgeXIntegration.IsNetworkDataPathEdgeEnabled ( )
inline

Checks whether the default network data path Edge is Enabled on the device or not, Edge requires connections to run over cellular interface. This status is independent of the UseWiFiOnly setting.

Returns
bool

◆ Register()

async Task< bool > MobiledgeX.MobiledgeXIntegration.Register ( string  dmeHost = null,
uint  dmePort = 0 
)
inline

Wrapper for Register Client. First call to establish the connection with your backend(server) deployed on MobiledgeX

Call once, or when the carrier changes. May throw DistributedMatchEngine.HttpException.

Returns
bool Task

◆ RegisterAndFindCloudlet()

async Task< bool > MobiledgeX.MobiledgeXIntegration.RegisterAndFindCloudlet ( string  dmeHost = null,
uint  dmePort = 0 
)
inline

Wrapper for RegisterAndFindCloudlet. Returns false if either Register or FindCloudlet fails. RegisterClientException and FindCloudletException will give more details on reason for failure

Returns
bool Task

◆ UseWifiOnly()

void MobiledgeX.MobiledgeXIntegration.UseWifiOnly ( bool  useWifi)
inline

Use for testing In UnityEditor, Won't work in Production

Parameters
useWifi

◆ VerifyLocation()

async Task< bool > MobiledgeX.MobiledgeXIntegration.VerifyLocation ( string  dmeHost = null,
uint  dmePort = 0 
)
inline

Wrapper for VerifyLocation. Verification of location based on the device location and the cell tower location

Returns
bool Task

The documentation for this class was generated from the following files: