- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Reconfiguration/Discrete/GoalInterpreterInterface.h

    00001 //=============================================================================
    00002 //
    00003 // Copyright (c) 2002           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00009 //      The Goal Interpreter Interface.  Goal Interpreters should inherit
    00010 //  this object to be used in the ModeReconfiguration module
    00011 //
    00012 //=============================================================================
    00013
    00014 #ifndef __GOALINTERPRETERINTERFACE__
    00015 #define __GOALINTERPRETERINTERFACE__
    00016
    00017 #ifndef EMBEDDED
    00018 #include <iostream>
    00019 #endif
    00020
    00021 #include <cstdlib>
    00022 #include <fstream>
    00023 using namespace std;
    00024
    00025 #include "../Utils/String.h"
    00026 #include "../Utils/intList.h"
    00027 #include "../Utils/BaseModelObject.h"
    00028
    00029
    00030 class
    00031 GoalInterpreterInterface : public BaseModelObject
    00032 {
    00033 public:
    00034         //--------------------------------------------
    00035         //      CONSTRUCTOR
    00036         //--------------------------------------------
    00037
    00043         GoalInterpreterInterface(bool initialDebug = false)
    00044                 : BaseModelObject(BaseModelObject::oGoalInterpreter)
    00045         {
    00046                 debug = initialDebug;
    00047         }
    00048
    00049         //--------------------------------------------
    00050         //      PUBLIC FUNCTION METHODS
    00051         //--------------------------------------------
    00052
    00060         virtual bool               updateGoal(unsigned int var, unsigned int val) = 0;
    00068         virtual bool               updateGoal(String var, String val) = 0;
    00076         virtual bool               updateCurrentState(unsigned int variable_id,
    00077                                                       unsigned int value_id) = 0;
    00085         virtual bool               updateCurrentState(String var, String val) = 0;
    00086
    00097         virtual bool               updateReachableStates(intList const * rstates) = 0;
    00102         virtual void               clearGoal() = 0;
    00110         virtual intList const *    generateGoalState() = 0;
    00111
    00117         virtual void               setDebug(bool debugState)
    00118         {
    00119                 debug = debugState;
    00120         }
    00121
    00126         virtual bool               getDebug()  const
    00127         {
    00128                 return debug;
    00129         };
    00130
    00134         virtual void               showVariables() const = 0;
    00135
    00145         virtual int                variableAndValueToUID(String var, String val,
    00146                                                          unsigned int &varUID,
    00147                                                          unsigned int &valUID) const = 0;
    00148
    00158         virtual int                variableAndValueToString(unsigned int var,
    00159                                                             unsigned int val,
    00160                                                             String &varString,
    00161                                                             String &valString) const = 0;
    00162
    00163 #ifndef EMBEDDED
    00164
    00170         virtual void print(ostream &out) const = 0;
    00171 #endif
    00172
    00173 protected:
    00174         bool debug;
    00175 };
    00176
    00177 #endif //ndef __GOALINTERPRETER__
    00178
    00179
    00180
    00181