CTR Pia  4.11.3
Game Communication Engine
nn::pia::local::LocalFacade Class Reference

Represents the facade (interface wrapper) class for the local communication library.
. More...

+ Inheritance diagram for nn::pia::local::LocalFacade:

Public Member Functions

nn::Result GetHostStationConnectionInfo (nn::pia::transport::StationConnectionInfo *pStationConnectionInfo) const
 Gets the StationConnectionInfo of the session host. More...
 
Finish Initialization
virtual nn::Result Startup ()
 Starts the LocalFacade. More...
 
virtual void Cleanup ()
 Cleans up the LocalFacade. More...
 

Static Public Member Functions

Singleton Instance Control
static nn::Result CreateInstance (void)
 Creates the LocalFacade class instance (singleton pattern). More...
 
static void DestroyInstance (void)
 Destroys the LocalFacade class instance (singleton pattern).
 
static LocalFacadeGetInstance (void)
 Gets the LocalFacade class instance (singleton pattern). More...
 
Registering and Unregistering Event Callbacks
static void RegisterUpdateEventCallback (UdsUpdateEventCallback callback, void *pParam)
 Registers the callback function called when the UDS network state changes. More...
 
static void UnregisterUpdateEventCallback ()
 Unregisters the registered callback function for network state changes. More...
 

Detailed Description

Represents the facade (interface wrapper) class for the local communication library.
.

Revision History:

2014-09-18 Changed the specifications so that ResultAlreadyExists is returned if you call CreateInstance when an instance already exists.

2014-03-03 Initial version.

Member Function Documentation

virtual void nn::pia::local::LocalFacade::Cleanup ( )
virtual

Cleans up the LocalFacade.

This function can only be called when directly manipulated by the session::Mesh class.

static nn::Result nn::pia::local::LocalFacade::CreateInstance ( void  )
static

Creates the LocalFacade class instance (singleton pattern).

You must call this function after the LocalNetwork::CreateInstance function.

Returns
Returns a Result value that indicates success if the instance is created successfully.
Error Return Values:

ResultNotInitialized Indicates that the local module is not initialized.

ResultInvalidState Indicates that the instance was created at the wrong time.

ResultAlreadyExists Indicates that an instance has already been created.

nn::Result nn::pia::local::LocalFacade::GetHostStationConnectionInfo ( nn::pia::transport::StationConnectionInfo pStationConnectionInfo) const

Gets the StationConnectionInfo of the session host.

Parameters
[out]pStationConnectionInfoStores the session host's StationConnectionInfo.
Returns
Returns a Result value for which the IsSuccess function return true if conversion succeeds. The following results are returned on failure.
Error Return Values:

ResultInvalidState The state of the session host is invalid.

ResultInvalidArgument Indicates that an invalid pointer was specified as the storage destination.

static LocalFacade* nn::pia::local::LocalFacade::GetInstance ( void  )
inlinestatic

Gets the LocalFacade class instance (singleton pattern).

Returns a NULL pointer if the instance has not yet been created using the CreateInstance function.

Returns
Returns a pointer to the LocalFacade instance.
static void nn::pia::local::LocalFacade::RegisterUpdateEventCallback ( UdsUpdateEventCallback  callback,
void *  pParam 
)
static

Registers the callback function called when the UDS network state changes.

This function wraps the UdsNode::RegisterUpdateEventCallback function. If you are using PiaSession and register or unregister UdsUpdateEventCallback objects, use RegisterUpdateEventCallback and UnregisterUpdateEventCallback, regardless of whether the PiaSession module has been initialized. This function is a static function, because it can register and unregister callbacks even if there is no instance of the LocalFacade class.

Parameters
[in]callbackSpecifies a pointer to the callback function being registered.
[in]pParamSpecifies the pointer passed to the callback function when it is called.
See also
UnregisterUpdateEventCallback, UdsNode::RegisterUpdateEventCallback, UdsNode::UnregisterUpdateEventCallback
virtual nn::Result nn::pia::local::LocalFacade::Startup ( )
virtual

Starts the LocalFacade.

This function can only be called when directly manipulated by the session::Mesh class. This function has the following requirements.

The function fails if these conditions are not met.

Returns
Returns a Result value for which the IsSuccess function returns true if startup succeeds. The following results are returned on failure.
Error Return Values:
ResultInvalidState Indicates that availability conditions have not been met.
static void nn::pia::local::LocalFacade::UnregisterUpdateEventCallback ( )
static

Unregisters the registered callback function for network state changes.

This function wraps the UdsNode::UnregisterUpdateEventCallback function. If you are using PiaSession and register or unregister UdsUpdateEventCallback objects, use RegisterUpdateEventCallback and UnregisterUpdateEventCallback, regardless of whether the PiaSession module has been initialized. This function is a static function, because it can register and unregister callbacks even if there is no instance of the UdsFacade class.

See also
RegisterUpdateEventCallback, UdsNode::RegisterUpdateEventCallback, UdsNode::UnregisterUpdateEventCallback