cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
prmMotionBase.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5  Author(s): Rajesh Kumar, Anton Deguet
6  Created on: 2008-03-12
7 
8  (C) Copyright 2008 Johns Hopkins University (JHU), All Rights
9  Reserved.
10 
11 --- begin cisst license - do not edit ---
12 
13 This software is provided "as is" under an open source license, with
14 no warranty. The complete license can be found in license.txt and
15 http://www.cisst.org/cisst/license.txt.
16 
17 --- end cisst license ---
18 */
19 
20 
21 #ifndef _prmMotionBase_h
22 #define _prmMotionBase_h
23 
24 // basic includes
26 
28 
29 
30 // Always include last
32 
37 {
38  public:
39 
41 
42  /* default constructor*/
43  inline prmMotionBase():
44  BlockingFlagMember(NO_WAIT),
45  BlendingFactorMember(false),
46  IsPreemptableMember(true),
47  IsCoordinatedMember(true),
48  IsGoalOnlyMember(false)
49  {}
50 
54  inline prmMotionBase(const prmBlocking & blockingFlag,
55  const bool & blendingFactor,
56  const double & timeLimit,
57  const bool & isPreemptable,
58  const bool & isCoordinated,
59  const bool & isGoalOnly
60  ):
61  BlockingFlagMember(blockingFlag),
62  BlendingFactorMember(blendingFactor),
63  TimeLimitMember(timeLimit),
64  IsPreemptableMember(isPreemptable),
65  IsCoordinatedMember(isCoordinated),
66  IsGoalOnlyMember(isGoalOnly)
67  {}
68 
71  virtual ~prmMotionBase();
72 
76  inline void SetBaseParameter(const prmBlocking & blockingFlag,
77  const bool & blendingFactor,
78  const double & timeLimit,
79  const bool & isPreemptable,
80  const bool & isCoordinated,
81  const bool & isGoalOnly)
82  {
83  this->BlockingFlagMember = blockingFlag;
84  this->BlendingFactorMember = blendingFactor;
85  this->TimeLimitMember = timeLimit;
86  this->IsPreemptableMember = isPreemptable;
87  this->IsCoordinatedMember = isCoordinated;
88  this->IsGoalOnlyMember = isGoalOnly;
89  }
90 
91 
92 
94  void SerializeRaw(std::ostream & outputStream) const;
95 
97  void DeSerializeRaw(std::istream & inputStream);
98 
99 
104 
109  CMN_DECLARE_MEMBER_AND_ACCESSORS(bool, BlendingFactor);
111 
116  CMN_DECLARE_MEMBER_AND_ACCESSORS(double, TimeLimit);
118 
122  CMN_DECLARE_MEMBER_AND_ACCESSORS(bool, IsPreemptable);
124 
129  CMN_DECLARE_MEMBER_AND_ACCESSORS(bool, IsCoordinated);
131 
139  CMN_DECLARE_MEMBER_AND_ACCESSORS(bool, IsGoalOnly);
141 
142 
143 };
144 
145 
146 #endif // _prmMotionBase_h
mtsGenericObject BaseType
Definition: prmMotionBase.h:40
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
void SetBaseParameter(const prmBlocking &blockingFlag, const bool &blendingFactor, const double &timeLimit, const bool &isPreemptable, const bool &isCoordinated, const bool &isGoalOnly)
Definition: prmMotionBase.h:76
prmMotionBase()
Definition: prmMotionBase.h:43
Definition: prmMotionBase.h:36
virtual void SerializeRaw(std::ostream &outputStream) const
virtual void DeSerializeRaw(std::istream &inputStream)
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
enum Blocking prmBlocking
Defines mtsGenericObject.
Definition: prmForwardDeclarations.h:40
Forward declarations for cisstParameterTypes.
#define CMN_DECLARE_MEMBER_AND_ACCESSORS(memberType, memberName)
Definition: cmnAccessorMacros.h:70
prmMotionBase(const prmBlocking &blockingFlag, const bool &blendingFactor, const double &timeLimit, const bool &isPreemptable, const bool &isCoordinated, const bool &isGoalOnly)
Definition: prmMotionBase.h:54