Package dcamapi

Examples of dcamapi.DCAM_PROPERTYATTR


        lDcamProperty.name = lNameBytes.getString(StringType.C);
      }

      {
        final DCAM_PROPERTYATTR lDCAM_PROPERTYATTR = new DCAM_PROPERTYATTR();
        lDCAM_PROPERTYATTR.cbSize(BridJ.sizeOf(DCAM_PROPERTYATTR.class));
        lDCAM_PROPERTYATTR.iProp(lPointerToPropertyId.getCLong());

        final IntValuedEnum<DcamapiLibrary.DCAMERR> lError = DcamapiLibrary.dcampropGetattr(mDcamDevice.getHDCAMPointer(),
                                                                                            Pointer.getPointer(lDCAM_PROPERTYATTR));
        final boolean lSuccessGetAttribute = true; // always works...
        lSuccess &= lSuccessGetAttribute;

        if (lSuccessGetAttribute)
        {

          final FlagSet<DCAMPROPATTRIBUTE> lFlagSetForAttribute = FlagSet.createFlagSet(lDCAM_PROPERTYATTR.attribute()
                                                                                                          .value(),
                                                                                        DCAMPROPATTRIBUTE.class);

          final FlagSet<DCAMPROPUNIT> lFlagSetForUnit = FlagSet.createFlagSet(lDCAM_PROPERTYATTR.iUnit()
                                                                                                .value(),
                                                                              DCAMPROPUNIT.class);
          /*
          final FlagSet<DCAMPROPATTRIBUTE> lFlagSetForAttribute = FlagSet.fromValue(lDCAM_PROPERTYATTR.attribute()
                                                                                                      .value(),
                                                                                    DCAMPROPATTRIBUTE.class);

          final FlagSet<DCAMPROPUNIT> lFlagSetForUnit = FlagSet.fromValue(lDCAM_PROPERTYATTR.iUnit()
                                                                                            .value(),
                                                                          DCAMPROPUNIT.class);/**/

          lDcamProperty.attribute = lFlagSetForAttribute;
          lDcamProperty.writable = lFlagSetForAttribute.has(DCAMPROPATTRIBUTE.DCAMPROP_ATTR_WRITABLE);

          if (lFlagSetForAttribute.has(DCAMPROPATTRIBUTE.DCAMPROP_TYPE_LONG))
          {
            lDcamProperty.mode = "long";
          }
          else if (lFlagSetForAttribute.has(DCAMPROPATTRIBUTE.DCAMPROP_TYPE_REAL))
          {
            lDcamProperty.mode = "real";
          }
          else if (lFlagSetForAttribute.has(DCAMPROPATTRIBUTE.DCAMPROP_TYPE_MODE))
          {
            lDcamProperty.mode = "mode";
          }

          lDcamProperty.writable = lFlagSetForAttribute.has(DCAMPROPATTRIBUTE.DCAMPROP_ATTR_WRITABLE);
          lDcamProperty.readable = lFlagSetForAttribute.has(DCAMPROPATTRIBUTE.DCAMPROP_ATTR_READABLE);

          final Iterator<DCAMPROPUNIT> lIterator = lFlagSetForUnit.iterator();
          if (lIterator.hasNext())
          {
            lDcamProperty.unit = lIterator.next();
          }
          else
          {
            lDcamProperty.unit = null;
          }

          lDcamProperty.valuemin = lDCAM_PROPERTYATTR.valuemin();
          lDcamProperty.valuemax = lDCAM_PROPERTYATTR.valuemax();
          lDcamProperty.valuestep = lDCAM_PROPERTYATTR.valuestep();
          lDcamProperty.valuedefault = lDCAM_PROPERTYATTR.valuedefault();
        }
      }

      mPropertyMap.put(lDcamProperty.name, lDcamProperty);

View Full Code Here

TOP

Related Classes of dcamapi.DCAM_PROPERTYATTR

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.