CTR Pia
4.11.3
Game Communication Engine
|
Represents the facade (interface wrapper) class for the local communication library.
.
More...
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 LocalFacade * | GetInstance (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... | |
Represents the facade (interface wrapper) class for the local communication library.
.
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.
|
virtual |
Cleans up the LocalFacade
.
This function can only be called when directly manipulated by the session::Mesh
class.
|
static |
Creates the LocalFacade
class instance (singleton pattern).
You must call this function after the LocalNetwork::CreateInstance
function.
Result
value that indicates success if the instance is created successfully. 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.
[out] | pStationConnectionInfo | Stores the session host's StationConnectionInfo . |
Result
value for which the IsSuccess
function return true
if conversion succeeds. The following results are returned on failure. ResultInvalidState
The state of the session host is invalid.
ResultInvalidArgument
Indicates that an invalid pointer was specified as the storage destination.
|
inlinestatic |
Gets the LocalFacade
class instance (singleton pattern).
Returns a NULL
pointer if the instance has not yet been created using the CreateInstance
function.
LocalFacade
instance.
|
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.
[in] | callback | Specifies a pointer to the callback function being registered. |
[in] | pParam | Specifies the pointer passed to the callback function when it is called. |
|
virtual |
Starts the LocalFacade
.
This function can only be called when directly manipulated by the session::Mesh
class. This function has the following requirements.
nn::pia::transport::Transport
instance must be available. The function fails if these conditions are not met.
Result
value for which the IsSuccess
function returns true
if startup succeeds. The following results are returned on failure. ResultInvalidState
Indicates that availability conditions have not been met.
|
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.