// Generated by arxml2cpp from ARXML ServiceInterface
#include "skeleton/temperature_service_skeleton.h"
#include <ara/exec/application_client.h>
void SkeletonMain() {
ara::core::Initialize();
TemperatureServiceSkeleton skel(
ara::core::InstanceSpecifier{
"SkeletonApp/TemperatureService/Instance0"});
skel.OfferService();
ara::exec::ApplicationClient appClient;
appClient.ReportApplicationState(
ara::exec::ApplicationState::kRunning);
float temp = 20.0f;
while (running) {
skel.Temperature.Send(temp); // send Event at 10 Hz
temp += 0.1f;
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
appClient.ReportApplicationState(
ara::exec::ApplicationState::kTerminating);
skel.StopOfferService();
ara::core::Deinitialize();
}
💡 OfferService()
OfferService() registers the skeleton with ara::com CM and triggers a SOME/IP-SD Offer Service message. Subscribers will receive all future Send() calls. The skeleton destructor automatically calls StopOfferService() if not called explicitly.