Скачать презентацию Vito Baggiolini SL CO The Draft Public Client API Скачать презентацию Vito Baggiolini SL CO The Draft Public Client API

5bf62d6af7d968f7cf317e50f65c319d.ppt

  • Количество слайдов: 7

Vito Baggiolini SL/CO The (Draft) Public Client API for Device-Oriented Middleware Communication The Middleware Vito Baggiolini SL/CO The (Draft) Public Client API for Device-Oriented Middleware Communication The Middleware Project Team 13/7/00 ()

Device-Oriented Functionality V 1. 0 • Based on Device/Property Model – Devices with properties; Device-Oriented Functionality V 1. 0 • Based on Device/Property Model – Devices with properties; – Devices = “real” hardware devices and “virtual” software devices • Communication paradigms – Set/get (“request-reply”) of properties – Monitoring (“publish/subscribe”) of properties – structures containing primitive & arrays of primitive: struct Profile { long time. Stamp; float[] values; } – NO nested structures 13/7/00 Vito Baggiolini SL/CO • Property Data types: 1 -level composite (2)

Architecture Client Program Client API Client Framework CORBA Corba Mo. M Gateway Legend: We Architecture Client Program Client API Client Framework CORBA Corba Mo. M Gateway Legend: We buy We develop Users provide CORBA publish For Lynx. OS Server Framework Vito Baggiolini SL/CO get/set Mo. M Server API Device Access Software 13/7/00 (3)

Java Client API Classes • One generic Remote. Device class – one instance per Java Client API Classes • One generic Remote. Device class – one instance per device – set/get, monitor. On/Off methods • A few additional classes and interfaces – Cycle. Selector, Filter, Reply. Listener, etc. – Exceptions Remote. Device(String Device. Name); Remote. Device(String dev. Class, String dev. Instance); 13/7/00 Vito Baggiolini SL/CO • Remote. Device Constructors (4)

Set/Get Methods • Synchronous (“blocking”) get/set int get. Int(String prop. Name); void set. Int(String Set/Get Methods • Synchronous (“blocking”) get/set int get. Int(String prop. Name); void set. Int(String prop. Name, int value); • Asynchronous (“non-blocking”) get/set void get. Int(String prop. Name, Reply. Listener rl); • Cycle-dependent, asynchronous get/set • Filtered 1, cycle-dependent, asynchronous get/set void get. Int(String prop. Name, Cycle. Selector sel, Filter f, Reply. Listener rl); 1) server-side filtering of property data 13/7/00 Vito Baggiolini SL/CO void get. Int(String prop. Name, Cycle. Selector sel, Reply. Listener rl); (5)

Monitor. On/Off Methods • Monitor a property on-change: Mon. Token monitor. On(String prop. Name, Monitor. On/Off Methods • Monitor a property on-change: Mon. Token monitor. On(String prop. Name, mon. Listener l); void monitor. Off(Mon. Token mt); • Monitor a property with Cycle. Selector: Vito Baggiolini SL/CO Mon. Token monitor. On(String prop. Name, Cycle. Selector cs, mon. Listener l); 13/7/00 (6)

Type-specific, overloaded methods In Remote. Device class: • One group of methods per primitive Type-specific, overloaded methods In Remote. Device class: • One group of methods per primitive type set. Int() set. Long() set. Float() set. Double() set. Byte() set. Char() set. Boolean() • One group of methods for Object types • Complex data types are passed with set. Object() • they are extracted and packed into Data/Data. Entry using Reflection 13/7/00 Vito Baggiolini SL/CO set. Object() can be used for anything, including Arrays and Data/Data. Entry (7)