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

# /Users/fpy/titan-1-5-MBARI/Mers/Estimation/Discrete/Stub/ME_stub.cpp

    00001
    00002 //
    00003 // Copyright (c) 2004           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 // Organization:        Model-based Embedded and Robotic Systems Group
    00010 //                                      Massachusetts Institute of Technology
    00011 //
    00013
    00014 #include "ME_stub.h"
    00015 #include <Mers/Utils/Containers/intList.h>
    00016
    00017 #include <cstdio>
    00018 #include <string>
    00019
    00021
    00022 using namespace Mers::Estimation::Discrete::Stub;
    00023 using Mers::Estimation::Discrete::ME_connection;
    00024 using Mers::Utils::Containers::intList;
    00025
    00027
    00028 FILE * debugOutput = stdout;
    00029
    00031
    00032 //non object assigned functions
    00033
    00034 unsigned int Mers::Estimation::Discrete::Stub::get_command_timeout(unsigned int cmd_index)
    00035 {
    00036         (void)cmd_index;
    00037   return 1;
    00038 }
    00039
    00041
    00042 unsigned int Mers::Estimation::Discrete::Stub::get_observation_timeout(unsigned int cmd_index)
    00043 {
    00044         (void)cmd_index;
    00045   return 1;
    00046 }
    00047
    00049
    00050 // ME Functions
    00051
    00052 bool MEStub::progress(unsigned int cmd_index, unsigned int value_index)
    00053 {
    00054   fprintf(debugOutput, "Progressing from command<%d> with value<%d> from ME\n", cmd_index, value_index);
    00055   return true;
    00056 }
    00057
    00059
    00060 bool MEStub::observe(unsigned int obs_index, unsigned int value_index)
    00061 {
    00062   fprintf(debugOutput, "Observe from observation<%d> with value<%d> from ME\n", obs_index, value_index);
    00063   return true;
    00064 }
    00065
    00067
    00068 /*void MEStub::find_candidates()
    00069 {
    00070   fprintf(debugOutput, "Find Candidates requested from ME\n");
    00071 }
    00072 */
    00073
    00075
    00076 const intList * MEStub::find_mode_estimate()
    00077 {
    00078   fprintf(debugOutput, "Find Mode estimate requested from ME\n");
    00079
    00080         intList * melist = new intList();
    00081
    00082   melist->clear();
    00083   melist->push_back(1);
    00084   melist->push_back(1);
    00085   melist->push_back(2);
    00086   return melist;
    00087 }
    00088
    00090
    00091 const intList * MEStub::get_full_state()
    00092 {
    00093   fprintf(debugOutput, "Get full state requested from ME\n");
    00094
    00095         intList * melist = new intList();
    00096
    00097   melist->clear();
    00098   melist->push_back(1);
    00099   melist->push_back(1);
    00100   melist->push_back(2);
    00101   return melist;
    00102 }
    00103
    00105
    00106 bool
    00107 MEStub::progress_to_estimate()
    00108 {
    00109   fprintf(debugOutput, "Progress to Mode estimate requested from ME\n");
    00110   return true;
    00111 }
    00112
    00114
    00115 bool MEStub::set_initial_state(unsigned int state_index,
    00116         unsigned int value_index)
    00117 {
    00118         fprintf(debugOutput, "Set initial state of variable %d to value %d\n",
    00119                                         state_index, value_index);
    00120         return true;
    00121 }
    00122
    00124