diff options
Diffstat (limited to 'vfd-main/app/plugins/UavClientConnection.scala')
-rw-r--r-- | vfd-main/app/plugins/UavClientConnection.scala | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/vfd-main/app/plugins/UavClientConnection.scala b/vfd-main/app/plugins/UavClientConnection.scala deleted file mode 100644 index 76975e1..0000000 --- a/vfd-main/app/plugins/UavClientConnection.scala +++ /dev/null @@ -1,33 +0,0 @@ -package plugins - -import akka.actor.Actor -import akka.actor.ActorLogging -import akka.actor.ActorRef -import akka.actor.actorRef2Scala -import vfd.uav.Connection -import akka.util.ByteString - -/** - * Interfaces traffic from a websocket with a connection to a UAV. - */ -class UavClientConnection(websocket: ActorRef, uav: ActorRef) extends Actor with ActorLogging { - - override def preStart = { - uav ! Connection.Register - } - - def receive = { - - case Connection.Received(bstr) => - websocket ! bstr.toArray - - case Connection.Closed(msg) => - log.warning(msg) - context stop self - - case fromClient: Array[Byte] => - uav ! Connection.Send(ByteString(fromClient)) - - } - -}
\ No newline at end of file |