UNIVERSAL REMOTE CONTROL Lab Engineer: Dr. Ilana DavidSupervisor: Oleg Romanov Submitted by: Oleg...

Post on 31-Mar-2015

221 views 7 download

Tags:

transcript

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

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

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.

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

Main System Diagram

Sockets

Sockets

Device Install

VIDEO

Device Interface

Device Control

COM

TV-SET

Conditioner Server Interface

Remote Control

COM

RC

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

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

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

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

Remote Control Unit – Class Description

• RemoteControl– CRemoteControlApp Class

– CRemoteControlDlg Class• IComRC * ptr

• Server– CComRC Interface

• GetDeviceSocket()

• IsDeviceInstall()

• DeleteItem()

– CDevicesList Class

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

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

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.

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

Device Control Unit - Class Relationship

Device UI

DeviceCOMInterface

Device Control

Creating Thread

Device

Remote Control

Socket (TCP/IP)

COM

Registry

DeviceControl UI

ConnectWrite/Read

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

Device Install Unit – Class Description

• DeviceInstall– CDeviceControlApp

Class

– CDeviceControlDlg Class

Device Install Unit - Class Relationship

Registry

DeviceInstallApp

DevcieInstallDlgWrite/Read

Device Install

RC Unit

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.

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

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/