1 / 13

ACS Training IDL interfaces for a Component

ACS Training IDL interfaces for a Component. G.Chiozzi. Garching, 16 th – 19 th January, 2007. ACS Interfaces and IDL. IDL Interface. Interfaces vs. Implementations Accessed through well-defined interface Internals not available - users of object have no knowledge of implementation

wrichardson
Download Presentation

ACS Training IDL interfaces for a Component

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ACS TrainingIDL interfaces for a Component G.Chiozzi Garching, 16th – 19th January, 2007

  2. ACS Interfaces and IDL IDL Interface Interfaces vs. Implementations Accessed through well-defined interface Internals not available - users of object have no knowledge of implementation Interfaces & Implementations totally separate For one interface, multiple implementations possible In ACS Interfaces for Components are defined using: CORBA IDL (Interface Definition Language) Object ACS Training

  3. Why IDL? • IDL reconciles diverse object models and programming languages • Imposes the same object model on all supported languages • Programming language independent way of describing data types and object interfaces • purely descriptive - no procedural description elements • provides abstraction from implementation • allows multiple language bindings to be defined • A way for integrating and sharing objects from different object models and languages ACS Training

  4. Getting Started with ACS Course and ACS Example Do you know CVS? At the console, type: cvs co ACS/LGPL/CommonSoftware/acscourse This gives you the latest version of the ACS Course module. And cvs co ACS/LGPL/CommonSoftware/acsexample This gives you the latest version of the ACS Example module containing C++ examples for ACS. ACS Training

  5. IDL Example: Mount ACS/LGPL/CommonSoftware/acscourse/ws/idl/acscourseMount.idl #ifndef _ACSCOURSE_MOUNT_IDL_ #define _ACSCOURSE_MOUNT_IDL_ #include <acscomponent.idl> #pragma prefix "alma" module ACSCOURSE_MOUNT { interface Mount1 : ACS::ACSComponent { voidobjfix (in doubleaz, in doubleelev) raises (ACSErrTypeACSCourse::TargetNotFoundEx); }; }; #endif ACS Training

  6. IDL simple data types • Basic data types similar to C, C++ or Java • long, long long, unsigned long, unsigned long long • short, unsigned short • float, double, long double • char, wchar (ISO Unicode) • boolean • octet (raw data without conversion) • any (self-describing variable) ACS Training

  7. IDL complex data types • string - sequence of characters - bounded or unbounded • string<256> msg // bounded • string msg // unbounded • wstring - sequence of Unicode characters - bounded or unbounded • sequence - one dimensional array whose members are all of the same type - bounded or unbounded • sequence<float, 100> mySeq // bounded • sequence<float> mySeq // unbounded ACS Training

  8. IDL user defined data types • Facilities for creating your own types: • typedef • enum • const • struct • union • arrays • exception • preprocessor directives - #include #define ACS Training

  9. Operations and parameters • Return type of operations can be any IDL type (but we do not allow references to other components) • each parameter has a direction (in, out, inout) and a name • similar to C/C++ function declarations ACS Training

  10. IDL Compiler Client Program Source Object Implementation Source Skeleton Source Stub Source Java or C++ Compiler Java or C++ Compiler Client Program Object Implementation ACS (CORBA) Development Process using IDL IDL Definition Client Implementation Object Implementation ACS Training

  11. objectimplementation client program call method language mapping operation signatures language mapping entry points Stub Skeleton Basic Object Adapter ORB Operations Location Service ORB Transport Layer Multithreading Stubs & Skeletons Stubs and Skeletons are automatically generated from IDL interfaces ACS Training

  12. Other IDL Interfaces acsexmpl/ws/idl/*.idl ACS Training

  13. Questions about IDL??? ACS Training

More Related