// copyright 2013-2020 BAE Systems, Thales Group, Object Management Group Inc; 2013 Selex ES, DSTO, Atlas Elektronik, EADS Deutschland GmbH #ifndef ORGOMGC4IDOMAIN_MODELCOMMON_TYPESREQUESTSDEFVAR #define ORGOMGC4IDOMAIN_MODELCOMMON_TYPESREQUESTSDEFVAR #include "Common_Types.idl" module org { module omg { module c4i { module Domain_Model { module Common_Types { // This package contains common operations and associated parameters which are used // by multiple interfaces. This includes the operation to acknowledge a CMS request // as accepted or denied, as well as an operation to report errors while processing // an accepted CMS request. module Requests { // A string type // String which indicates rationale for rejection of the request. Is not valid when // the request has been accepted. typedef string<40> denial_reason_type; // A string type // A string which gives an indication of the error associated with processing of the // request. typedef string<40> error_reason_type; // A string type // A string which refers to a parameter in a request using an implementation // specific notation. typedef string<64> parameter_reference_type; // The purpose of the request_id is to uniquely relate responses of the subsystem // (server) to requests of the CMS (client). The request_id is set by the client. It // is the responsibility of the client to specify a system-wide unique request_id // (e.g. based on a combination of client id and a sequence number / time of // request). typedef unsigned long request_id_type; // struct holding keys for class receive_acknowledgement_type. struct receive_acknowledgement_key_type { request_id_type request_id; // 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; }; // A sequence type, to represent multiple values. typedef sequence denial_related_parameter_type; // struct holding keys for class receive_error_type. struct receive_error_key_type { request_id_type request_id; // 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; }; // Struct used within the receive_acknowledgement operation to provide information // on (one of the reasons) why a request has been rejected. struct denial_type { // textual explanation of (one of) the reasons for rejection denial_reason_type reason; // A reference to the parameter or parameters that relate to the reason for // rejection. If no related_parameters are supplied the rejection relates to the // whole request. denial_related_parameter_type related_parameter; }; // This operation is used by the subsystem to indicate an error in processing a // request. // Interface which includes operations common to all CMS interfaces. struct receive_error_type { #ifdef DDS_XTYPES @key request_id_type request_id; #else request_id_type request_id; #endif // 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 error_reason_type error_reason; }; #ifndef DDS_XTYPES #pragma keylist receive_error_type request_id subsystem_id #endif // a simple union type, to represent an optional value union request_ack_rejection_type switch (boolean) { // the value when present case TRUE : denial_type value; }; // Struct used within the receive_acknowledgement operation to indicate acceptance // or rejection (which includes rationale). struct request_ack_type { // Attribute to indicate whether a request has been accepted (1) or rejected (0). boolean accepted; request_ack_rejection_type rejection; }; // This operation is used by the subsystem to indicate whether it has accepted or // rejected a request from the CMS. // Interface which includes operations common to all CMS interfaces. struct receive_acknowledgement_type { #ifdef DDS_XTYPES @key request_id_type request_id; #else request_id_type request_id; #endif // 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 request_ack_type request_ack; }; #ifndef DDS_XTYPES #pragma keylist receive_acknowledgement_type request_id subsystem_id #endif }; }; }; }; }; }; #endif