//-*-c++-*-
#ifndef INCLUDED_BarkHowlBlinkBehavior_h_
#define INCLUDED_BarkHowlBlinkBehavior_h_
 
#include "Behaviors/StateMachine.h"
#include "Events/EventRouter.h"

class BarkHowlBlinkBehavior : public StateNode {

public:
  BarkHowlBlinkBehavior() : StateNode("BarkHowlBlinkBehavior") {}
 
  virtual void setup() {
#statemachine

startnode: StateNode =N=> {noblink, bark}

noblink: LedNode [setPriority(MotionManager::kBackgroundPriority);
	          getMC()->set(RobotInfo::FaceLEDMask,0.0);]

bark: SoundNode($,"barkmed.wav")
  =E(buttonEGID, ChiaraInfo::GreenButOffset, activateETID)[setSound("ping.wav");]=>
     wait: StateNode =T(15000)=> bark

bark =T(5000)=> {howl, blink}

howl: SoundNode($,"howl.wav")

			blink: LedNode [getMC()->cycle(RobotInfo::AllLEDMask, 1500, 1.0);]

{howl, blink} =C(1)=> wait

#endstatemachine
  }       // end of setup()

};

#endif

