コード例 #1
0
ファイル: flea_lib.c プロジェクト: jaxiano/cuav
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;
}
コード例 #2
0
ファイル: idlpgr.c プロジェクト: davidgrier/idlpgr
//
// idlpgr_GetPropertyInfo
//
// Get information about property
//
// Reference: FlyCapture2Defs_C.h
//
IDL_VPTR IDL_CDECL idlpgr_GetPropertyInfo(int argc, IDL_VPTR argv[])
{
  fc2Error error;
  fc2Context context;
  fc2PropertyInfo info;
  static IDL_MEMINT one = 1;
  static IDL_MEMINT r[] = {1, 8};
  static IDL_MEMINT s[] = {1, MAX_STRING_LENGTH};
  IDL_VPTR idl_info;
  IDL_StructDefPtr sdef;
  char *pd;

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

  error = fc2GetPropertyInfo(context, &info);
  if (error)
    IDL_MessageFromBlock(msgs, M_IDLPGR_ERRORCODE, IDL_MSG_LONGJMP,
			 "Could not get requested property information",
			 error);

  static IDL_STRUCT_TAG_DEF tags[] = {
    { "TYPE",             0, (void *) IDL_TYP_LONG },
    { "PRESENT",          0, (void *) IDL_TYP_LONG },
    { "AUTOSUPPORTED",    0, (void *) IDL_TYP_LONG },
    { "MANUALSUPPORTED",  0, (void *) IDL_TYP_LONG },
    { "ONOFFSUPPORTED",   0, (void *) IDL_TYP_LONG },
    { "ONEPUSHSUPPORTED", 0, (void *) IDL_TYP_LONG },
    { "ABSVALSUPPORTED",  0, (void *) IDL_TYP_LONG },
    { "READOUTSUPPORTED", 0, (void *) IDL_TYP_LONG },
    { "MIN",              0, (void *) IDL_TYP_ULONG },
    { "MAX",              0, (void *) IDL_TYP_ULONG },
    { "ABSMIN",           0, (void *) IDL_TYP_FLOAT },
    { "ABSMAX",           0, (void *) IDL_TYP_FLOAT },
    { "PUNITS",           s, (void *) IDL_TYP_BYTE },
    { "PUNITABBR",        s, (void *) IDL_TYP_BYTE },
    { "RESERVED",         r, (void *) IDL_TYP_ULONG },
    { 0 }
  };

  sdef = IDL_MakeStruct("fc2PropertyInfo", tags);
  pd = IDL_MakeTempStruct(sdef, 1, &one, &idl_info, TRUE);
  memcpy(pd, (char *) &info, sizeof(fc2PropertyInfo));

  return idl_info;
}