//  Definition:
//  This class represents the OCP Component Abstraction for SimpleTrajectoryGenerator
//
//  Execution Category:
//  Passive
//
//  Revision History:
//  This class was Automatically Generated on 03/18/2003 @ 22:10:22 from the
//  Component Information file.
//
//  Notes:
//  This namespace is automatically generated using
//  xml2ocp version 2.2 from the following
//  input file: ComponentInfo.xml
//
//  WARNING: Any manual modifications outside of Preserve regions will be
//           overwritten the next time the code generation tool is run.

#ifndef SimpleTrajectoryGenerator_h
#define SimpleTrajectoryGenerator_h 1

#include "OCP_Component_i.h"

#include "OCP_InputPortT.h"
#include "OCP_OutputPortT.h"

#include "GtmaxState.h"
#include "GtmaxCommand.h"


#include "InfrastructureUtilities/EventServiceUtilities/UUEventConsumer.h"

// This is the user specified includes section.  Includes added within the 
// following Preserve Region will be preserved when this component is regenerated.

// User specified includes and forward declarations section - Preserve Region
// User specified includes and forward declarations section - End Preserve Region

class SimpleTrajectoryGenerator : public OCP_Component_i
{
public:
   // Public typedefs and enums
   enum BEHAVIOR_ID
   {
      StateAvailableId,
      NUM_BEHAVIORS
   };

   enum INPUT_ID
   {
      stateInId,
      NUM_INPUTS
   };

public:
   SimpleTrajectoryGenerator(const char* componentName, const OCP_InputPorts &inputs, const OCP_OutputPorts &outputs);
   virtual ~SimpleTrajectoryGenerator();

   // Register the component with the ControlsAPI (Establish inter-component dependencies)
   virtual void RegisterComponent();

   // Create the internal structure of the component.
   virtual void WireComponent();

   // Initialize the component
   virtual void Initialize();

   void On(const char* inputs, const char* outputs);
   void Off(const char* inputs, const char* outputs);

   virtual void EnableBehavior(long behaviorId);
   virtual void DisableBehavior(long behaviorId);

   virtual void ExecuteBehavior(long behavior_id);

   void Push(const UUEventSet& events);

   // Component Behaviors
   void StateAvailable();

   void SendCommandOut();

private:
   // Component Inputs
   OCP_InputPortT<GtmaxState> *stateIn;

   // Component Outputs
   OCP_OutputPortT<GtmaxCommand> *commandOut;

   // Component Behavior states
   bool stateAvailableEnabled_;




   // This is the user data section.  Add any attributes or user methods within the Preserve Region
   // User specified data section - Preserve Region
private:
   double x0,y0,z0;
   int init;
   double pc[3],vc[3],qc[4],wc[3];
public:
   static double V;
   static double omega;
   // User specified data section - End Preserve Region

};

inline void SimpleTrajectoryGenerator::Push(const UUEventSet& events)
{
   ACE_UNUSED_ARG(events);

}


#endif
