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

Hekateros end effector tool description class. More...

#include <hekDescEE.h>

Public Member Functions

 HekDescEE ()
 
virtual ~HekDescEE ()
 
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 end effector description's product id. More...
 
std::string getProdName ()
 Get this end effector description's name. More...
 
std::string getProdBrief ()
 Get this end effector description's brief. More...
 
std::string getProdHwVer ()
 Get this end effector description's hardware version. More...
 
int getProdSize ()
 Get this end effector description's size. More...
 
int getDoF ()
 Get this end effector 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 end effector product name string given the product id. More...
 
static const char * getProdBrief (int eProdId)
 Get the Hekateros end effector product one-line brief description string given the product id. More...
 
static int getProdSize (int eProdId)
 Get the Hekateros end effector size given the product id. More...
 
static int getDoF (int eProdId)
 Get the Hekateros end effector degrees of freedom given the product id. More...
 

Protected Attributes

int m_eProdId
 end effector product id
 
std::string m_strProdName
 product name
 
std::string m_strProdBrief
 product brief
 
std::string m_strProdHwVer
 product hardware version
 
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 end effector tool description class.

Definition at line 71 of file hekDescEE.h.

Constructor & Destructor Documentation

HekDescEE::HekDescEE ( )

Default constructor.

Definition at line 69 of file hekDescEE.cxx.

References hekateros::strToVersion().

70 {
73  m_uProdHwVer = 0;
74  m_nDoF = 0;
75 }
const int HekProdIdUnknown
unknown/undefined product id
Definition: hekateros.h:219
int m_eProdId
end effector product id
Definition: hekDescEE.h:251
uint_t m_uProdHwVer
product hardware version number
Definition: hekDescEE.h:255
int m_nDoF
degrees of freedom
Definition: hekDescEE.h:257
int m_eProdSize
product size code
Definition: hekDescEE.h:256
virtual hekateros::HekDescEE::~HekDescEE ( )
inlinevirtual

Destructor.

Definition at line 83 of file hekDescEE.h.

References hekateros::HekProdSizeUnknown, and resetDesc().

84  {
85  }

Member Function Documentation

int hekateros::HekDescEE::getDoF ( )
inline

Get this end effector description's degrees of freedom.

Returns
Returns DoF.

Definition at line 180 of file hekDescEE.h.

References m_nDoF.

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

181  {
182  return m_nDoF;
183  }
int m_nDoF
degrees of freedom
Definition: hekDescEE.h:257
int HekDescEE::getDoF ( int  eProdId)
static

Get the Hekateros end effector degrees of freedom given the product id.

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

Definition at line 148 of file hekDescEE.cxx.

149 {
150  switch( eProdId )
151  {
152  case HekProdEEFixedId:
153  return 0;
154  case HekProdEEGraboidId:
155  return 1;
156  default:
157  return 0;
158  }
159 }
const int HekProdEEGraboidId
prod id
const int HekProdEEFixedId
prod id
int hekateros::HekDescEE::getNumServos ( )
inline

Get the number of expected and required servos.

Returns
Returns number of servos.

Definition at line 190 of file hekDescEE.h.

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

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

191  {
192  return m_spec.getNumServos();
193  }
int getNumServos()
Get specification&#39;s number of servos.
Definition: hekSpec.h:323
HekSpec m_spec
fixed specification
Definition: hekDescEE.h:258
std::string hekateros::HekDescEE::getProdBrief ( )
inline

Get this end effector description's brief.

Returns
Returns string.

Definition at line 150 of file hekDescEE.h.

References m_strProdBrief.

Referenced by hasServo().

151  {
152  return m_strProdBrief;
153  }
std::string m_strProdBrief
product brief
Definition: hekDescEE.h:253
const char * HekDescEE::getProdBrief ( int  eProdId)
static

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

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

Definition at line 123 of file hekDescEE.cxx.

124 {
125  switch( eProdId )
126  {
127  case HekProdEEFixedId:
128  return "Fixed end effector";
129  case HekProdEEGraboidId:
130  return "RoadNarrows Graboid 1DOF simple end effector";
131  default:
132  return "";
133  }
134 }
const int HekProdEEGraboidId
prod id
const int HekProdEEFixedId
prod id
std::string hekateros::HekDescEE::getProdHwVer ( )
inline

Get this end effector description's hardware version.

Returns
Returns string.

Definition at line 160 of file hekDescEE.h.

References m_strProdHwVer.

161  {
162  return m_strProdHwVer;
163  }
std::string m_strProdHwVer
product hardware version
Definition: hekDescEE.h:254
int hekateros::HekDescEE::getProdId ( )
inline

Get this end effector description's product id.

Returns
Returns product id. See HekEEProdId.

Definition at line 130 of file hekDescEE.h.

References m_eProdId.

Referenced by hekateros::HekDesc::hasEndEffector(), and hekateros::HekDesc::isDescribed().

131  {
132  return m_eProdId;
133  }
int m_eProdId
end effector product id
Definition: hekDescEE.h:251
std::string hekateros::HekDescEE::getProdName ( )
inline

Get this end effector description's name.

Returns
Returns string.

Definition at line 140 of file hekDescEE.h.

References m_strProdName.

Referenced by hasServo().

141  {
142  return m_strProdName;
143  }
std::string m_strProdName
product name
Definition: hekDescEE.h:252
const char * HekDescEE::getProdName ( int  eProdId)
static

Get the Hekateros end effector product name string given the product id.

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

Definition at line 110 of file hekDescEE.cxx.

111 {
112  switch( eProdId )
113  {
114  case HekProdEEFixedId:
115  return "Fixed";
116  case HekProdEEGraboidId:
117  return "Graboid";
118  default:
119  return "";
120  }
121 }
const int HekProdEEGraboidId
prod id
const int HekProdEEFixedId
prod id
int hekateros::HekDescEE::getProdSize ( )
inline

Get this end effector description's size.

Returns
Returns product size. See HekProdSize.

Definition at line 170 of file hekDescEE.h.

References m_eProdSize.

Referenced by hasServo().

171  {
172  return m_eProdSize;
173  }
int m_eProdSize
product size code
Definition: hekDescEE.h:256
int HekDescEE::getProdSize ( int  eProdId)
static

Get the Hekateros end effector size given the product id.

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

Definition at line 136 of file hekDescEE.cxx.

137 {
138  switch( eProdId )
139  {
140  case HekProdEEFixedId:
141  case HekProdEEGraboidId:
142  return HekProdSizeStd;
143  default:
144  return HekProdSizeUnknown;
145  }
146 }
standard (normal) size
Definition: hekateros.h:230
const int HekProdEEGraboidId
prod id
const int HekProdEEFixedId
prod id
bool hekateros::HekDescEE::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 202 of file hekDescEE.h.

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

203  {
204  return m_spec.hasServo(nServoId);
205  }
bool hasServo(int nServoId)
Test if servo id is in the servo specifications.
Definition: hekSpec.cxx:305
HekSpec m_spec
fixed specification
Definition: hekDescEE.h:258
bool hekateros::HekDescEE::isDescribed ( )
inline

Test if required base description is adequately described.

Returns
Returns true or false.

Definition at line 120 of file hekDescEE.h.

References hekateros::HekProdIdUnknown, and m_eProdId.

121  {
122  return (m_eProdId != HekProdIdUnknown)? true: false;
123  }
const int HekProdIdUnknown
unknown/undefined product id
Definition: hekateros.h:219
int m_eProdId
end effector product id
Definition: hekDescEE.h:251

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