Kuon  1.1.3
RoadNarrows Robotics Large Outdoor Mobile Robot Project
kuon::KuonDesc Class Reference

Kuon robotic manipulator full description class. More...

#include <kuonDesc.h>

Public Member Functions

 KuonDesc ()
 
 ~KuonDesc ()
 
void setDesc (int eProdId, const std::string &strProdName="", const std::string &strProdBrief="", const std::string &strHwVer="1.0.0", double fFrontTireRadius=0.0, double fRearTireRadius=0.0)
 
void resetDesc ()
 Reset Kuon description to the "unitialized" values.
 
int markAsDescribed ()
 Mark Kuon hardware as fully described. More...
 
bool isDescribed ()
 Test if required descriptions are described. More...
 
KuonDescBasegetBaseDesc ()
 Get the Kuon base product description. More...
 
int getProdId ()
 Convenience function to get this Kuon description's base product id. More...
 
std::string getFullProdBrief ()
 Get the Kuon full brief descirption. More...
 
int getNumMotors ()
 Get the number of expected and required motors. More...
 
bool hasMotor (int nMotorId)
 Test if motor id is in the list of motors. More...
 

Protected Attributes

bool m_bIsDescribed
  Kuon is [not] fully described
 
KuonDescBase m_descBase
  Kuon robotic arm
 
std::string m_strFullBrief
 product with payload full brief
 

Friends

class KuonRobot
 

Detailed Description

Kuon robotic manipulator full description class.

The description is determined from the XML etc configuration file. From those description components, the compiled specifications are assigned.

Definition at line 83 of file kuonDesc.h.

Constructor & Destructor Documentation

kuon::KuonDesc::KuonDesc ( )
inline

Default constructor.

Definition at line 90 of file kuonDesc.h.

91  {
92  }
kuon::KuonDesc::~KuonDesc ( )
inline

Destructor.

Definition at line 97 of file kuonDesc.h.

References m_descBase, markAsDescribed(), and resetDesc().

98  {
99  }

Member Function Documentation

KuonDescBase* kuon::KuonDesc::getBaseDesc ( )
inline

Get the Kuon base product description.

Returns
Returns pointer to robotic base description.

Definition at line 156 of file kuonDesc.h.

References m_descBase.

Referenced by kuon::KuonRobot::getProdId(), kuon::KuonRobot::getProdName(), kuon::KuonRobot::getVersion(), and kuon::KuonXmlCfg::setKuonDescFromDOM().

157  {
158  return &m_descBase;
159  }
KuonDescBase m_descBase
<b><i>Kuon</i></b> robotic arm
Definition: kuonDesc.h:204
std::string kuon::KuonDesc::getFullProdBrief ( )
inline

Get the Kuon full brief descirption.

Returns
Returns string.

Definition at line 177 of file kuonDesc.h.

References m_strFullBrief.

Referenced by kuon::KuonRobot::getFullProdBrief().

178  {
179  return m_strFullBrief;
180  }
std::string m_strFullBrief
product with payload full brief
Definition: kuonDesc.h:205
int kuon::KuonDesc::getNumMotors ( )
inline

Get the number of expected and required motors.

Returns
Returns number of motors.

Definition at line 187 of file kuonDesc.h.

References kuon::KuonDescBase::getNumMotors(), and m_descBase.

188  {
189  return m_descBase.getNumMotors();
190  }
int getNumMotors()
Get the number of expected and required motors.
Definition: kuonDescBase.h:176
KuonDescBase m_descBase
<b><i>Kuon</i></b> robotic arm
Definition: kuonDesc.h:204
int kuon::KuonDesc::getProdId ( )
inline

Convenience function to get this Kuon description's base product id.

Returns
Returns product id. See KuonProdId.

Definition at line 167 of file kuonDesc.h.

References kuon::KuonDescBase::getProdId(), and m_descBase.

168  {
169  return m_descBase.getProdId();
170  }
int getProdId()
Get this base description&#39;s base product id.
Definition: kuonDescBase.h:136
KuonDescBase m_descBase
<b><i>Kuon</i></b> robotic arm
Definition: kuonDesc.h:204
bool kuon::KuonDesc::hasMotor ( int  nMotorId)
inline

Test if motor id is in the list of motors.

Returns
Returns true or false.

Definition at line 197 of file kuonDesc.h.

References kuon::KuonSpec::hasMotor(), m_descBase, and kuon::KuonDescBase::m_spec.

198  {
199  return m_descBase.m_spec.hasMotor(nMotorId);
200  }
KuonSpec m_spec
fixed specification
Definition: kuonDescBase.h:221
bool hasMotor(int nMotorId)
Test if motor id is in the motor specifications.
Definition: kuonSpec.h:249
KuonDescBase m_descBase
<b><i>Kuon</i></b> robotic arm
Definition: kuonDesc.h:204
bool kuon::KuonDesc::isDescribed ( )
inline

Test if required descriptions are described.

Returns
Returns true or false.

Definition at line 145 of file kuonDesc.h.

References kuon::KuonDescBase::getProdId(), kuon::KuonProdIdUnknown, m_bIsDescribed, and m_descBase.

Referenced by kuon::KuonRobot::isDescribed().

146  {
148  true: false;
149  }
int getProdId()
Get this base description&#39;s base product id.
Definition: kuonDescBase.h:136
static const int KuonProdIdUnknown
unknown/undefined product id
Definition: kuon.h:144
KuonDescBase m_descBase
<b><i>Kuon</i></b> robotic arm
Definition: kuonDesc.h:204
bool m_bIsDescribed
<b><i>Kuon</i></b> is [not] fully described
Definition: kuonDesc.h:203
int KuonDesc::markAsDescribed ( )

Mark Kuon hardware as fully described.

The calling application context determines this state.

Definition at line 76 of file kuonDesc.cxx.

References kuon::KUON_ECODE_BAD_OP, and kuon::KUON_OK.

Referenced by ~KuonDesc().

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.
86 
87  m_bIsDescribed = true;
88 
89  return KUON_OK;
90 }
static const int KUON_OK
not an error, success
Definition: kuon.h:80
std::string m_strFullBrief
product with payload full brief
Definition: kuonDesc.h:205
KuonDescBase m_descBase
<b><i>Kuon</i></b> robotic arm
Definition: kuonDesc.h:204
bool isDescribed()
Test if required base description is adequately described.
Definition: kuonDescBase.h:126
std::string getProdBrief()
Get this base description&#39;s brief.
Definition: kuonDescBase.h:156
bool m_bIsDescribed
<b><i>Kuon</i></b> is [not] fully described
Definition: kuonDesc.h:203
static const int KUON_ECODE_BAD_OP
invalid operation error
Definition: kuon.h:89

The documentation for this class was generated from the following files: