#include <adtf_systemsdk.h>
#include "demo_rpc_server.h"
#include "demo_rpc_object_server.h"
cRPCServerService::cRPCServerService()
{
SetDescription("Use this System Service to extend the ADTF System with a calculator server using RPC interfaces.");
SetHelpLink("$(ADTF_DIR)/doc/adtf_html/page_demo_rpc.html");
}
tResult cRPCServerService::ServiceInit()
{
object_ptr<adtf::remote::IRPCObjectServer> pServerObject = make_object_ptr<cCalculator>();
RETURN_IF_FAILED(adtf::remote::rpc_register_object_server(ICalculatorRPC::DEFAULT_NAME, pServerObject));
}
tResult cRPCServerService::ServiceShutdown()
{
adtf::remote::rpc_unregister_object_server(ICalculatorRPC::DEFAULT_NAME);
}
#define RETURN_IF_FAILED(s)
Return if expression is failed, which requires the calling function's return type to be tResult.
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Namespace for the ADTF Base SDK.
Namespace for the ADTF System SDK.
Namespace for the ADTF uCOM3 SDK.