Mrds Chap 2

Páginas: 76 (18824 palabras) Publicado: 24 de mayo de 2012
Concurrency and Coordination Runtime (CCR)
Microsoft Robotics Developers Studio (MRDS) is built on two basic components: the Concurrency and Coordination Runtime (CCR) and the Decentralized Software Services (DSS). This chapter covers many of the concepts of the CCR; the next chapter discusses DSS. To quickly clarify the differences between the CCR and DSS: The CCR is a programming model forhandling multi-threading and inter-task synchronization, whereas DSS is used for building applications based on a loosely coupled service model. Services can run anywhere on the network, so DSS provides a communications infrastructure that enables services to transparently run on different nodes using all of the same CCR constructs that they would use if they were running locally. Although you canuse the CCR on its own, completely outside MRDS, this is not how you use it for creating robotics applications. Consequently, there is some overlap with DSS in this chapter because it provides an environment that makes CCR easier to use. In fact, there was some discussion during the writing of this book regarding whether CCR or DSS should be covered first. You can take a peek at the next chapter anddecide for yourself in which order you want to read them. A large amount of documentation is supplied with MRDS and the authors do not intend to reproduce it all here. You should read the online CCR User Guide (http://msdn2.microsoft .com/en-us/library/bb905447.aspx), which is also in the documentation that comes with MRDS. In particular, you will find the MRDS Tutorials to be an invaluablesource of information. The objective in this book is to give you a brief introduction to the important concepts and then get into coding as quickly as possible. Along the way, many new applications supplement the examples that are included in the MRDS distribution.

Chapter 2: Concurrency and Coordination Runtime (CCR)
You will probably find that the MRDS environment is quite different fromanything that you have programmed with in the past, which means that it can involve a steep learning curve. Luckily, Microsoft recognized this and built the Visual Programming Language (VPL) tool to hide many of the details about how MRDS services work. However, as a professional programmer, you need to understand what is happening “under the hood,” so the book begins with the basics, and VPL is coveredlater in the book.

Over view of the MRDS Framework
MRDS provides a framework for developing robotics applications. At the lowest level it is conceptually similar to the device drivers or BIOS (basic input/output system) on a PC that provide the interface to the computer hardware. As part of MRDS, Microsoft supplies a variety of different samples that support readily available robots, but it isup to the robot manufacturers to develop and support their own code. However, MRDS provides more than just the equivalent of device drivers. At a higher level, MRDS is similar to an operating system for robots. It is not a true operating system because MRDS services must be hosted on a Windows platform with .NET installed. In many cases this means that MRDS runs on a PC and communicates with therobot via a wireless connection. Alternatively, an embedded PC, laptop, or PDA can be mounted on the robot to run MRDS. This is an important point: You do not compile MRDS code and load it directly into a robot — there must be a Windows device somewhere, either on the robot or connected to it through a communications link.

The Need for Concurrency
Anyone who has worked with robots knows thatseveral things are happening at the same time. For example, while your program is driving a robot around, it must also be listening to information from the sensors so that the robot does not bump into anything. In the past, to handle this robotic multi-tasking, you would have had to write a multi-threaded application using Windows threads. This was a complex task. For example, you would have used...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Derecho Penal Chapa 2
  • chapo
  • EL CHAPO
  • Chapas
  • chapo
  • Chapa
  • chapo
  • Chapa

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS