#include "wire_Alert.hpp"
#include "../obapi_runtime.hpp"
#include <type_traits>
static_assert(std::is_same<::M_Alert::AlertIdType, std::string>::value, "typedef M_Alert::AlertIdType differs from the data model");
static_assert(std::is_same<::M_Alert::AlertIdListType, std::vector<std::string>>::value, "typedef M_Alert::AlertIdListType differs from the data model");
static_assert(static_cast<uint32_t>(::M_Alert::AlarmCategoryKind::Critical_Warning) == 0u, "enum value M_Alert::AlarmCategoryKind::Type::Critical_Warning differs from the data model");
static_assert(static_cast<uint32_t>(::M_Alert::AlarmCategoryKind::Warning) == 1u, "enum value M_Alert::AlarmCategoryKind::Type::Warning differs from the data model");
static_assert(static_cast<uint32_t>(::M_Alert::AlarmCategoryKind::Caution) == 2u, "enum value M_Alert::AlarmCategoryKind::Type::Caution differs from the data model");
static_assert(static_cast<uint32_t>(::M_Alert::AlarmCategoryKind::Advisory) == 3u, "enum value M_Alert::AlarmCategoryKind::Type::Advisory differs from the data model");
static_assert(static_cast<uint32_t>(::M_Alert::AlarmStatusKind::Unknown) == 0u, "enum value M_Alert::AlarmStatusKind::Type::Unknown differs from the data model");
static_assert(static_cast<uint32_t>(::M_Alert::AlarmStatusKind::Inactive) == 1u, "enum value M_Alert::AlarmStatusKind::Type::Inactive differs from the data model");
static_assert(static_cast<uint32_t>(::M_Alert::AlarmStatusKind::Active) == 2u, "enum value M_Alert::AlarmStatusKind::Type::Active differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AudioToneInfoType::ToneFrequency), double>::value, "M_Alert::AudioToneInfoType field ToneFrequency differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AudioToneInfoType::ToneModulationType), std::string>::value, "M_Alert::AudioToneInfoType field ToneModulationType differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AudioToneInfoType::ToneRepetitionFrequency), double>::value, "M_Alert::AudioToneInfoType field ToneRepetitionFrequency differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AudioToneInfoType::ToneMaxVolume), double>::value, "M_Alert::AudioToneInfoType field ToneMaxVolume differs from the data model");
static_assert(std::is_same<::M_Alert::AudioToneInfoOptionalType, std::vector<::M_Alert::AudioToneInfoType>>::value, "typedef M_Alert::AudioToneInfoOptionalType differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionInfoType::SubsystemName), std::string>::value, "M_Alert::AlarmConditionInfoType field SubsystemName differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionInfoType::ComponentName), std::string>::value, "M_Alert::AlarmConditionInfoType field ComponentName differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionInfoType::Measure), std::string>::value, "M_Alert::AlarmConditionInfoType field Measure differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionInfoType::Nature), std::string>::value, "M_Alert::AlarmConditionInfoType field Nature differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionInfoType::AlarmDescription), std::string>::value, "M_Alert::AlarmConditionInfoType field AlarmDescription differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionStatusType::ConditionInfo), ::M_Alert::AlarmConditionInfoType>::value, "M_Alert::AlarmConditionStatusType field ConditionInfo differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionStatusType::Category), ::M_Alert::AlarmCategoryKind::Type>::value, "M_Alert::AlarmConditionStatusType field Category differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionStatusType::CategoryName), std::string>::value, "M_Alert::AlarmConditionStatusType field CategoryName differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionStatusType::ConditionName), std::string>::value, "M_Alert::AlarmConditionStatusType field ConditionName differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionStatusType::HasMultipleInstances), bool>::value, "M_Alert::AlarmConditionStatusType field HasMultipleInstances differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmConditionStatusType::IsOverridden), bool>::value, "M_Alert::AlarmConditionStatusType field IsOverridden differs from the data model");
static_assert(std::is_same<::M_Alert::AlarmConditionStatusListType, std::vector<::M_Alert::AlarmConditionStatusType>>::value, "typedef M_Alert::AlarmConditionStatusListType differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatConditionInfoType::TypeOfThreat), std::string>::value, "M_Alert::ThreatConditionInfoType field TypeOfThreat differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatConditionInfoType::ThreatStatus), std::string>::value, "M_Alert::ThreatConditionInfoType field ThreatStatus differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatConditionInfoType::ThreatDescription), std::string>::value, "M_Alert::ThreatConditionInfoType field ThreatDescription differs from the data model");
static_assert(std::is_same<::M_Alert::ThreatConditionInfoListType, std::vector<::M_Alert::ThreatConditionInfoType>>::value, "typedef M_Alert::ThreatConditionInfoListType differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmCategoryInfoType::Abbreviation), std::string>::value, "M_Alert::AlarmCategoryInfoType field Abbreviation differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmCategoryInfoType::IsAutoAcknowledged), bool>::value, "M_Alert::AlarmCategoryInfoType field IsAutoAcknowledged differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmCategoryInfoType::AutoAcknowledgeTimeout), uint32_t>::value, "M_Alert::AlarmCategoryInfoType field AutoAcknowledgeTimeout differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmCategoryInfoType::IsHiddenOnAcknowledge), bool>::value, "M_Alert::AlarmCategoryInfoType field IsHiddenOnAcknowledge differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmCategoryInfoType::IsRepeated), bool>::value, "M_Alert::AlarmCategoryInfoType field IsRepeated differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmCategoryInfoType::RepeatTimeout), uint32_t>::value, "M_Alert::AlarmCategoryInfoType field RepeatTimeout differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmCategoryInfoType::NotifyingTone), std::vector<::M_Alert::AudioToneInfoType>>::value, "M_Alert::AlarmCategoryInfoType field NotifyingTone differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmCategoryInfoType::RelevantCrewRoles), std::vector<std::string>>::value, "M_Alert::AlarmCategoryInfoType field RelevantCrewRoles differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertSettingsType::AlarmCategoryWarning), ::M_Alert::AlarmCategoryInfoType>::value, "M_Alert::AlertSettingsType field AlarmCategoryWarning differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertSettingsType::AlarmCategoryAdvisory), ::M_Alert::AlarmCategoryInfoType>::value, "M_Alert::AlertSettingsType field AlarmCategoryAdvisory differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertSettingsType::AlarmCategoryCaution), ::M_Alert::AlarmCategoryInfoType>::value, "M_Alert::AlertSettingsType field AlarmCategoryCaution differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertSettingsType::ThreatNotifyingTone), std::vector<::M_Alert::AudioToneInfoType>>::value, "M_Alert::AlertSettingsType field ThreatNotifyingTone differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertStatusType::AlarmConditionStatusList), std::vector<::M_Alert::AlarmConditionStatusType>>::value, "M_Alert::AlertStatusType field AlarmConditionStatusList differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertStatusType::ThreatConditionStatusList), std::vector<::M_Alert::ThreatConditionInfoType>>::value, "M_Alert::AlertStatusType field ThreatConditionStatusList differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertStatusType::NumberOfActiveWarningAlarms), uint32_t>::value, "M_Alert::AlertStatusType field NumberOfActiveWarningAlarms differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertStatusType::NumberOfActiveAdvisoryAlarms), uint32_t>::value, "M_Alert::AlertStatusType field NumberOfActiveAdvisoryAlarms differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertStatusType::NumberOfActiveCautionAlarms), uint32_t>::value, "M_Alert::AlertStatusType field NumberOfActiveCautionAlarms differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlertStatusType::NumberOfActiveThreatAlerts), uint32_t>::value, "M_Alert::AlertStatusType field NumberOfActiveThreatAlerts differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmLogType::Status), ::M_Alert::AlarmStatusKind::Type>::value, "M_Alert::AlarmLogType field Status differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmLogType::IsSuppressed), bool>::value, "M_Alert::AlarmLogType field IsSuppressed differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmLogType::IsAcknowledged), bool>::value, "M_Alert::AlarmLogType field IsAcknowledged differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmLogType::IsAutoAcknowledged), bool>::value, "M_Alert::AlarmLogType field IsAutoAcknowledged differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmLogType::Condition), ::M_Alert::AlarmConditionInfoType>::value, "M_Alert::AlarmLogType field Condition differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmLogType::Category), ::M_Alert::AlarmCategoryKind::Type>::value, "M_Alert::AlarmLogType field Category differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmLogType::TimeRaised), ::M_Common::TimeType>::value, "M_Alert::AlarmLogType field TimeRaised differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmLogType::TimeAcknowledged), std::vector<::M_Common::TimeType>>::value, "M_Alert::AlarmLogType field TimeAcknowledged differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmAnnunciationType::AlarmId), std::string>::value, "M_Alert::AlarmAnnunciationType field AlarmId differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmAnnunciationType::ConditionInfo), ::M_Alert::AlarmConditionInfoType>::value, "M_Alert::AlarmAnnunciationType field ConditionInfo differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmAnnunciationType::Category), ::M_Alert::AlarmCategoryKind::Type>::value, "M_Alert::AlarmAnnunciationType field Category differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmAnnunciationType::NotifyingTone), std::vector<::M_Alert::AudioToneInfoType>>::value, "M_Alert::AlarmAnnunciationType field NotifyingTone differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::AlarmAnnunciationType::TimeRaised), ::M_Common::TimeType>::value, "M_Alert::AlarmAnnunciationType field TimeRaised differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatLogType::ThreatInfo), ::M_Alert::ThreatConditionInfoType>::value, "M_Alert::ThreatLogType field ThreatInfo differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatLogType::ObjectId), std::vector<std::string>>::value, "M_Alert::ThreatLogType field ObjectId differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatLogType::LocationAtTimeOfDetection), std::vector<::M_Common::PositionType>>::value, "M_Alert::ThreatLogType field LocationAtTimeOfDetection differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatLogType::TimeOfDetection), ::M_Common::TimeType>::value, "M_Alert::ThreatLogType field TimeOfDetection differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatAnnunciationType::ThreatAlertId), std::string>::value, "M_Alert::ThreatAnnunciationType field ThreatAlertId differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatAnnunciationType::ThreatInfo), ::M_Alert::ThreatConditionInfoType>::value, "M_Alert::ThreatAnnunciationType field ThreatInfo differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatAnnunciationType::NotifyingTone), std::vector<::M_Alert::AudioToneInfoType>>::value, "M_Alert::ThreatAnnunciationType field NotifyingTone differs from the data model");
static_assert(std::is_same<decltype(::M_Alert::ThreatAnnunciationType::TimeOfDetection), ::M_Common::TimeType>::value, "M_Alert::ThreatAnnunciationType field TimeOfDetection differs from the data model");
namespace M_Alert {
void obapi_put(::obapi::Writer& w, AudioToneInfoType const& v) {
::obapi::put(w, v.ToneFrequency);
::obapi::put(w, v.ToneModulationType);
::obapi::put(w, v.ToneRepetitionFrequency);
::obapi::put(w, v.ToneMaxVolume);
}
void obapi_get(::obapi::Reader& r, AudioToneInfoType& v) {
::obapi::get(r, v.ToneFrequency);
::obapi::get(r, v.ToneModulationType);
::obapi::get(r, v.ToneRepetitionFrequency);
::obapi::get(r, v.ToneMaxVolume);
}
void obapi_put(::obapi::Writer& w, AlarmConditionInfoType const& v) {
::obapi::put(w, v.SubsystemName);
::obapi::put(w, v.ComponentName);
::obapi::put(w, v.Measure);
::obapi::put(w, v.Nature);
::obapi::put(w, v.AlarmDescription);
}
void obapi_get(::obapi::Reader& r, AlarmConditionInfoType& v) {
::obapi::get(r, v.SubsystemName);
::obapi::get(r, v.ComponentName);
::obapi::get(r, v.Measure);
::obapi::get(r, v.Nature);
::obapi::get(r, v.AlarmDescription);
}
void obapi_put(::obapi::Writer& w, AlarmConditionStatusType const& v) {
::obapi::put(w, v.ConditionInfo);
::obapi::put(w, v.Category);
::obapi::put(w, v.CategoryName);
::obapi::put(w, v.ConditionName);
::obapi::put(w, v.HasMultipleInstances);
::obapi::put(w, v.IsOverridden);
}
void obapi_get(::obapi::Reader& r, AlarmConditionStatusType& v) {
::obapi::get(r, v.ConditionInfo);
::obapi::get(r, v.Category);
::obapi::get(r, v.CategoryName);
::obapi::get(r, v.ConditionName);
::obapi::get(r, v.HasMultipleInstances);
::obapi::get(r, v.IsOverridden);
}
void obapi_put(::obapi::Writer& w, ThreatConditionInfoType const& v) {
::obapi::put(w, v.TypeOfThreat);
::obapi::put(w, v.ThreatStatus);
::obapi::put(w, v.ThreatDescription);
}
void obapi_get(::obapi::Reader& r, ThreatConditionInfoType& v) {
::obapi::get(r, v.TypeOfThreat);
::obapi::get(r, v.ThreatStatus);
::obapi::get(r, v.ThreatDescription);
}
void obapi_put(::obapi::Writer& w, AlarmCategoryInfoType const& v) {
::obapi::put(w, v.Abbreviation);
::obapi::put(w, v.IsAutoAcknowledged);
::obapi::put(w, v.AutoAcknowledgeTimeout);
::obapi::put(w, v.IsHiddenOnAcknowledge);
::obapi::put(w, v.IsRepeated);
::obapi::put(w, v.RepeatTimeout);
::obapi::put(w, v.NotifyingTone);
::obapi::put(w, v.RelevantCrewRoles);
}
void obapi_get(::obapi::Reader& r, AlarmCategoryInfoType& v) {
::obapi::get(r, v.Abbreviation);
::obapi::get(r, v.IsAutoAcknowledged);
::obapi::get(r, v.AutoAcknowledgeTimeout);
::obapi::get(r, v.IsHiddenOnAcknowledge);
::obapi::get(r, v.IsRepeated);
::obapi::get(r, v.RepeatTimeout);
::obapi::get(r, v.NotifyingTone);
::obapi::get(r, v.RelevantCrewRoles);
}
void obapi_put(::obapi::Writer& w, AlertSettingsType const& v) {
::obapi::put(w, v.AlarmCategoryWarning);
::obapi::put(w, v.AlarmCategoryAdvisory);
::obapi::put(w, v.AlarmCategoryCaution);
::obapi::put(w, v.ThreatNotifyingTone);
}
void obapi_get(::obapi::Reader& r, AlertSettingsType& v) {
::obapi::get(r, v.AlarmCategoryWarning);
::obapi::get(r, v.AlarmCategoryAdvisory);
::obapi::get(r, v.AlarmCategoryCaution);
::obapi::get(r, v.ThreatNotifyingTone);
}
void obapi_put(::obapi::Writer& w, AlertStatusType const& v) {
::obapi::put(w, v.AlarmConditionStatusList);
::obapi::put(w, v.ThreatConditionStatusList);
::obapi::put(w, v.NumberOfActiveWarningAlarms);
::obapi::put(w, v.NumberOfActiveAdvisoryAlarms);
::obapi::put(w, v.NumberOfActiveCautionAlarms);
::obapi::put(w, v.NumberOfActiveThreatAlerts);
}
void obapi_get(::obapi::Reader& r, AlertStatusType& v) {
::obapi::get(r, v.AlarmConditionStatusList);
::obapi::get(r, v.ThreatConditionStatusList);
::obapi::get(r, v.NumberOfActiveWarningAlarms);
::obapi::get(r, v.NumberOfActiveAdvisoryAlarms);
::obapi::get(r, v.NumberOfActiveCautionAlarms);
::obapi::get(r, v.NumberOfActiveThreatAlerts);
}
void obapi_put(::obapi::Writer& w, AlarmLogType const& v) {
::obapi::put(w, v.Status);
::obapi::put(w, v.IsSuppressed);
::obapi::put(w, v.IsAcknowledged);
::obapi::put(w, v.IsAutoAcknowledged);
::obapi::put(w, v.Condition);
::obapi::put(w, v.Category);
::obapi::put(w, v.TimeRaised);
::obapi::put(w, v.TimeAcknowledged);
}
void obapi_get(::obapi::Reader& r, AlarmLogType& v) {
::obapi::get(r, v.Status);
::obapi::get(r, v.IsSuppressed);
::obapi::get(r, v.IsAcknowledged);
::obapi::get(r, v.IsAutoAcknowledged);
::obapi::get(r, v.Condition);
::obapi::get(r, v.Category);
::obapi::get(r, v.TimeRaised);
::obapi::get(r, v.TimeAcknowledged);
}
void obapi_put(::obapi::Writer& w, AlarmAnnunciationType const& v) {
::obapi::put(w, v.AlarmId);
::obapi::put(w, v.ConditionInfo);
::obapi::put(w, v.Category);
::obapi::put(w, v.NotifyingTone);
::obapi::put(w, v.TimeRaised);
}
void obapi_get(::obapi::Reader& r, AlarmAnnunciationType& v) {
::obapi::get(r, v.AlarmId);
::obapi::get(r, v.ConditionInfo);
::obapi::get(r, v.Category);
::obapi::get(r, v.NotifyingTone);
::obapi::get(r, v.TimeRaised);
}
void obapi_put(::obapi::Writer& w, ThreatLogType const& v) {
::obapi::put(w, v.ThreatInfo);
::obapi::put(w, v.ObjectId);
::obapi::put(w, v.LocationAtTimeOfDetection);
::obapi::put(w, v.TimeOfDetection);
}
void obapi_get(::obapi::Reader& r, ThreatLogType& v) {
::obapi::get(r, v.ThreatInfo);
::obapi::get(r, v.ObjectId);
::obapi::get(r, v.LocationAtTimeOfDetection);
::obapi::get(r, v.TimeOfDetection);
}
void obapi_put(::obapi::Writer& w, ThreatAnnunciationType const& v) {
::obapi::put(w, v.ThreatAlertId);
::obapi::put(w, v.ThreatInfo);
::obapi::put(w, v.NotifyingTone);
::obapi::put(w, v.TimeOfDetection);
}
void obapi_get(::obapi::Reader& r, ThreatAnnunciationType& v) {
::obapi::get(r, v.ThreatAlertId);
::obapi::get(r, v.ThreatInfo);
::obapi::get(r, v.NotifyingTone);
::obapi::get(r, v.TimeOfDetection);
}
}
namespace {
struct ServiceCallbacks final : ::M_Alert::IService {
::obapi::Dispatcher dispatcher;
void CmdRaiseAlarm(::M_Alert::AlarmConditionInfoType const& Condition) override {
::obapi::Writer w;
::obapi::put(w, Condition);
dispatcher.dispatch(0u, w);
}
void CmdResolveAlarm(::M_Alert::AlarmConditionInfoType const& Condition) override {
::obapi::Writer w;
::obapi::put(w, Condition);
dispatcher.dispatch(1u, w);
}
void CmdAcknowledgeAlarm(::M_Alert::AlertIdListType const& AlarmIdList) override {
::obapi::Writer w;
::obapi::put(w, AlarmIdList);
dispatcher.dispatch(2u, w);
}
void CmdOverrideAlarmCondition(::M_Alert::AlarmConditionInfoType const& Condition) override {
::obapi::Writer w;
::obapi::put(w, Condition);
dispatcher.dispatch(3u, w);
}
void CmdUnoverrideAlarmCondition(::M_Alert::AlarmConditionInfoType const& Condition) override {
::obapi::Writer w;
::obapi::put(w, Condition);
dispatcher.dispatch(4u, w);
}
void CmdClearAlarm(::M_Alert::AlertIdListType const& AlarmIdList) override {
::obapi::Writer w;
::obapi::put(w, AlarmIdList);
dispatcher.dispatch(5u, w);
}
void CmdRaiseThreatAlert(::M_Alert::AlertIdType const& ThreatId, ::M_Alert::ThreatLogType const& Threat) override {
::obapi::Writer w;
::obapi::put(w, ThreatId);
::obapi::put(w, Threat);
dispatcher.dispatch(6u, w);
}
void CmdCancelThreatAlert(::M_Alert::AlertIdListType const& ThreatIdList) override {
::obapi::Writer w;
::obapi::put(w, ThreatIdList);
dispatcher.dispatch(7u, w);
}
};
struct ClientCallbacks final : ::M_Alert::IClient {
::obapi::Dispatcher dispatcher;
void ReportAlertSettings(::M_Alert::AlertSettingsType const& Settings) override {
::obapi::Writer w;
::obapi::put(w, Settings);
dispatcher.dispatch(0u, w);
}
void ReportAlertStatus(::M_Alert::AlertStatusType const& Status, bool IsRemoved) override {
::obapi::Writer w;
::obapi::put(w, Status);
::obapi::put(w, IsRemoved);
dispatcher.dispatch(1u, w);
}
void ReportAlarmLog(::M_Alert::AlertIdType const& KeyAlarmId, ::M_Alert::AlarmLogType const& Alarm, bool IsRemoved) override {
::obapi::Writer w;
::obapi::put(w, KeyAlarmId);
::obapi::put(w, Alarm);
::obapi::put(w, IsRemoved);
dispatcher.dispatch(2u, w);
}
void ReportAlarmAnnunciation(std::string const& KeyCrewRole, ::M_Alert::AlarmAnnunciationType const& Annunciation, bool IsRemoved) override {
::obapi::Writer w;
::obapi::put(w, KeyCrewRole);
::obapi::put(w, Annunciation);
::obapi::put(w, IsRemoved);
dispatcher.dispatch(3u, w);
}
void ReportThreatLog(::M_Alert::AlertIdType const& KeyThreatId, ::M_Alert::ThreatLogType const& Threat, bool IsRemoved) override {
::obapi::Writer w;
::obapi::put(w, KeyThreatId);
::obapi::put(w, Threat);
::obapi::put(w, IsRemoved);
dispatcher.dispatch(4u, w);
}
void ReportThreatAnnunciation(::M_Alert::ThreatAnnunciationType const& Annunciation, bool IsRemoved) override {
::obapi::Writer w;
::obapi::put(w, Annunciation);
::obapi::put(w, IsRemoved);
dispatcher.dispatch(5u, w);
}
};
void service_send(::obapi::Holder<::M_Alert::Service, ServiceCallbacks>& h, uint32_t op, ::obapi::Reader& r) {
switch (op) {
case 0u: {
::M_Alert::AlertSettingsType Settings{};
::obapi::get(r, Settings);
r.finish();
h.endpoint->ReportAlertSettings(Settings);
return;
}
case 1u: {
::M_Alert::AlertStatusType Status{};
::obapi::get(r, Status);
bool IsRemoved{};
::obapi::get(r, IsRemoved);
r.finish();
h.endpoint->ReportAlertStatus(Status, IsRemoved);
return;
}
case 2u: {
::M_Alert::AlertIdType KeyAlarmId{};
::obapi::get(r, KeyAlarmId);
::M_Alert::AlarmLogType Alarm{};
::obapi::get(r, Alarm);
bool IsRemoved{};
::obapi::get(r, IsRemoved);
r.finish();
h.endpoint->ReportAlarmLog(KeyAlarmId, Alarm, IsRemoved);
return;
}
case 3u: {
std::string KeyCrewRole{};
::obapi::get(r, KeyCrewRole);
::M_Alert::AlarmAnnunciationType Annunciation{};
::obapi::get(r, Annunciation);
bool IsRemoved{};
::obapi::get(r, IsRemoved);
r.finish();
h.endpoint->ReportAlarmAnnunciation(KeyCrewRole, Annunciation, IsRemoved);
return;
}
case 4u: {
::M_Alert::AlertIdType KeyThreatId{};
::obapi::get(r, KeyThreatId);
::M_Alert::ThreatLogType Threat{};
::obapi::get(r, Threat);
bool IsRemoved{};
::obapi::get(r, IsRemoved);
r.finish();
h.endpoint->ReportThreatLog(KeyThreatId, Threat, IsRemoved);
return;
}
case 5u: {
::M_Alert::ThreatAnnunciationType Annunciation{};
::obapi::get(r, Annunciation);
bool IsRemoved{};
::obapi::get(r, IsRemoved);
r.finish();
h.endpoint->ReportThreatAnnunciation(Annunciation, IsRemoved);
return;
}
default: throw ::obapi::UnknownOp(op);
}
}
void client_send(::obapi::Holder<::M_Alert::Client, ClientCallbacks>& h, uint32_t op, ::obapi::Reader& r) {
switch (op) {
case 0u: {
::M_Alert::AlarmConditionInfoType Condition{};
::obapi::get(r, Condition);
r.finish();
h.endpoint->CmdRaiseAlarm(Condition);
return;
}
case 1u: {
::M_Alert::AlarmConditionInfoType Condition{};
::obapi::get(r, Condition);
r.finish();
h.endpoint->CmdResolveAlarm(Condition);
return;
}
case 2u: {
::M_Alert::AlertIdListType AlarmIdList{};
::obapi::get(r, AlarmIdList);
r.finish();
h.endpoint->CmdAcknowledgeAlarm(AlarmIdList);
return;
}
case 3u: {
::M_Alert::AlarmConditionInfoType Condition{};
::obapi::get(r, Condition);
r.finish();
h.endpoint->CmdOverrideAlarmCondition(Condition);
return;
}
case 4u: {
::M_Alert::AlarmConditionInfoType Condition{};
::obapi::get(r, Condition);
r.finish();
h.endpoint->CmdUnoverrideAlarmCondition(Condition);
return;
}
case 5u: {
::M_Alert::AlertIdListType AlarmIdList{};
::obapi::get(r, AlarmIdList);
r.finish();
h.endpoint->CmdClearAlarm(AlarmIdList);
return;
}
case 6u: {
::M_Alert::AlertIdType ThreatId{};
::obapi::get(r, ThreatId);
::M_Alert::ThreatLogType Threat{};
::obapi::get(r, Threat);
r.finish();
h.endpoint->CmdRaiseThreatAlert(ThreatId, Threat);
return;
}
case 7u: {
::M_Alert::AlertIdListType ThreatIdList{};
::obapi::get(r, ThreatIdList);
r.finish();
h.endpoint->CmdCancelThreatAlert(ThreatIdList);
return;
}
default: throw ::obapi::UnknownOp(op);
}
}
}
extern "C" const obapi_vtable obapi_Alert_service_vtable = ::obapi::Endpoint<::M_Alert::Service, ServiceCallbacks, &service_send, false>::vtable("M_Alert", "Service");
extern "C" const obapi_vtable obapi_Alert_client_vtable = ::obapi::Endpoint<::M_Alert::Client, ClientCallbacks, &client_send, true>::vtable("M_Alert", "Client");