// copyright 2013-2020 BAE Systems, Thales Group, Object Management Group Inc; 2013 Selex ES, DSTO, Atlas Elektronik, EADS Deutschland GmbH #ifndef ORGOMGC4ISERVICE_INTERFACESSUBSYSTEM_SERVICESSUBSYSTEM_CONTROLMANAGE_MASTERSHIPDEFVAR #define ORGOMGC4ISERVICE_INTERFACESSUBSYSTEM_SERVICESSUBSYSTEM_CONTROLMANAGE_MASTERSHIPDEFVAR #include "Common_Types.idl" #include "Requests.idl" #include "Subsystem_Control.idl" module org { module omg { module c4i { module Service_Interfaces { module Subsystem_Services { module Subsystem_Control { // This package contains interfaces for the Manage Mastership service. module Manage_Mastership { // This method is used by the subsystem to return the mastership state. // Besides the CMS, the subsystem may be controlled via other control points, e.g. // the subsystem local control unit. This interface describes how the CMS, as any // other actor, shall handle the exclusive control of the subsystem (mastership). In // fact, every subsystem may be controlled by only one actor at the same time. Only // the actor who has the mastership of a subsystem may have exclusive control of the // subsystem. Exclusive control means that the subsystem may accept only commands // sent by the actor who has its mastership. // The subsystem Mastership may be acquired in two ways: //
    //
  1. PERIODIC MASTERSHIP REQUEST: The actor who wants to acquire the mastership // of a subsystem send to it a periodic Mastership request; the subsystem may accept // or deny. Once acquired, the subsystem Mastership is released giving up the // periodic Mastership requests sending. This happens both in case of intentional // decision and critical event as CMS unavailability or connection loss. As long as // CMS wants to maintain the Mastership of the subsystem, it shall continue the // periodic Mastership requests sending. The CMS is informed about the Mastership // control state by receiving a periodic message sent by the subsystem.
  2. //
//   //
    //
  1. ASYNCHRONOUS MASTERSHIP REQUEST: The actor who wants to acquire the // mastership of a subsystem send to it an asynchronous request. the subsystem may // accept or deny. Once acquired, the mastership is until the mastership owner // decides to intentionally release it or until a critical event, which is // mastership owner unavailability or connection failure, occurs. In case of // intentional mastership release, the CMS shall send an asynchronous mastership // release request. In case of critical event, the mastership of the subsystem is // automatically released. This happens when the subsystem does no longer receive // the CMS heartbeat. The CMS is informed about the Mastership control state by // receiving an asynchronous message sent on change by the subsystem.
  2. //
// Mastership management rules // The subsystem Mastership assignment is controlled by the subsystem itself // according to the following rules: // // // // // The Mastership management protocol is managed as follows: // // // // // At any time the subsystem Mastership may be either “free”, that is assigned to // none and then available to anybody asks for it, or assigned to somebody, where // this somebody may be CMS or not. At the subsystem power-on the Mastership is // “free”, then: // // // // Note that the Mastership possession is required to control the subsystem (e.g. // execute write commands to it), but it is not required to communicate with // subsystem and receive information from it. // Mastership Override // The Mastership management protocol could include a Mastership Override to force a // Mastership switch from a Master to another one. struct report_mastership_setting_type { org::omg::c4i::Domain_Model::Subsystem_Domain::Subsystem_Control::mastership_state_type control_state; // Indicates which subsystem published the data or is intended to read it as a // subscriber #ifdef DDS_XTYPES @key org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type subsystem_id; #else org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type subsystem_id; #endif }; #ifndef DDS_XTYPES #pragma keylist report_mastership_setting_type subsystem_id #endif // struct holding keys for class acquire_mastership_type. struct acquire_mastership_key_type { // Indicates which subsystem published the data or is intended to read it as a // subscriber org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type subsystem_id; org::omg::c4i::Domain_Model::Common_Types::Requests::request_id_type request_id; }; // This method is used by the CMS to acquire the mastership. struct acquire_mastership_type { // The subsystem to which the request to acquire mastership is being sent. org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type target_subsystem_id; // Indicates which subsystem published the data or is intended to read it as a // subscriber #ifdef DDS_XTYPES @key org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type subsystem_id; #else org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type subsystem_id; #endif #ifdef DDS_XTYPES @key org::omg::c4i::Domain_Model::Common_Types::Requests::request_id_type request_id; #else org::omg::c4i::Domain_Model::Common_Types::Requests::request_id_type request_id; #endif // This parameter is used with implementation specific semantics to manage subsystem // mastership. unsigned long count; }; #ifndef DDS_XTYPES #pragma keylist acquire_mastership_type subsystem_id request_id #endif // struct holding keys for class release_mastership_type. struct release_mastership_key_type { // Indicates which subsystem published the data or is intended to read it as a // subscriber org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type subsystem_id; org::omg::c4i::Domain_Model::Common_Types::Requests::request_id_type request_id; }; // This method is used by the CMS to release the mastership. struct release_mastership_type { org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type target_subsystem_id; // Indicates which subsystem published the data or is intended to read it as a // subscriber #ifdef DDS_XTYPES @key org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type subsystem_id; #else org::omg::c4i::Domain_Model::Common_Types::subsystem_id_type subsystem_id; #endif #ifdef DDS_XTYPES @key org::omg::c4i::Domain_Model::Common_Types::Requests::request_id_type request_id; #else org::omg::c4i::Domain_Model::Common_Types::Requests::request_id_type request_id; #endif // This parameter is used with implementation specific semantics to manage subsystem // mastership. unsigned long count; }; #ifndef DDS_XTYPES #pragma keylist release_mastership_type subsystem_id request_id #endif }; }; }; }; }; }; }; #endif