UdsNode, which was previously used for local communications, has been deprecated. This page describes how to migrate an application developed using UdsNode to the LocalNetwork mesh API.
Note:LocalNetwork is used with PiaSession. For more information about PiaSession, see 6. PiaSession Guide.
Note: For more information about migrating to LocalNetwork and the session API, see 3.4. Migrating From the Mesh API to the Session API (PiaLocal).
See 6.19.3. Directly Controlling Meshes for Local Communications.
See 6.19.3. Directly Controlling Meshes for Local Communications.
There are no APIs equivalent to UdsNode::GetState() and UdsNode::GetConnectionStatus().
Check the connection status by calling the LocalNetwork::IsConnected() function. If the function returns true, you can check whether the local network is a host or client by calling the LocalNetwork::IsHost() and LocalNetwork::IsClient() functions. Check for the maximum number of participants with the Transport::GetMaxStationNum() function, and check for the current number of participants with the Mesh::GetStationNum() function.
The connection state update event callback cannot be configured. Use the session state change event callback for PiaSession when necessary.
The application does not need to prepare for send and receive threads because send and receive data is performed with Pia send and receive threads.
Call the LocalNetwork::DisconnectNetwork() function to make the host start host migration manually. Advance the host migration process by calling the common::Scheduler::Dispatch() function.
To enable this feature, set m_IsEnableAroundNetworkSearch to true for the UdsNetworkSetting instance passed when the LocalNetwork::Initialize() function is called.