The Artima Developer Community
Sponsored Link

Akka Concurrency Forum
Ch 7: AutoPilot missing in text and code

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Andreas Gies

Posts: 15
Nickname: 84653
Registered: Nov, 2012

Ch 7: AutoPilot missing in text and code Posted: Nov 29, 2012 9:32 AM
Reply to this message Reply
Advertisement
Hi,

just a minor thing. I was following the examples in chapter 7 and noticed that the Autopilot is missing in text and code. For Ch 7 it is sufficient to create it with:

class AutoPilot extends Actor {

def receive = emptyBehavior

}


Also, perhaps I missed using the PilotProvider in the source code, but my understanding was that it should appear in the Plane construction. I have changed the example slightly to:

class Plane extends Actor with ActorLogging with PilotProvider {

import Plane._
import Altimeter._

val config = context.system.settings.config
val altimeter = context.actorOf(Props(Altimeter()), "altimeter")
val controls = context.actorOf(Props(new ControlSurfaces(altimeter)), "controls")

val pilot = context.actorOf(Props(createPilot), config.getString("zzz.akka.avionics.flightcrew.pilotName"))
val copilot = context.actorOf(Props(createCopilot), config.getString("zzz.akka.avionics.flightcrew.copilotName"))
val autopilot = context.actorOf(Props(createAutopilot), "AutoPilot")

val flightAttendant = context.actorOf(Props(LeadFlightAttendant()), config.getString("zzz.akka.avionics.flightcrew.leadAttendantName"))



Best regards
Andreas

Topic: Ch 8: Figure 8.5 Previous Topic   Next Topic Topic: java.lang.NoSuchMethodError running Chapter 6 test


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us