The Robot Application Programming Interface Delegate Project
RAPID Logo

BaseTypes.idl

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2009 United States Government as represented by the
00003  * Administrator of the National Aeronautics and Space Administration.
00004  * All Rights Reserved.
00005  */
00006 
00014 module rapid {
00015 
00016     typedef sequence<octet>          OctetSequence;
00017     typedef sequence<octet, 1024>    OctetSequence1K;
00018     typedef sequence<octet, 2048>    OctetSequence2K;
00019     typedef sequence<octet, 4096>    OctetSequence4K;
00020     typedef sequence<octet, 131072>  OctetSequence128K;
00021 
00022     typedef sequence<short>          ShortSequence;
00023     typedef sequence<short, 32>      ShortSequence32;
00024     typedef sequence<short, 64>      ShortSequence64;
00025     typedef sequence<short, 128>     ShortSequence128;
00026     typedef sequence<short, 1024>    ShortSequence1K;
00027     typedef sequence<short, 2048>    ShortSequence2K;
00028     typedef sequence<short, 4096>    ShortSequence4K;
00029     typedef sequence<short, 131072>  ShortSequence128K;
00030 
00031     typedef sequence<long>           LongSequence;
00032     typedef sequence<long long>      LongLongSequence;
00033     typedef sequence<float>          FloatSequence;
00034     typedef sequence<float, 64>        FloatSequence64;
00035     typedef sequence<double>         DoubleSequence;
00036 
00037     typedef string<16>               String16;
00038     typedef string<32>               String32;
00039     typedef string<64>               String64;
00040     typedef string<128>              String128;
00041     typedef string<256>              String256;
00042     typedef string<1024>             String1K;
00043     typedef string<2048>             String2K;
00044 
00045     typedef sequence<String16>       String16Sequence;
00046     typedef sequence<String32>       String32Sequence;
00047     typedef sequence<String128>      String128Sequence;
00048 
00049     typedef double Vec2d[2];
00050     typedef double Vec3d[3];
00051 
00052     typedef float Vec2f[2];
00053     typedef float Vec3f[3];
00054 
00055     typedef float Mat33f[9];
00056 
00069     enum DataType {
00070         RAPID_BOOL,
00071         RAPID_DOUBLE,
00072         RAPID_FLOAT,
00073         RAPID_INT,
00074         RAPID_STRING,
00075         RAPID_VEC3d,
00076         RAPID_MAT33f
00077     };
00078 
00080     union ParameterUnion switch(DataType) {
00081         case RAPID_BOOL:
00082             boolean b;
00083         case RAPID_DOUBLE:
00084             double d;
00085         case RAPID_FLOAT:
00086             float f;
00087         case RAPID_INT:
00088             long i;
00089         case RAPID_STRING:
00090             String128 s;
00091         case RAPID_VEC3d:
00092             Vec3d vec3d; 
00093         case RAPID_MAT33f:
00094             Mat33f mat33f; 
00095     };
00096     typedef sequence<ParameterUnion,16> ParameterSequence16;
00097 
00102     typedef sequence<String128, 64> ValueSequence64;
00103 
00105     struct KeyTypePair {
00106         String32 key;
00107         DataType type;
00108     };
00109 
00110     typedef sequence<KeyTypePair, 16> KeyTypeSequence16;
00111     typedef sequence<KeyTypePair, 64> KeyTypeSequence64;
00112 
00114     struct KeyTypeValueTriple {
00115         String32 key;
00116         DataType type;
00117         String128 value;
00118     };
00119 
00121     typedef sequence<KeyTypeValueTriple,  8> KeyTypeValueSequence8;
00122     typedef sequence<KeyTypeValueTriple, 16> KeyTypeValueSequence16;
00123     typedef sequence<KeyTypeValueTriple, 32> KeyTypeValueSequence32;
00124     typedef sequence<KeyTypeValueTriple, 64> KeyTypeValueSequence64;
00125     typedef sequence<KeyTypeValueTriple,128> KeyTypeValueSequence128;
00126 
00128     struct Transform3D {
00129         Vec3d xyz;
00130 
00132         Mat33f rot;
00133     };
00134 
00136     struct NamedFloatSequence {
00137         String16 name;
00138         FloatSequence values;
00139     };
00140     typedef sequence<NamedFloatSequence,16> NFSeqSequence16;
00141     typedef sequence<NamedFloatSequence,32> NFSeqSequence32;
00142 
00144     struct FloatRange {
00146         float min;
00148         float max;
00149     };
00150 
00152     struct FloatRangeValue {
00153         float min;
00154         float max;
00155         float value;
00156     };
00157 
00159     struct OptionSetValue {
00160         long index;
00161         String32Sequence options;
00162     };
00163 
00165     struct NamedFloatRangeValue {
00166         String16 name;
00167         FloatRangeValue range;
00168     };
00169     typedef sequence<NamedFloatRangeValue,16> NamedFloatRangeValueSequence16;
00170     typedef sequence<NamedFloatRangeValue,32> NamedFloatRangeValueSequence32;
00171 
00173     struct NamedOptionSetValue {
00174         String16 name;
00175         OptionSetValue option;
00176     };
00177     typedef sequence<NamedOptionSetValue,16> NamedOptionSetValueSequence16;
00178     typedef sequence<NamedOptionSetValue,32> NamedOptionSetValueSequence32;
00179 };
00180 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines