Post on 21-May-2015
description
Microsoft Robotics Studio
????????????????????????????
Disponible hoy…
Robotic Studio
CCR
Concurrency and Coordination Runtime
DSS
Decentralized Software Services
VPL
Visual Programming Language
VSE
Visual Simulation Environment
Que es una aplicación de Robótica?
MotorBumper 1
(Sensor)
Orchestrator
MotorBumper 2
(Sensor)
Infrared
detector
(Sensor)
Message
Box
(Actuator)
CCRCoordination and Concurrency Runtime
CCR = 3 en 1var portInt = new Port<int>();
portInt.Post(10);
Console.WriteLine(portInt.ItemCount);
Dispatcher dispatcher = new Dispatcher();
DispatcherQueue taskQueue = new DispatcherQueue(“cola", dispatcher);
Arbiter.Activate(
taskQueue,
portInt.Receive(delegate (int item) {
Console.WriteLine("Received item:" + item);
}
));
// Continúa la ejecución en paralelo
Performance ?
Service-to-Service message throughput:
Same process (with full cloning): 50,000 msgs/second
Cross node, cross machine: 3,000 msgs/sec
Numbers from dual core 1.8GHz, 2GB RAM
CCR PrimitivesSingle item receiver
Executes code when a message arrives
Choice arbiter
Chooses one receiver (join or single item) from many, across different ports, executes only first one with conditions met, discarding others
Join expressions
Static join expressions
Dynamic over a runtime specified number of ports and messages
Interleave arbiter
Teardown group, Concurrent Group, Exclusive Group
ChoicePortSet<int, string> port = new PortSet<int, string>();
Activate(Arbiter.Choice(port, MyIntHandler, MyStringHandler)
);
void MyIntHandler(int i)
{
Console.WriteLine("Received: " + i);
}
void MyStringHandler(string s)
{
Console.WriteLine("Received: " + s);
}
Join
Port<double> balancePort = new Port<double>();
Port<int> depositPort = new Port<int>();
Activate(
Arbiter.JoinedReceive<int,double>(true,
depositPort, balancePort,
delegate(int b, double d){
balance.post(b + d);})
);
[ServiceHandler(ServiceHandlerBehavior.Concurrent)]
public IEnumerator<ITask> GetHandler(Get get)
{
get.ResponsePort.Post(_state);
yield break;
}
[ServiceHandler(ServiceHandlerBehavior.Exclusive)]
public IEnumerator<ITask> UpdateHandler(Update update)
{
_state.CurrentResult += update.Body.Value;
update.ResponsePort.Post(new UpdateResponse());
yield break;
}
Declarative Coordination for Services
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.