Kuon  1.1.3
RoadNarrows Robotics Large Outdoor Mobile Robot Project
kuonDesc.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: Kuon
4 //
5 // Library: libkuon
6 //
7 // File: kuonDesc.cxx
8 //
9 /*! \file
10  *
11  * $LastChangedDate: 2014-04-04 17:05:03 -0600 (Fri, 04 Apr 2014) $
12  * $Rev: 3629 $
13  *
14  * \brief Kuon full robotic mobile platform descripition class implementation.
15  *
16  * The description includes the base platform plus any supported sensor and
17  * robotic payloads.
18  *
19  * Descriptions are a mash-up of factory fixed specificiations plus run-time
20  * XML configuration.
21  *
22  * \author Robin Knight (robin.knight@roadnarrows.com)
23  *
24  * \copyright
25  * \h_copy 2014-2017. RoadNarrows LLC.\n
26  * http://www.roadnarrows.com\n
27  * All Rights Reserved
28  */
29 /*
30  * @EulaBegin@
31 // Unless otherwise noted, all materials contained are copyrighted and may not
32 // be used except as provided in these terms and conditions or in the copyright
33 // notice (documents and software ) or other proprietary notice provided with
34 // the relevant materials.
35 //
36 //
37 // IN NO EVENT SHALL THE AUTHOR, ROADNARROWS, OR ANY MEMBERS/EMPLOYEES/
38 // CONTRACTORS OF ROADNARROWS OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY
39 // PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
40 // DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
41 // EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF
42 // THE POSSIBILITY OF SUCH DAMAGE.
43 //
44 // THE AUTHORS AND ROADNARROWS SPECIFICALLY DISCLAIM ANY WARRANTIES,
45 // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
46 // FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
47 // "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
48 // PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
49  * @EulaEnd@
50  */
51 ////////////////////////////////////////////////////////////////////////////////
52 
53 #include <stdio.h>
54 
55 #include <string>
56 #include <vector>
57 
58 #include "rnr/rnrconfig.h"
59 #include "rnr/log.h"
60 
61 #include "Kuon/kuon.h"
62 #include "Kuon/kuonDescBase.h"
63 #include "Kuon/kuonDesc.h"
64 
65 using namespace std;
66 using namespace kuon;
67 
68 
69 void KuonDesc::resetDesc()
70 {
71  m_descBase.resetDesc();
72  m_strFullBrief.clear();
73  m_bIsDescribed = false;
74 }
75 
76 int KuonDesc::markAsDescribed()
77 {
78  if( !m_descBase.isDescribed() )
79  {
80  LOGERROR("Kuon base platform description is undefined.");
81  return -KUON_ECODE_BAD_OP;
82  }
83 
84  // add payload descriptions when available.
85  m_strFullBrief = m_descBase.getProdBrief();
86 
87  m_bIsDescribed = true;
88 
89  return KUON_OK;
90 }
static const int KUON_OK
not an error, success
Definition: kuon.h:80
Kuon robotic base mobile platform description class interface.
The <b><i>Kuon</i></b> namespace encapsulates all <b><i>Kuon</i></b> related constructs.
Definition: kuon.h:66
RoadNarrows Kuon robot top-level header file.
Kuon full robotic mobile platform descripition class interface.
static const int KUON_ECODE_BAD_OP
invalid operation error
Definition: kuon.h:89