Changeset 20307

Show
Ignore:
Timestamp:
06/15/07 16:08:39 (1 year ago)
Author:
patrick
Message:

MF20: Define all possible input base types in InputBaseTypes?.h. When creating

a new device driver you must derive from one of these classes. This was
added in an attempt to prevent bugs in device drivers where they do not
work correctly in a cluster configuration because they are derived from
an unknown gadget::InputMixer<S,T> instantiation.

This revision includes the fix for the VRPN driver so that it will work in a
cluster configuration again. The revisions merged are r20303, r20304, r20305,
and r20306.

Bumped the Gadgeteer version to 1.3.8.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/gadgeteer/ChangeLog

    r20181 r20307  
    11DATE        AUTHOR      CHANGE 
    22----------- ----------- ------------------------------------------------------- 
     3Jun-15-2007 aronb       Introduced typedefs for known gadget::InputMixer<> 
     4                        instantiations to be used as the base class for device 
     5                        drivers. 
     6                        NEW VERSION: 1.3.8 
     7Jun-15-2007 aronb       Fixed the VRPN driver so that it works correctly in a 
     8                        cluster configuration again. 
    39May-08-2007 aronb       Simplify the cluster archetecture and use ::create() 
    410                        factory methods. 
    511                        NEW VERSION: 1.3.7 
    6 May-01-2007 aronb       Start using shared_ptrs for gadget::Node and cluster::Packet. 
     12May-01-2007 aronb       Start using shared_ptrs for gadget::Node and 
     13                        cluster::Packet. 
    714                        NEW VERSION: 1.3.6 
    815May-01-2007 aronb       Start using shared_ptrs for Proxy and derived classes. 
    916                        NEW VERSION: 1.3.5 
    10 May-01-2007 aronb       Start using shared_ptrs for Input, Digital, Analog, Position, etc. 
     17May-01-2007 aronb       Start using shared_ptrs for Input, Digital, Analog, 
     18                        Position, etc. 
    1119                        NEW VERSION: 1.3.4 
    1220Apr-30-2007 aronb       Started revamping the cluster infastructure. 
  • juggler/trunk/modules/gadgeteer/VERSION

    r20181 r20307  
     11.3.8-0 @06/15/2007 21:10:00 UTC@ 
    121.3.7-0 @04/08/2007 19:50:00 UTC@ 
    231.3.6-0 @04/01/2007 22:18:00 UTC@ 
  • juggler/trunk/modules/gadgeteer/drivers/3Dconnexion/SpaceBall/puck_device.h

    r19053 r20307  
    3636 
    3737#include <gadget/gadgetParam.h> 
     38#include <gadget/Type/InputBaseTypes.h> 
     39#include <gadget/Type/Input.h> 
     40#include <gadget/Type/Digital.h> 
    3841#include <gadget/Type/Analog.h> 
    39 #include <gadget/Type/Digital.h> 
    4042#include <gadget/InputManager.h> 
    41 #include <gadget/Type/Input.h> 
    42 #include <gadget/Type/InputMixer.h> 
    4343 
    4444/* 
     
    804804/** A driver for puck-like devices 
    805805*/ 
    806 class PuckDevice : public gadget::InputMixer<gadget::InputMixer 
    807                          <gadget::Input,gadget::Digital>,gadget::Analog> 
     806class PuckDevice : public gadget::input_digital_analog_t 
    808807{ 
    809808  public: 
  • juggler/trunk/modules/gadgeteer/drivers/5DT/DataGlove/DataGlove.cpp

    r19974 r20307  
    3434#include <gadget/Type/DeviceConstructor.h> 
    3535#include <gadget/gadgetParam.h> 
     36#include <gadget/Util/Debug.h> 
    3637#include <drivers/5DT/DataGlove/DataGloveStandalone.h> /* standalone dataglove driver */ 
    3738#include <drivers/5DT/DataGlove/DataGlove.h> /* Gadgeteer dataglove driver */ 
  • juggler/trunk/modules/gadgeteer/drivers/5DT/DataGlove/DataGlove.h

    r19974 r20307  
    3232#include <vector> 
    3333 
     34#include <gadget/Type/InputBaseTypes.h> 
    3435#include <gadget/Type/Input.h> 
    35 #include <gadget/Type/Glove.h> 
    3636#include <gadget/Type/Analog.h> 
    37 #include <gadget/Type/Digital.h> 
    38 #include <gadget/Type/InputMixer.h> 
    3937#include <drivers/5DT/DataGlove/DataGloveStandalone.h> 
    4038 
     
    5553 
    5654//class DataGlove : virtual public Input, public Glove, public Analog 
    57 class DataGlove : public InputMixer<Input,Analog> 
     55class DataGlove : public input_analog_t 
    5856{ 
    5957public: 
  • juggler/trunk/modules/gadgeteer/drivers/ART/DTrack/DTrack.h

    r18827 r20307  
    3131 
    3232#include <gadget/Devices/DriverConfig.h> 
     33#include <gadget/Type/InputBaseTypes.h> 
    3334#include <gadget/Type/Input.h> 
    34 #include <gadget/Type/Position.h> 
    3535#include <gadget/Type/Digital.h> 
    3636#include <gadget/Type/Analog.h> 
    37 #include <gadget/Type/InputMixer.h> 
     37#include <gadget/Type/Position.h> 
    3838 
    3939#include "DTrackStandalone.h" 
     
    4343{ 
    4444 
    45 class DTrack : public InputMixer<InputMixer<InputMixer<Input, Digital>, Analog>, Position> 
     45class DTrack 
     46   : public input_digital_analog_position_t 
    4647{ 
    4748public: 
  • juggler/trunk/modules/gadgeteer/drivers/Ascension/Flock/Flock.h

    r19729 r20307  
    3030#include <gadget/Devices/DriverConfig.h> 
    3131#include <vpr/Thread/Thread.h> 
     32#include <gadget/Type/InputBaseTypes.h> 
    3233#include <gadget/Type/Input.h> 
    3334#include <gadget/Type/Position.h> 
    34 #include <gadget/Type/InputMixer.h> 
    3535#include <drivers/Ascension/Flock/FlockStandalone.h> 
    3636 
     
    6161 */ 
    6262//class Flock : public Input, public Position 
    63 class Flock : public InputMixer<Input,Position> 
     63class Flock 
     64   : public input_position_t 
    6465{ 
    6566public: 
  • juggler/trunk/modules/gadgeteer/drivers/Ascension/MotionStar/MotionStar.h

    r19729 r20307  
    3333#include <vpr/Thread/Thread.h> 
    3434 
     35#include <gadget/Type/InputBaseTypes.h> 
    3536#include <gadget/Type/Input.h> 
    3637#include <gadget/Type/Position.h> 
    37 #include <gadget/Type/InputMixer.h> 
    3838#include <drivers/Ascension/MotionStar/MotionStarStandalone.h> 
    3939 
     
    6666 * @see Position 
    6767 */ 
    68 class MotionStar : public InputMixer<Input,Position> 
     68class MotionStar 
     69   : public input_position_t 
    6970{ 
    7071public: 
  • juggler/trunk/modules/gadgeteer/drivers/Ascension/Wanda/Wanda.h

    r19729 r20307  
    3333#include <vpr/vprDomain.h> 
    3434 
     35#include <gadget/Type/InputBaseTypes.h> 
    3536#include <gadget/Type/Input.h> 
     37#include <gadget/Type/Digital.h> 
    3638#include <gadget/Type/Analog.h> 
    37 #include <gadget/Type/Digital.h> 
    38 #include <gadget/Type/InputMixer.h> 
    3939#include <drivers/Ascension/Wanda/WandaStandalone.h> 
    4040 
     
    4646 * Gadgeteer wrapper around wanda::WandaStandalone driver. 
    4747 */ 
    48 class Wanda : public InputMixer<Input, InputMixer<Digital, Analog> > 
     48class Wanda 
     49   : public input_digital_analog_t 
    4950{ 
    5051public: 
  • juggler/trunk/modules/gadgeteer/drivers/Elexol/Ether24/Ether24.h

    r19729 r20307  
    3131#include <vector> 
    3232#include <vpr/Thread/Thread.h> 
     33#include <gadget/Type/InputBaseTypes.h> 
    3334#include <gadget/Type/Input.h> 
    3435#include <gadget/Type/Digital.h> 
    35 #include <gadget/Type/InputMixer.h> 
    3636#include <drivers/Elexol/Ether24/Ether24Standalone.h> 
    3737 
     
    4444 */ 
    4545class Ether24 
    46    : public InputMixer<Input, Digital> 
     46   : public input_digital_t 
    4747{ 
    4848public: 
  • juggler/trunk/modules/gadgeteer/drivers/Fakespace/PinchGlove/PinchGlove.h

    r19729 r20307  
    3535#include <drivers/Fakespace/PinchGlove/PinchGloveStandalone.h> 
    3636 
     37#include <gadget/Type/InputBaseTypes.h> 
     38#include <gadget/Type/Input.h> 
     39#include <gadget/Type/Glove.h> 
    3740#include <gadget/Type/Digital.h> 
    38 #include <gadget/Type/Input.h> 
    39 #include <gadget/Type/InputMixer.h> 
    40 #include <gadget/Type/Glove.h> 
    4141 
    4242namespace gadget 
     
    4646 * Fakespace PinchGlove device. 
    4747 */ 
    48 class PinchGlove : public InputMixer<InputMixer<Input, Glove>, Digital> 
     48class PinchGlove 
     49   : public input_glove_digital_t 
    4950{ 
    5051public: 
  • juggler/trunk/modules/gadgeteer/drivers/Immersion/IBox/IBox.h

    r19729 r20307  
    3030#include <gadget/Devices/DriverConfig.h> 
    3131#include <vector> 
     32#include <gadget/Type/InputBaseTypes.h> 
    3233#include <gadget/Type/Input.h> 
    3334#include <gadget/Type/Digital.h> 
    3435#include <gadget/Type/Analog.h> 
    35 #include <gadget/Type/InputMixer.h> 
    3636#include <drivers/Immersion/IBox/IBoxStandalone.h> 
    3737 
     
    4545 * therefore must inherit from both Digital and Analog. 
    4646 */ 
    47 class IBox : public InputMixer<InputMixer<Input,Digital>,Analog> 
     47class IBox 
     48   : public input_digital_analog_t 
    4849{ 
    4950public: 
  • juggler/trunk/modules/gadgeteer/drivers/Intersense/IS900/Intersense.h

    r19729 r20307  
    3535#include <vector> 
    3636#include <vpr/Thread/Thread.h> 
     37#include <gadget/Type/InputBaseTypes.h> 
    3738#include <gadget/Type/Input.h> 
    38 #include <gadget/Type/Position.h> 
    3939#include <gadget/Type/Digital.h> 
    4040#include <gadget/Type/Analog.h> 
    41 #include <gadget/Type/InputMixer.h> 
     41#include <gadget/Type/Position.h> 
    4242#include <drivers/Intersense/IS900/IntersenseStandalone.h> 
    4343 
     
    104104 */ 
    105105//class Intersense : public Input, public Position, public Digital, public Analog 
    106 class Intersense : 
    107    public InputMixer<InputMixer<InputMixer<Input, Digital>, Analog>, Position> 
     106class Intersense 
     107   : public input_digital_analog_position_t 
    108108{ 
    109109protected: 
  • juggler/trunk/modules/gadgeteer/drivers/Intersense/IntersenseAPI/IntersenseAPI.h

    r19729 r20307  
    3131#include <vector> 
    3232#include <vpr/Thread/Thread.h> 
     33#include <gadget/Type/InputBaseTypes.h> 
    3334#include <gadget/Type/Input.h> 
    34 #include <gadget/Type/Position.h> 
    3535#include <gadget/Type/Digital.h> 
    3636#include <gadget/Type/Analog.h> 
    37 #include <gadget/Type/InputMixer.h> 
     37#include <gadget/Type/Position.h> 
    3838#include <drivers/Intersense/IntersenseAPI/IntersenseAPIStandalone.h> 
    3939 
     
    6969 */ 
    7070class IntersenseAPI 
    71    : public InputMixer<InputMixer<InputMixer<Input, Digital>, Analog>, Position> 
     71   : public input_digital_analog_position_t 
    7272{ 
    7373public: 
  • juggler/trunk/modules/gadgeteer/drivers/Logitech/ThreeDMouse/logiclass.h

    r19729 r20307  
    4646 
    4747#include <gadget/Devices/DriverConfig.h> 
     48#include <gadget/Type/InputBaseTypes.h> 
    4849#include <gadget/Type/Input.h> 
    4950#include <gadget/Type/Position.h> 
    50 #include <gadget/Type/InputMixer.h> 
    5151#include <gmtl/Vec.h> 
    5252#include <vector> 
     
    8585*/ 
    8686//class ThreeDMouse : public gadget::Input, public gadget::Position 
    87 class ThreeDMouse : public InputMixer<Input,Position> 
     87class ThreeDMouse 
     88   : public input_position_t 
    8889{ 
    8990public: 
  • juggler/trunk/modules/gadgeteer/drivers/Microsoft/DirectXJoystick/DirectXJoystick.h

    r19729 r20307  
    3333#include <utility> 
    3434 
     35#include <gadget/Type/InputBaseTypes.h> 
    3536#include <gadget/Type/Input.h> 
    3637#include <gadget/Type/Digital.h> 
    3738#include <gadget/Type/Analog.h> 
    38 #include <gadget/Type/InputMixer.h> 
    3939#include <drivers/Microsoft/DirectXJoystick/DirectXJoystickStandalone.h> 
    4040 
     
    4848 * @see Digital, Analog 
    4949 */ 
    50 class DirectXJoystick : public InputMixer<InputMixer<Input, Digital>, Analog> 
     50class DirectXJoystick 
     51   : public input_digital_analog_t 
    5152{ 
    5253public: 
  • juggler/trunk/modules/gadgeteer/drivers/Microsoft/SpeechRecognition/MSFTSpeechRecogDigital.h

    r19729 r20307  
    3838 
    3939#include <vpr/Thread/Thread.h> 
     40#include <gadget/Type/InputBaseTypes.h> 
    4041#include <gadget/Type/Input.h> 
    4142#include <gadget/Type/Command.h> 
    42 #include <gadget/Type/InputMixer.h> 
    4343 
    4444#include <drivers/Microsoft/SpeechRecognition/MSFTSpeechServerManager.h> 
     
    5353 
    5454class MSFTSpeechRecogDigital 
    55    : public gadget::InputMixer<gadget::Input, gadget::Command> 
     55   : public input_command_t 
    5656{ 
    5757public: 
  • juggler/trunk/modules/gadgeteer/drivers/Microsoft/SpeechRecognition/MSFTSpeechRecogString.h

    r19729 r20307  
    3737 
    3838#include <vpr/Thread/Thread.h> 
     39#include <gadget/Type/InputBaseTypes.h> 
    3940#include <gadget/Type/Input.h> 
    4041#include <gadget/Type/String.h> 
    41 #include <gadget/Type/InputMixer.h> 
    4242 
    4343#include <drivers/Microsoft/SpeechRecognition/MSFTSpeechServerManager.h> 
     
    5252 
    5353class MSFTSpeechRecogString 
    54    : public gadget::InputMixer<gadget::Input, gadget::String> 
     54   : public input_string_t 
    5555{ 
    5656public: 
  • juggler/trunk/modules/gadgeteer/drivers/Open/DTK/DTK.h

    r19729 r20307  
    2929 
    3030#include <gadget/Devices/DriverConfig.h> 
     31#include <gadget/Type/InputBaseTypes.h> 
     32#include <gadget/Type/Input.h> 
    3133#include <gadget/Type/Digital.h> 
    3234#include <gadget/Type/Analog.h> 
    3335#include <gadget/Type/Position.h> 
    34 #include <gadget/Type/InputMixer.h> 
    3536#include <drivers/Open/DTK/DTKMemorySegment.h> 
    3637 
     
    4647//class GADGET_CLASS_API DTK : public Input, public Position, public Digital, 
    4748//                           public Analog 
    48 class GADGET_CLASS_API DTK : public InputMixer<InputMixer<InputMixer<Input,Digital>,Analog>,Position> 
     49class DTK 
     50   : public input_digital_analog_position_t 
    4951{ 
    5052public: 
  • juggler/trunk/modules/gadgeteer/drivers/Open/LinuxJoydev/LinuxJoydev.h

    r19729 r20307  
    3131#include <vector> 
    3232#include <utility> 
     33#include <gadget/Type/InputBaseTypes.h> 
    3334#include <gadget/Type/Input.h> 
    3435#include <gadget/Type/Digital.h> 
    3536#include <gadget/Type/Analog.h> 
    36 #include <gadget/Type/InputMixer.h> 
    37  
    3837 
    3938namespace gadget 
     
    4544 * @see gadget:;Digital, gadget:;Analog 
    4645 */ 
    47 class LinuxJoydev : public InputMixer<InputMixer<Input,Digital>,Analog> 
     46class LinuxJoydev 
     47   : public input_digital_analog_t 
    4848{ 
    4949public: 
  • juggler/trunk/modules/gadgeteer/drivers/Open/Trackd/TrackdController.h

    r19729 r20307  
    3030#include <gadget/Devices/DriverConfig.h> 
    3131#include <vector> 
     32#include <gadget/Type/InputBaseTypes.h> 
    3233#include <gadget/Type/Input.h> 
    3334#include <gadget/Type/Digital.h> 
    3435#include <gadget/Type/Analog.h> 
    35 #include <gadget/Type/InputMixer.h> 
    3636#include <drivers/Open/Trackd/TrackdControllerStandalone.h> 
    3737 
     
    5252 */ 
    5353//class TrackdController : public Input, public Digital, public Analog 
    54 class TrackdController : public InputMixer<InputMixer<Input,Digital>,Analog> 
     54class TrackdController 
     55   : public input_digital_analog_t 
    5556{ 
    5657public: 
  • juggler/trunk/modules/gadgeteer/drivers/Open/Trackd/TrackdSensor.h

    r19729 r20307  
    3030#include <gadget/Devices/DriverConfig.h> 
    3131#include <vector> 
     32#include <gadget/Type/InputBaseTypes.h> 
    3233#include <gadget/Type/Input.h> 
    3334#include <gadget/Type/Position.h> 
    34 #include <gadget/Type/InputMixer.h> 
    3535#include <drivers/Open/Trackd/TrackdSensorStandalone.h> 
    3636 
     
    5151 */ 
    5252//class TrackdSensor : public Input, public Position 
    53 class TrackdSensor : public InputMixer<Input,Position> 
     53class TrackdSensor 
     54   : public input_position_t 
    5455{ 
    5556public: 
  • juggler/trunk/modules/gadgeteer/drivers/Open/VRPN/Vrpn.h

    r19729 r20307  
    4747 
    4848#include <vpr/Sync/Mutex.h> 
     49#include <gadget/Type/InputBaseTypes.h> 
    4950#include <gadget/Type/Input.h> 
    50 #include <gadget/Type/Position.h> 
    5151#include <gadget/Type/Digital.h> 
    5252#include <gadget/Type/Analog.h> 
    53 #include <gadget/Type/InputMixer.h> 
     53#include <gadget/Type/Position.h> 
    5454 
    5555#include <gmtl/Matrix.h> 
     
    8282 */ 
    8383class Vrpn 
    84    : public InputMixer<InputMixer<InputMixer<Input, Analog>, Digital>, 
    85                        Position> 
     84   : public input_digital_analog_position_t 
    8685{ 
    8786public: 
  • juggler/trunk/modules/gadgeteer/drivers/Polhemus/Fastrak/Fastrak.h

    r19736 r20307  
    3838#include <jccl/Config/ConfigElementPtr.h> 
    3939 
     40#include <gadget/Type/InputBaseTypes.h> 
    4041#include <gadget/Type/Input.h> 
    4142#include <gadget/Type/Position.h> 
    42 #include <gadget/Type/InputMixer.h> 
    4343 
    4444#include <drivers/Polhemus/Fastrak/FastrakStandalone.h> 
     
    4848{ 
    4949 
    50 class Fastrak : public InputMixer<Input,Position> 
     50class Fastrak 
     51   : public input_position_t 
    5152{ 
    5253public: 
  • juggler/trunk/modules/gadgeteer/drivers/USDigital/SerialEncoder/SerialEncoder.h

    r19729 r20307  
    3232#include <vpr/Sync/Guard.h> 
    3333 
     34#include <gadget/Type/InputBaseTypes.h> 
    3435#include <gadget/Type/Input.h> 
    3536#include <gadget/Type/Position.h> 
     
    3839 
    3940#include <gadget/Type/PositionInterface.h> 
    40 #include <gadget/Type/InputMixer.h> 
    4141 
    4242#include "SerialEncoderStandalone.h" 
     
    4444 
    4545 
    46 class SerialEncoder:public gadget::InputMixer<gadget::Input,gadget::Position> 
     46class SerialEncoder 
     47   : public gadget::input_position_t 
    4748{ 
    4849public: 
  • juggler/trunk/modules/gadgeteer/drivers/VRCO/TrackdAPI/TrackdAPIController.h

    r19729 r20307  
    3030#include <gadget/Devices/DriverConfig.h> 
    3131#include <vector> 
     32#include <gadget/Type/InputBaseTypes.h> 
    3233#include <gadget/Type/Input.h> 
    3334#include <gadget/Type/Digital.h> 
    3435#include <gadget/Type/Analog.h> 
    35 #include <gadget/Devices/Sim/SimInput.h> 
    36 #include <gadget/Type/InputMixer.h> 
    3736 
    3837#define TRACKD_DLL_EXPORTS 0 
     
    5554 * @see gadget::Analog 
    5655 */ 
    57 class TrackdAPIController : public InputMixer<InputMixer<Input,Digital>,Analog> 
     56class TrackdAPIController 
     57   : public input_digital_analog_t 
    5858{ 
    5959public: 
  • juggler/trunk/modules/gadgeteer/drivers/VRCO/TrackdAPI/TrackdAPISensor.h

    r19729 r20307  
    3030#include <gadget/Devices/DriverConfig.h> 
    3131#include <vector> 
     32#include <gadget/Type/InputBaseTypes.h> 
    3233#include <gadget/Type/Input.h> 
    3334#include <gadget/Type/Position.h> 
    34 #include <gadget/Type/InputMixer.h> 
    3535 
    3636#define TRACKD_DLL_EXPORTS 0 
     
    5252 * @see gadget::Position 
    5353 */ 
    54 class TrackdAPISensor : public InputMixer<Input,Position> 
     54class TrackdAPISensor 
     55   : public input_position_t 
    5556{ 
    5657public: 
  • juggler/trunk/modules/gadgeteer/gadget/Type/BaseTypeFactory.cpp

    r20243 r20307  
    4141#include <gadget/Type/String.h> 
    4242#include <gadget/Type/InputMixer.h> 
    43 //#include <gadget/Type/BaseTypes.h> 
    4443#include <gadget/Util/Debug.h> 
     44#include <gadget/Type/InputBaseTypes.h> 
    4545 
     46 
     47#define REGISTER_CONSTRUCTOR_TYPE(INPUT_TYPE) \ 
     48   BaseTypeConstructor< INPUT_TYPE::MixedPlaceholderType >* con_ ## INPUT_TYPE  \ 
     49         = new BaseTypeConstructor< INPUT_TYPE::MixedPlaceholderType >;         \ 
     50   if (NULL == con_ ## INPUT_TYPE)                                              \ 
     51   {                                                                            \ 
     52      vprDEBUG(vprDBG_ALL,vprDBG_CRITICAL_LVL)                                  \ 
     53         << clrOutBOLD(clrRED,"ERROR:") << " Failed to load a known type "      \ 
     54         << #INPUT_TYPE << std::endl << vprDEBUG_FLUSH;                         \ 
     55   } 
    4656 
    4757namespace gadget 
     
    7787   // Platform-independent devices. 
    7888 
    79    // Input Digital 
    80    BaseTypeConstructor< InputMixer<Input,Digital>::MixedPlaceholderType >* input_digital 
    81          = new BaseTypeConstructor< InputMixer<Input,Digital>::MixedPlaceholderType >; 
    82  
    83    // Input Analog 
    84    BaseTypeConstructor< InputMixer<Input,Analog>::MixedPlaceholderType >* input_analog 
    85          = new BaseTypeConstructor< InputMixer<Input,Analog>::MixedPlaceholderType >; 
    86  
    87    // Input Position 
    88    BaseTypeConstructor< InputMixer<Input,Position>::MixedPlaceholderType >* input_position 
    89          = new BaseTypeConstructor< InputMixer<Input,Position>::MixedPlaceholderType >; 
    90  
    91    // Input Digital Analog 
    92    // Input Analog Digital 
    93    BaseTypeConstructor< InputMixer< InputMixer<Input,Digital> , Analog>::MixedPlaceholderType >* input_digital_analog 
    94          = new BaseTypeConstructor< InputMixer< InputMixer<Input,Digital> , Analog>::MixedPlaceholderType >; 
    95  
    96    // Input Digital Position 
    97    // Input Position Digital 
    98    BaseTypeConstructor< InputMixer< InputMixer<Input,Digital> , Position>::MixedPlaceholderType >* input_digital_position 
    99          = new BaseTypeConstructor< InputMixer< InputMixer<Input,Digital> , Position>::MixedPlaceholderType >; 
    100  
    101    // Input Analog Position 
    102    // Input Position Analog 
    103    BaseTypeConstructor< InputMixer< InputMixer<Input,Analog> , Position>::MixedPlaceholderType >* input_analog_position 
    104          = new BaseTypeConstructor< InputMixer< InputMixer<Input,Analog> , Position>::MixedPlaceholderType >; 
    105  
    106    // Input Digital Analog Position 
    107    BaseTypeConstructor< InputMixer< InputMixer< InputMixer<Input,Digital> , Analog> , Position>::MixedPlaceholderType >* input_digital_analog_position 
    108          = new BaseTypeConstructor< InputMixer< InputMixer< InputMixer<Input,Digital> , Analog> , Position>::MixedPlaceholderType >; 
    109  
    110    // SimInput Input Position 
    111    BaseTypeConstructor< InputMixer< InputMixer<SimInput,Input> , Position>::MixedPlaceholderType >* siminput_input_position 
    112          = new BaseTypeConstructor< InputMixer< InputMixer<SimInput,Input> , Position>::MixedPlaceholderType >; 
    113  
    114    // SimInput Input Digital 
    115    BaseTypeConstructor< InputMixer< InputMixer<SimInput,Input> , Digital>::MixedPlaceholderType >* siminput_input_digital 
    116          = new BaseTypeConstructor< InputMixer< InputMixer<SimInput,Input> , Digital>::MixedPlaceholderType >; 
    117  
    118    // SimInput Input Analog 
    119    BaseTypeConstructor< InputMixer< InputMixer<SimInput,Input> , Analog>::MixedPlaceholderType >* siminput_input_analog 
    120          = new BaseTypeConstructor< InputMixer< InputMixer<SimInput,Input> , Analog>::MixedPlaceholderType >; 
    121  
    122    // Input KeyboardMouse 
    123    BaseTypeConstructor< InputMixer<Input,KeyboardMouse>::MixedPlaceholderType >* input_keyboard 
    124          = new BaseTypeConstructor< InputMixer<Input,KeyboardMouse>::MixedPlaceholderType >; 
    125  
    126    // Input String 
    127    BaseTypeConstructor< InputMixer<Input, String>::MixedPlaceholderType >* input_string 
    128          = new BaseTypeConstructor< InputMixer<Input, String>::MixedPlaceholderType >; 
    129  
    130    // Input Command 
    131    BaseTypeConstructor< InputMixer<Input, Command>::MixedPlaceholderType >* input_command 
    132          = new BaseTypeConstructor< InputMixer<Input, Command>::MixedPlaceholderType >; 
    133  
    134    // Input Glove 
    135    BaseTypeConstructor< InputMixer<Input,Glove>::MixedPlaceholderType >* input_glove 
    136          = new BaseTypeConstructor< InputMixer<Input,Glove>::MixedPlaceholderType >; 
    137  
    138    // Input Glove Digital 
    139    BaseTypeConstructor< InputMixer< InputMixer<Input, Glove> , Digital>::MixedPlaceholderType >* input_glove_digital 
    140          = new BaseTypeConstructor< InputMixer< InputMixer<Input, Glove> , Digital>::MixedPlaceholderType >; 
    141  
    142    if( (NULL == input_digital) || 
    143        (NULL == input_analog) || 
    144        (NULL == input_position) || 
    145        (NULL == input_digital_analog) || 
    146        (NULL == input_digital_position) || 
    147        (NULL == input_analog_position) || 
    148        (NULL == input_digital_analog_position) || 
    149        (NULL == siminput_input_position) || 
    150        (NULL == siminput_input_digital) || 
    151        (NULL == siminput_input_analog) || 
    152        (NULL == input_keyboard) || 
    153        (NULL == input_string) || 
    154        (NULL == input_command) || 
    155        (NULL == input_glove) || 
    156        (NULL == input_glove_digital) ) 
    157    { 
    158       vprDEBUG(vprDBG_ALL,vprDBG_CRITICAL_LVL) 
    159          << clrOutBOLD(clrRED,"ERROR:") << " Failed to load a known device\n" 
    160          << vprDEBUG_FLUSH; 
    161    } 
     89   REGISTER_CONSTRUCTOR_TYPE(input_digital_t); 
     90   REGISTER_CONSTRUCTOR_TYPE(input_analog_t); 
     91   REGISTER_CONSTRUCTOR_TYPE(input_position_t); 
     92   REGISTER_CONSTRUCTOR_TYPE(input_keyboard_t); 
     93   REGISTER_CONSTRUCTOR_TYPE(input_string_t); 
     94   REGISTER_CONSTRUCTOR_TYPE(input_command_t); 
     95   REGISTER_CONSTRUCTOR_TYPE(input_glove_t); 
     96   REGISTER_CONSTRUCTOR_TYPE(input_digital_analog_t); 
     97   REGISTER_CONSTRUCTOR_TYPE(input_digital_position_t); 
     98   REGISTER_CONSTRUCTOR_TYPE(input_analog_position_t); 
     99   REGISTER_CONSTRUCTOR_TYPE(input_glove_digital_t); 
     100   REGISTER_CONSTRUCTOR_TYPE(siminput_input_position); 
     101   REGISTER_CONSTRUCTOR_TYPE(siminput_input_digital); 
     102   REGISTER_CONSTRUCTOR_TYPE(siminput_input_analog); 
     103   REGISTER_CONSTRUCTOR_TYPE(input_digital_analog_position_t); 
    162104} 
    163105 
  • juggler/trunk/modules/gadgeteer/gadget/Type/InputBaseTypes.h

    r20304 r20307  
    5050class SimInput; 
    5151 
     52/** 
     53 * @name Device Driver Base Types 
     54 * 
     55 * The possible input base types for device drivers. A device driver 
     56 * implementation must derive from one of these in order to function in a 
     57 * cluster configuration. 
     58 * 
     59 * @since 1.3.8 
     60 */ 
     61//@{ 
    5262typedef InputMixer< Input, Digital > input_digital_t; 
    5363typedef InputMixer< Input, Analog > input_analog_t; 
     
    6575typedef InputMixer< InputMixer<SimInput, Input>, Analog> siminput_input_analog; 
    6676typedef InputMixer< InputMixer< InputMixer<Input, Digital>, Analog>, Position> input_digital_analog_position_t; 
     77//@} 
    6778 
    6879} // end namespace