ADTF  3.18.2
cADTFRemoteSystem

Default ADTF RPC Client Factory to create Json Object Clients! This factory can will create the Default Clients to communicate with a ADTF instance. More...

Public Member Functions

 cADTFRemoteSystem (const char *strHostUrl)
 CTOR. More...
 
 ~cADTFRemoteSystem ()
 DTOR.
 
adtf::util::cStringList FindObjectsByRPCIID (const char *strRPCIID) const
 Retrieves a list of objectnames registered within the adtf::services::ant::IRPCObjectServerRegistry on server side which supports the given strRPCIID rpc interface id. More...
 
tResult GetObjectClient (const char *strObject, IRPCObjectClientPtr &oClient) const
 Retrieves an implementation of a IRPCObjectClient for the given object if supported. More...
 
tResult Ping () const
 Requests a response of the ADTF Remote System. More...
 
uint64_t GetProcessID () const
 Get Process ID. More...
 
adtf::util::cString GetHostURL () const
 Gets the current Host URL. More...
 

Static Public Attributes

static constexpr const char *const DEFAULT_HOST_URL = ADTF_REMOTE_DEFAULT_HOST_URL
 ADTF System Launcher default JSon Server Address. More...
 

Protected Member Functions

 cADTFRemoteSystem ()
 CTOR.
 

Private Attributes

std::unique_ptr< cADTFRemoteSystemPrivate > _d
 

Detailed Description

Default ADTF RPC Client Factory to create Json Object Clients! This factory can will create the Default Clients to communicate with a ADTF instance.

Definition at line 29 of file adtf_remote_system.h.

Constructor & Destructor Documentation

◆ cADTFRemoteSystem()

cADTFRemoteSystem ( const char *  strHostUrl)
explicit

CTOR.

Parameters
[in]strHostUrlHost URL of the ADTF System. By default the DEFAULT_HOST_URL will be used.

Member Function Documentation

◆ FindObjectsByRPCIID()

adtf::util::cStringList FindObjectsByRPCIID ( const char *  strRPCIID) const

Retrieves a list of objectnames registered within the adtf::services::ant::IRPCObjectServerRegistry on server side which supports the given strRPCIID rpc interface id.

Parameters
[in]strRPCIIDThe rpc interface id to look for.
Returns
The list of object names.

◆ GetHostURL()

adtf::util::cString GetHostURL ( ) const

Gets the current Host URL.

Returns
The value of the ADTF System Host URL.

◆ GetObjectClient()

tResult GetObjectClient ( const char *  strObject,
IRPCObjectClientPtr oClient 
) const

Retrieves an implementation of a IRPCObjectClient for the given object if supported.

Following interfaces are supported:

Use as follows:

if (IS_OK(oADTFSystem.GetObjectClient(adtf::remote::ISystem::DEFAULT_NAME, pSystem)))
{
int8_t i8CurrentRunlevel = pSystem->GetRunlevel();
}
static constexpr const tChar *const DEFAULT_NAME
Default RPC object server name of the ADTF System RPC object server.
static constexpr const char *const DEFAULT_HOST_URL
ADTF System Launcher default JSon Server Address.
Parameters
[in]strObjectObject name
[in]oClientImplementation of IRPCObjectClientPtr to retrieve the IRPCObjectClient to. See also rpc_object_client_ptr
Returns
Result Code of IRPCObjectClientPtr if object and supported interface is found.
Return values
ERR_NOT_SUPPORTEDInterface is not supported
ERR_NOT_FOUNDObject is not found
Remarks
As IRPCObjectClientPtr uses std::shared_ptr this is NOT binary compatible!

◆ GetProcessID()

uint64_t GetProcessID ( ) const

Get Process ID.

Returns
return the current proc id of the far system.

◆ Ping()

tResult Ping ( ) const

Requests a response of the ADTF Remote System.

Use to check if a system is available on the given URL.

Return values
ERR_NOERRORADTF is available.
ERR_NOT_CONNECTEDADTF Remote System did not response.

Member Data Documentation

◆ DEFAULT_HOST_URL

constexpr const char* const DEFAULT_HOST_URL = ADTF_REMOTE_DEFAULT_HOST_URL
staticconstexpr

ADTF System Launcher default JSon Server Address.

See also
ADTF_REMOTE_DEFAULT_HOST_URL

Definition at line 57 of file adtf_remote_system.h.