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

# /Users/fpy/titan-1-5-MBARI/Mers/Planning/Reactive/CCA/rpInterface.h

    00001 //==============================================================================
    00002 //
    00003 // Copyright (c) 2001           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 // Author:                      Seung H. Chung
    00010 // Organization:        Model-based Embedded and Robotic Systems Group
    00011 //                                      Massachusetts Institute of Technology
    00012 //
    00013 //
    00014 //
    00015 //==============================================================================
    00016
    00017 #ifndef __RP_INTERFACE__
    00018 #define __RP_INTERFACE__
    00019
    00020 #ifdef _MSC_VER
    00021 #pragma warning( disable : 4786 )
    00022 #endif
    00023 #include <iostream>
    00024
    00025 #include <Mers/Utils/Containers/intList.h>
    00026 #include <Mers/Models/CCA/CCAModel.h>
    00027 //#include "reactivePlanner.h"
    00028 class reactivePlanner;
    00029 class rpInterface {
    00030 public:
    00031         class indexArray {
    00032         public:
    00033                 indexArray();
    00034                 ~indexArray();
    00035                 const unsigned int              index()                                                                 const;
    00036                 const unsigned int              size()                                                                  const;
    00037                 void                                    initialize(
    00038                                                                         const unsigned int index,
    00039                                                                         const unsigned int sub_indexArray_size = 0);
    00040                 indexArray &                    operator [](const unsigned int index);
    00041                 const indexArray &              operator [](const unsigned int index)   const;
    00042         private:
    00043                 unsigned int                    _index;
    00044                 unsigned int                    _size;
    00045                 indexArray *                    _indexArray;
    00046         };
    00047         //--------------------------------------------------------------------------
    00048         // Constructors, Copy Constructors, & Destructors
    00049         //--------------------------------------------------------------------------
    00050         rpInterface(reactivePlanner &_reactivePlanner);
    00051         ~rpInterface();
    00052         //--------------------------------------------------------------------------
    00053         // Public Function Members
    00054         //--------------------------------------------------------------------------
    00055         void                                            update_current_state(
    00056                                                                         const unsigned int variable_id,
    00057                                                                         const unsigned int value_id)            const;
    00058         void                                            update_goal_state(
    00059                                                                         const unsigned int variable_id,
    00060                                                                         const unsigned int value_id)            const;
    00061         void                                            update_goal_states(
    00062                                                                         const Mers::Utils::Containers::intList &goal_intList)           const;
    00063         const Mers::Utils::Containers::intList *const           generate_next_command_intList_p();
    00064         const Mers::Utils::Containers::intList *const                   reachable_state_intList_p();
    00065         //--------------------------------------------------------------------------
    00066         // Public Operators
    00067         //--------------------------------------------------------------------------
    00068         friend std::ostream &           operator <<(std::ostream &_ostream,
    00069                                                                                         const rpInterface &_rpInterface);
    00070 private:
    00071         Mers::Utils::Containers::intList                                                _reachable_state_intList;
    00072         Mers::Utils::Containers::intList                                                _command_intList;
    00073         indexArray                                      _to_rp_index_conversionChart;
    00074         reactivePlanner *                       _reactivePlanner_p;
    00075 };
    00076 #endif