Hekateros  3.4.3
RoadNarrows Robotics Robot Arm Project
hekateros::HekDescArm Class Reference

Hekateros robotic arm (manipulator) description class. More...

#include <hekDescArm.h>

Public Member Functions

 HekDescArm ()
 
 ~HekDescArm ()
 
void setDesc (int eProdId, const std::string &strProdName="", const std::string &strProdBrief="", const std::string &strHwVer="1.0.0", int nDoF=0, int eProdSize=HekProdSizeUnknown)
 
void resetDesc ()
 Reset base description to the "unitialized" values.
 
bool isDescribed ()
 Test if required base description is adequately described. More...
 
int getProdId ()
 Get this base description's base product id. More...
 
std::string getProdName ()
 Get this base description's name. More...
 
std::string getProdBrief ()
 Get this base description's brief. More...
 
std::string getProdHwVer ()
 Get this base description's hardware version. More...
 
int getProdSize ()
 Get this base description's size. More...
 
int getDoF ()
 Get this base description's degrees of freedom. More...
 
int getNumServos ()
 Get the number of expected and required servos. More...
 
bool hasServo (int nServoId)
 Test if servo id is in the list of servos. More...
 

Static Public Member Functions

static const char * getProdName (int eProdId)
 Get the Hekateros product name string given the product id. More...
 
static const char * getProdBrief (int eProdId)
 Get the Hekateros product one-line brief description string given the product id. More...
 
static int getProdSize (int eProdId)
 Get the Hekateros base size given the product id. More...
 
static int getDoF (int eProdId)
 Get the Hekateros base degrees of freedom given the product id. More...
 

Protected Attributes

int m_eProdId
 base product id
 
std::string m_strProdName
 product name
 
std::string m_strProdBrief
 product brief
 
std::string m_strProdHwVer
 product hardware version string
 
uint_t m_uProdHwVer
 product hardware version number
 
int m_eProdSize
 product size code
 
int m_nDoF
 degrees of freedom
 
HekSpec m_spec
 fixed specification
 

Friends

class HekDesc
 
class HekRobot
 

Detailed Description

Hekateros robotic arm (manipulator) description class.

Definition at line 77 of file hekDescArm.h.

Constructor & Destructor Documentation

HekDescArm::HekDescArm ( )

Default constructor.

Definition at line 70 of file hekDescArm.cxx.

References hekateros::strToVersion().

71 {
74  m_uProdHwVer = 0;
75  m_nDoF = 0;
76 }
int m_eProdSize
product size code
Definition: hekDescArm.h:258
const int HekProdIdUnknown
unknown/undefined product id
Definition: hekateros.h:219
int m_nDoF
degrees of freedom
Definition: hekDescArm.h:259
int m_eProdId
base product id
Definition: hekDescArm.h:253
uint_t m_uProdHwVer
product hardware version number
Definition: hekDescArm.h:257
hekateros::HekDescArm::~HekDescArm ( )
inline

Destructor.

Definition at line 89 of file hekDescArm.h.

References hekateros::HekProdSizeUnknown, and resetDesc().

90  {
91  }

Member Function Documentation

int hekateros::HekDescArm::getDoF ( )
inline

Get this base description's degrees of freedom.

Returns
Returns DoF.

Definition at line 185 of file hekDescArm.h.

References m_nDoF.

Referenced by hekateros::HekDesc::getDoF(), and hasServo().

186  {
187  return m_nDoF;
188  }
int m_nDoF
degrees of freedom
Definition: hekDescArm.h:259
int HekDescArm::getDoF ( int  eProdId)
static

Get the Hekateros base degrees of freedom given the product id.

Parameters
eProdIdSupported product id. See HekProdId.
Returns
Returns the degrees of freedom.

Definition at line 165 of file hekDescArm.cxx.

166 {
167  switch( eProdId )
168  {
169  case HekProdArm4SId:
170  case HekProdArm4LId:
171  return 4;
172  case HekProdArm5LBetaId:
173  case HekProdArm5SId:
174  case HekProdArm5LId:
175  return 5;
176  default:
177  return 0;
178  }
179 }
const int HekProdArm5LBetaId
product id
const int HekProdArm4LId
product id
Definition: hekProdArm4L.h:72
const int HekProdArm5LId
product id
Definition: hekProdArm5L.h:71
const int HekProdArm5SId
product id
Definition: hekProdArm5S.h:73
const int HekProdArm4SId
product id
Definition: hekProdArm4S.h:73
int hekateros::HekDescArm::getNumServos ( )
inline

Get the number of expected and required servos.

Returns
Returns number of servos.

Definition at line 195 of file hekDescArm.h.

References hekateros::HekSpec::getNumServos(), and m_spec.

Referenced by hekateros::HekDesc::getNumServos().

196  {
197  return m_spec.getNumServos();
198  }
HekSpec m_spec
fixed specification
Definition: hekDescArm.h:260
int getNumServos()
Get specification&#39;s number of servos.
Definition: hekSpec.h:323
std::string hekateros::HekDescArm::getProdBrief ( )
inline

Get this base description's brief.

Returns
Returns string.

Definition at line 155 of file hekDescArm.h.

References m_strProdBrief.

Referenced by hasServo().

156  {
157  return m_strProdBrief;
158  }
std::string m_strProdBrief
product brief
Definition: hekDescArm.h:255
const char * HekDescArm::getProdBrief ( int  eProdId)
static

Get the Hekateros product one-line brief description string given the product id.

Parameters
eProdIdSupported product id. See HekProdId.
Returns
Returns product description string. An unidentified product id returns "".

Definition at line 130 of file hekDescArm.cxx.

131 {
132  switch( eProdId )
133  {
134  case HekProdArm4SId:
135  return "RoadNarrows Hekateros 4DOF short robotic manipulator";
136  case HekProdArm4LId:
137  return "RoadNarrows Hekateros 4DOF long robotic manipulator";
138  case HekProdArm5SId:
139  return "RoadNarrows Hekateros 5DOF short robotic manipulator";
140  case HekProdArm5LBetaId:
141  return "RoadNarrows Hekateros 5DOF long beta robotic manipulator";
142  case HekProdArm5LId:
143  return "RoadNarrows Hekateros 5DOF long robotic manipulator";
144  default:
145  return "";
146  }
147 }
const int HekProdArm5LBetaId
product id
const int HekProdArm4LId
product id
Definition: hekProdArm4L.h:72
const int HekProdArm5LId
product id
Definition: hekProdArm5L.h:71
const int HekProdArm5SId
product id
Definition: hekProdArm5S.h:73
const int HekProdArm4SId
product id
Definition: hekProdArm4S.h:73
std::string hekateros::HekDescArm::getProdHwVer ( )
inline

Get this base description's hardware version.

Returns
Returns string.

Definition at line 165 of file hekDescArm.h.

References m_strProdHwVer.

Referenced by hekateros::HekRobot::getVersion(), and hekateros::HekRobot::getVersionNum().

166  {
167  return m_strProdHwVer;
168  }
std::string m_strProdHwVer
product hardware version string
Definition: hekDescArm.h:256
int hekateros::HekDescArm::getProdId ( )
inline

Get this base description's base product id.

Returns
Returns product id. See HekProdId.

Definition at line 135 of file hekDescArm.h.

References m_eProdId.

Referenced by hekateros::HekDesc::getProdId(), hekateros::HekRobot::getProdId(), and hekateros::HekDesc::isDescribed().

136  {
137  return m_eProdId;
138  }
int m_eProdId
base product id
Definition: hekDescArm.h:253
std::string hekateros::HekDescArm::getProdName ( )
inline

Get this base description's name.

Returns
Returns string.

Definition at line 145 of file hekDescArm.h.

References m_strProdName.

Referenced by hekateros::HekRobot::getProdName(), and hasServo().

146  {
147  return m_strProdName;
148  }
std::string m_strProdName
product name
Definition: hekDescArm.h:254
const char * HekDescArm::getProdName ( int  eProdId)
static

Get the Hekateros product name string given the product id.

Parameters
eProdIdSupported product id. See HekProdId.
Returns
Returns product name string. An unidentified product id returns "".

Definition at line 111 of file hekDescArm.cxx.

112 {
113  switch( eProdId )
114  {
115  case HekProdArm4SId:
116  return "Hekateros-4S";
117  case HekProdArm4LId:
118  return "Hekateros-4L";
119  case HekProdArm5SId:
120  return "Hekateros-5S";
121  case HekProdArm5LBetaId:
122  return "Hekateros-5LBeta";
123  case HekProdArm5LId:
124  return "Hekateros-5L";
125  default:
126  return "";
127  }
128 }
const int HekProdArm5LBetaId
product id
const int HekProdArm4LId
product id
Definition: hekProdArm4L.h:72
const int HekProdArm5LId
product id
Definition: hekProdArm5L.h:71
const int HekProdArm5SId
product id
Definition: hekProdArm5S.h:73
const int HekProdArm4SId
product id
Definition: hekProdArm4S.h:73
int hekateros::HekDescArm::getProdSize ( )
inline

Get this base description's size.

Returns
Returns product size. See HekProdSize.

Definition at line 175 of file hekDescArm.h.

References m_eProdSize.

Referenced by hasServo().

176  {
177  return m_eProdSize;
178  }
int m_eProdSize
product size code
Definition: hekDescArm.h:258
int HekDescArm::getProdSize ( int  eProdId)
static

Get the Hekateros base size given the product id.

Parameters
eProdIdSupported product id. See HekProdId.
Returns
Returns product size value. An unidentified product id returns HekProdSizeUknown.

Definition at line 149 of file hekDescArm.cxx.

150 {
151  switch( eProdId )
152  {
153  case HekProdArm4SId:
154  case HekProdArm5SId:
155  return HekProdSizeShort;
156  case HekProdArm4LId:
157  case HekProdArm5LBetaId:
158  case HekProdArm5LId:
159  return HekProdSizeLong;
160  default:
161  return HekProdSizeUnknown;
162  }
163 }
const int HekProdArm5LBetaId
product id
const int HekProdArm4LId
product id
Definition: hekProdArm4L.h:72
const int HekProdArm5LId
product id
Definition: hekProdArm5L.h:71
const int HekProdArm5SId
product id
Definition: hekProdArm5S.h:73
const int HekProdArm4SId
product id
Definition: hekProdArm4S.h:73
bool hekateros::HekDescArm::hasServo ( int  nServoId)
inline

Test if servo id is in the list of servos.

Parameters
nServoIdServo id.
Returns
Returns true or false.

Definition at line 207 of file hekDescArm.h.

References getDoF(), getProdBrief(), getProdName(), getProdSize(), hekateros::HekSpec::hasServo(), and m_spec.

208  {
209  return m_spec.hasServo(nServoId);
210  }
bool hasServo(int nServoId)
Test if servo id is in the servo specifications.
Definition: hekSpec.cxx:305
HekSpec m_spec
fixed specification
Definition: hekDescArm.h:260
bool hekateros::HekDescArm::isDescribed ( )
inline

Test if required base description is adequately described.

Returns
Returns true or false.

Definition at line 125 of file hekDescArm.h.

References hekateros::HekProdIdUnknown, and m_eProdId.

126  {
127  return (m_eProdId != HekProdIdUnknown)? true: false;
128  }
const int HekProdIdUnknown
unknown/undefined product id
Definition: hekateros.h:219
int m_eProdId
base product id
Definition: hekDescArm.h:253

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