universal remote control lab engineer: dr. ilana davidsupervisor: oleg romanov submitted by: oleg...

21
UNIVERSAL REMOTE CONTROL Lab Engineer: Lab Engineer: Dr. Ilana David Supervisor: Supervisor: Oleg Romanov Submitted by: Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Upload: uriel-wainright

Post on 31-Mar-2015

221 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

UNIVERSAL REMOTE CONTROL

Lab Engineer:Lab Engineer:

Dr. Ilana David

Supervisor:Supervisor:

Oleg Romanov

Submitted by:Submitted by:

Oleg Galter

Elena Smirnov

Software Laboratory

Spring 2001

Page 2: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Project Goals

• Learning COM/DCOM object

• Learning WINDOWS CE for Pocket PC

• Learning Sockets (protocol TCP/IP)

• Using Multithreaded application

• Design and implementation of Universal Remote Control for Windows CE OS on Pocket PC computers

Page 3: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

What is Universal Remote Control?

• Universal Remote Control (RC) may work with all possible home devices, such as TV, video, air conditioner, stereo system, home cinema.

Page 4: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Project Units

• Universal Remote Control on Pocket PC for Window CE

• Distributed Devices on Pocket PC for Window CE

• Relationship between the Units by Sockets

Page 5: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Main System Diagram

Sockets

Sockets

Device Install

VIDEO

Device Interface

Device Control

COM

TV-SET

Conditioner Server Interface

Remote Control

COM

RC

Page 6: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Project Development Steps:

• Attempt to create the Project, as it was defined in the beginning of the project, by DCOM protocol

• During the work it was proved as impossible to work with DCOM protocol for Pocket PC because of lack of local IP address implementation for Pocket PC

Page 7: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Main System Diagram Using DCOM Protocol

DCOM

DCOM

Device Install

VIDEO

Device Interface

Device Control

COM

TV-SET

Conditioner Server Interface

Remote Control

COM

RC

Page 8: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Advantages of DCOM vs. TCP/IP

• No need to remember an IP address of Server for repeated connection

• The Server may start devices by itself• Increased speed of reaction to command

(connection between RC and Device Control)

• Registered DCOM is available for each allowed users in the world

Page 9: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Project Development Steps:

• Decision of this problem is in using TCP/IP protocol for distributing communication between Pocket PC units

• It was created number of application:- Remote Control Unit

-- Server Interface-- Remote Control Application

- Device Unit-- Device Interface-- Device Control Application

- Install Unit-- Device Install Application

Page 10: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Remote Control Unit – Class Description

• RemoteControl– CRemoteControlApp Class

– CRemoteControlDlg Class• IComRC * ptr

• Server– CComRC Interface

• GetDeviceSocket()

• IsDeviceInstall()

• DeleteItem()

– CDevicesList Class

Page 11: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Remote Control Unit – Class Relationship

Device Control

RC UI

RemoteControl

DeviceProcessing

DeviceProcessing

DeviceProcessing

DeviceProcessing

RemoteControlApp

COM_RCInterface

Server

Registry

Write/Read

Creating Thread

Socket (TCP/IP)

Creating Thread

COM

Page 12: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Remote Control Unit

• Server stores information about installed devices.

• RC gets any information from the Server by sending requirements to the one.

• Server gets information about new device by Device Installation that uses the device driver.

• Number of Threads = Number of Devices + 2

Page 13: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Remote Control Unit

• By pushing on an any button:

-- requirements sent to the Server about the installed device

-- sent a receive command from user to Device Interface

• There is a possibility to run list of commands by RC from a file.

Page 14: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Device Control Unit –

Class Description • DeviceControl

– CDeviceControlApp Class– CDeviceControlDlg Class– CConnect Class

• IDeviceCom * ptr

• Device– CDeviceCom Interface

• Init()• Get_Driver()• Get_Type()• Button_Exec()

– CDevicesDlg Class

Page 15: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Device Control Unit - Class Relationship

Device UI

DeviceCOMInterface

Device Control

Creating Thread

Device

Remote Control

Socket (TCP/IP)

COM

Registry

DeviceControl UI

ConnectWrite/Read

Page 16: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Device Control Unit

• Device Control connects by Socket to the RC. Device Control is Client, RC is Server in terms of TCP/IP protocol.

• Device Control receives a command from RC and pass it into Device Interface

• We refer to devices as fabric products that may react only to remote control

Page 17: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Device Install Unit – Class Description

• DeviceInstall– CDeviceControlApp

Class

– CDeviceControlDlg Class

Page 18: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Device Install Unit - Class Relationship

Registry

DeviceInstallApp

DevcieInstallDlgWrite/Read

Device Install

RC Unit

Page 19: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Device Installation Unit

• Device is installed to the RC Pocket PC.• For correct installation of the device it is

required a proper driver file of relevant type.

• There is no need for repeated installation in case if the device of the defined type was installed before.

Page 20: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

Exit/Close Units Rules

• In the event of exit/close of Remote Control Unit:- All working devices are closed- No need for repeated installation of devices on the Server

• In the event of exit/close of Device Control Unit:- This Device is removed from the list of working

devices in the RC- No need for repeated installation of this type of

device on the Server

Page 21: UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg Galter Elena Smirnov Software Laboratory Spring 2001

References

• Books:– Dale Rogerson “Inside COM” Microsoft’s

component Object Model– Douglas Boling “Programming Microsoft Windows

CE”– Microsoft Course: “Component Development Using

the Active Template Library 3.0”.– MSDN Help

• Links:– http://www.microsoft.com/com/– http://www.codeguru.com/