hi
arbiter is diffrent then from bumper or drive.. but what is it??
gr.
using
lightsensor = Microsoft.Robotics.Services.AnalogSensor.Proxy;
using
sonar = Microsoft.Robotics.Services.Sonar.Proxy;
[
Partner("lightsensor",
Contract = lightsensor.Contract.Identifier,
CreationPolicy =
PartnerCreationPolicy.UseExisting)]
private lightsensor.AnalogSensorOperations
_lightsensorPort = new lightsensor.AnalogSensorOperations();
private lightsensor.AnalogSensorOperations
_lightsensorNotify = new lightsensor.AnalogSensorOperations();
[
Partner("sonar",
Contract = sonar.Contract.Identifier,
CreationPolicy =
PartnerCreationPolicy.UseExisting)]
private sonar.SonarOperations
_sonarPort = new sonar.SonarOperations();
private sonar.SonarOperations
_sonarNotify = new sonar.SonarOperations();
void
SubscribeToLightSensor()
Arbiter.Receive<lightsensor.AnalogSensorState>
(
true,
something should be in here, but it isn't _lightsensorNotify, LightsensorHandler));
void SubscribeToSonar()
new Microsoft.Robotics.Services.Sonar.Proxy.SonarOperations();
_sonarPort =
new Microsoft.Robotics.Services.Sonar.Proxy.SonarOperations();
Arbiter.Receive<sonar.SonarState>
(
true,
"something should be in here, but it isn't _sonarNotify"
, SonarHandler));
}
_sonarPort.Subscribe(_sonarNotify);
Activate(
{
_sonarNotify =
}
{
_lightsensorPort.Subscribe(_lightsensorNotify);
Activate(