VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
constrainedAnalogIOPort.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: conAnalogIOPort.h,v $ $Revision: 1.4 $ $State: Exp $
7 *******************************************************************************/
8 
11 
14 
15 #ifndef DtConstrainedAnalogInputPort_H_
16 #define DtConstrainedAnalogInputPort_H_
17 
18 
20 
31 {
32 public:
33  DtConstrainedAnalogInputPort(const DtString& portName);
34  virtual ~DtConstrainedAnalogInputPort() override;
35 
38  virtual void receiveData(DtPortData* data) override;
39 
41  virtual void setMinValue(double minVal);
42  virtual double minValue() const;
43 
44  virtual void setMaxValue(double maxVal);
45  virtual double maxValue() const;
46 
47 protected:
48  double myMaxValue;
49  double myMinValue;
50 };
51 
58 {
59 public:
60  DtConstrainedAnalogOutputPort(const DtString& portName);
61  virtual ~DtConstrainedAnalogOutputPort() override;
62 
66  virtual void setValue(double value) override;
67 
70  virtual void setMinValue(double minVal);
71  virtual double minValue() const;
72  virtual void setMaxValue(double maxVal);
73  virtual double maxValue() const;
75 
76 protected:
77  double myMaxValue;
78  double myMinValue;
79 };
80 
81 #endif
double myMaxValue
Definition: constrainedAnalogIOPort.h:48
double myMaxValue
Definition: constrainedAnalogIOPort.h:77
Contains class declarations for DtConstrainedAnalogInputPort and DtConstrainedAnalogOutputPort.
Definition: constrainedAnalogIOPort.h:30
DtConstrainedAnalogOutputPort is a version of DtAnalogOutputPort which will constrain any outgoing va...
Definition: constrainedAnalogIOPort.h:57
This is an abstract base class for all data elements that are passed through ports. Derived types will be such things as DtAnalogPortData which manage a double, or more complex data types such as a target list. Derived types must provide a type() method with a unique type string and a clone() method for copying the data.
Definition: portData.h:25
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
double myMinValue
Definition: constrainedAnalogIOPort.h:49
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
virtual void setValue(double value)
Sets a value to the port, and sends the data if it is different from the current value.
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
virtual void receiveData(DtPortData *data)
Overridden from base class for optimization. This function copies the double instead of cloning the p...
double myMinValue
Definition: constrainedAnalogIOPort.h:78

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)