Exemplo n.º 1
0
fc2Property get_property(fleaCamera* camera, fc2PropertyType type)
{
	fc2Property prop;
	prop.type = type;
	fc2GetProperty(camera->context, &prop);
	return prop;
}
Exemplo n.º 2
0
void set_property_value(fleaCamera* camera, fc2PropertyType type, float value)
{
    fc2Property prop;
    prop.type = type;
    fc2GetProperty(camera->context, &prop);
    prop.absControl = TRUE;    
    prop.absValue = value;
    fc2SetProperty(camera->context, &prop);    

    return;
}
Exemplo n.º 3
0
fleaProperty get_property_as_flea(fleaCamera* camera, fc2PropertyType type)
{
	fc2Property prop;
	fleaProperty fleaProp;
	prop.type = type;
	fc2GetProperty(camera->context, &prop);
	fleaProp.autoMode = prop.autoManualMode;
	fleaProp.on = prop.onOff;
	fleaProp.value = prop.absValue;
	return fleaProp;
}
Exemplo n.º 4
0
void chkProperty(fleaCamera* camera, fc2PropertyType type)
{
    fc2PropertyInfo info;
    fc2Property prop;

    info.type = type;
    fc2GetPropertyInfo(camera->context, &info);
    PrintPropertyInfo(&info);
    
    prop.type = type;
    fc2GetProperty(camera->context, &prop);
    PrintProperty(&prop);
    
    return;
}
Exemplo n.º 5
0
//
// idlpgr_GetProperty
//
// Read property values from camera
//
// Reference: FlyCapture2Defs_C.h
//
IDL_VPTR IDL_CDECL idlpgr_GetProperty(int argc, IDL_VPTR argv[])
{
  fc2Error error;
  fc2Context context;
  fc2Property property;
  static IDL_MEMINT r[] = {1, 8};
  static IDL_MEMINT one = 1;
  IDL_VPTR idl_property;
  IDL_StructDefPtr sdef;
  char *pd;

  context = (fc2Context) IDL_ULong64Scalar(argv[0]);
  property.type = (fc2PropertyType) IDL_LongScalar(argv[1]);

  error = fc2GetProperty(context, &property);
  if (error)
    IDL_MessageFromBlock(msgs, M_IDLPGR_ERRORCODE, IDL_MSG_LONGJMP,
			 "Could not get requested property",
			 error);
  
  static IDL_STRUCT_TAG_DEF tags[] = {
    { "TYPE",           0, (void *) IDL_TYP_LONG },
    { "PRESENT",        0, (void *) IDL_TYP_LONG },
    { "ABSCONTROL",     0, (void *) IDL_TYP_LONG },
    { "ONEPUSH",        0, (void *) IDL_TYP_LONG },
    { "ONOFF",          0, (void *) IDL_TYP_LONG },
    { "AUTOMANUALMODE", 0, (void *) IDL_TYP_LONG },
    { "VALUEA",         0, (void *) IDL_TYP_ULONG },
    { "VALUEB",         0, (void *) IDL_TYP_ULONG },
    { "ABSVALUE",       0, (void *) IDL_TYP_FLOAT },
    { "RESERVED",       r, (void *) IDL_TYP_ULONG },
    { 0 }
  };
  sdef = IDL_MakeStruct("fc2Property", tags);
  pd = IDL_MakeTempStruct(sdef, 1, &one, &idl_property, TRUE);
  memcpy(pd, (char *) &property, sizeof(fc2Property));

  return idl_property;
}