### Navigation

- index
- next |
- previous |
- RMI User Guide »

# 6. RMI Interface to DDS topics mapping rules

This chapter demonstrates the mapping rules driving the transformation of the IDL declarations of the RMI interfaces into the IDL declarations of the implied DDS topics.

- For each `<InterfaceName>`, a new module is created with the same name and scope in the module `DDS_RMI`, where all the topics associated with the interface operations will be made.
- Each `<InterfaceName>.<operation name>` creates two data structures, suffixed respectively with `_request` for the data structure that handles the request, and `_reply` for the data structure that handles the reply.
- The `<operation name>_request` data struct will gather all `[in]` or `[inout]` parameters.
- The `<operation name>_reply` data struct will gather the return value and all `[inout]` or `[out]` parameters.
- `req_info` is used to enable the client service handler to pick the reply it is waiting for.

    module HelloWorld {
       local interface HelloService : ::DDS_RMI::Services
       {
          void op1 (in string p1, inout short p2, out long p3);
       };
    };

    module DDS_RMI {
      module HelloWorld {
        module HelloService {

       struct op1_request {
               DDS_RMI::Request_Header req_info;
               string p1;
               short p2;
            };
       #pragma keylist op1_request req_info.client_id.client_impl
                       req_info.client_id.client_instance

           struct op1_reply {
               DDS_RMI::Request_Header req_info;
               short p2;
               long p3;
           };
       #pragma keylist op1_reply req_info.client_id.client_impl
                       req_info.client_id.client_instance

        };
      };
    };

### Navigation

- index
- next |
- previous |
- RMI User Guide »