您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CreateProperty函数代码示例

51自学网 2021-06-01 20:15:01
  C++
这篇教程C++ CreateProperty函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CreateProperty函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateProperty函数的具体用法?C++ CreateProperty怎么用?C++ CreateProperty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CreateProperty函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetDevice

int PIZStage::Initialize(){   MM::Device* device = GetDevice(controllerName_.c_str());   if (device == NULL)	   return ERR_GCS_PI_NO_CONTROLLER_FOUND;   int ret = device->Initialize();   if (ret != DEVICE_OK)	   return ret;   ctrl_ = PIController::GetByLabel(controllerName_);   if (ctrl_ == NULL)	   return ERR_GCS_PI_NO_CONTROLLER_FOUND;   std::string  sBuffer;   ctrl_->qIDN(sBuffer);   LogMessage(std::string("Connected to: ") + sBuffer);   ret = ctrl_->InitStage(axisName_, stageType_);   if (ret != DEVICE_OK)   {	   LogMessage("Cannot init axis");	   return ret;   }     // axis limits (assumed symmetrical)   CPropertyAction* pAct = new CPropertyAction (this, &PIZStage::OnHoming);   CreateProperty("HOMING", "", MM::String, false, pAct);   pAct = new CPropertyAction (this, &PIZStage::OnVelocity);   CreateProperty("Velocity", "", MM::Float, false, pAct);   initialized_ = true;   return DEVICE_OK;}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:35,


示例2: CreateProperty

/////////////////////////////////////////////////////////// MMDevice APIint MT20Shutter::Initialize(){	if(initialized_) return DEVICE_OK;	// set property list	// Name	int ret = CreateProperty(MM::g_Keyword_Name, g_MT20Shutter, MM::String, true);	if(ret != DEVICE_OK) return ret;	// Description	ret = CreateProperty(MM::g_Keyword_Description, "Olympus MT20 shutter", MM::String, true);	if(ret != DEVICE_OK) return ret;	// State	CPropertyAction* pAct = new CPropertyAction(this, &MT20Shutter::OnState);	ret = CreateProperty(MM::g_Keyword_State, "0", MM::Integer, false, pAct);	if(ret != DEVICE_OK) return ret;	AddAllowedValue(MM::g_Keyword_State, "0");	// Closed	AddAllowedValue(MM::g_Keyword_State, "1");	// Open	state_ = false;	busy_ = true;	ret = UpdateStatus();	busy_ = false;	if(ret != DEVICE_OK) return ret;	initialized_ = true;	return DEVICE_OK;}
开发者ID:ckc7,项目名称:micromanager2,代码行数:36,


示例3: initialized_

///////////////////////////////////////////////////////////////////////////////// RappScanner//RappScanner::RappScanner() :   initialized_(false), port_(""), calibrationMode_(0), polygonAccuracy_(10), polygonMinRectSize_(10),   ttlTriggered_("Rising Edge"), rasterFrequency_(500), spotSize_(10), laser2_(false){   InitializeDefaultErrorMessages();   // create pre-initialization properties   // ------------------------------------   // Name   CreateProperty(MM::g_Keyword_Name, g_RappScannerName, MM::String, true);   // Description   CreateProperty(MM::g_Keyword_Description, "Rapp UGA-40 galvo phototargeting adapter", MM::String, true);   // Port   CPropertyAction* pAct = new CPropertyAction (this, &RappScanner::OnPort);      obsROE_Device* dev = new obsROE_Device();	std::vector<std::string> s = dev->SearchDevices();	if (s.size() <= 0)	{      s.push_back(std::string("Undefined"));	}   // The following line crashes hardware wizard if compiled in a Debug configuration:   CreateProperty("VirtualComPort", s.at(0).c_str(), MM::String, false, pAct, true);	for (unsigned int i = 0; i < s.size(); i++)   {      AddAllowedValue("VirtualComPort", s.at(i).c_str());   }}  
开发者ID:ckc7,项目名称:micromanager2,代码行数:38,


示例4: CheckForDevice

int FocalPoint::Initialize(){   if (initialized_)      return DEVICE_OK;   // check status first (test for communication protocol)   int ret = CheckForDevice();   if (ret != DEVICE_OK)      return ret;   CPropertyAction* pAct = new CPropertyAction(this, &FocalPoint::OnFocus);   CreateProperty (g_Focus, g_On, MM::String, false, pAct);   AddAllowedValue(g_Focus, g_On);   AddAllowedValue(g_Focus, g_Off);   pAct = new CPropertyAction(this, &FocalPoint::OnCommand);   CreateProperty (g_CommandMode, g_Remote, MM::String, false, pAct);   AddAllowedValue(g_CommandMode, g_Local);   AddAllowedValue(g_CommandMode, g_Remote);   pAct = new CPropertyAction(this, &FocalPoint::OnWaitAfterLock);   CreateProperty("Wait ms after Lock", "3000", MM::Integer, false, pAct);   pAct = new CPropertyAction(this, &FocalPoint::OnLaser);   CreateProperty (g_Laser, g_On, MM::String, false, pAct);   AddAllowedValue(g_Laser, g_On);   AddAllowedValue(g_Laser, g_Off);   initialized_ = true;   return DEVICE_OK;}
开发者ID:bwagjor,项目名称:Thesis,代码行数:31,


示例5: ExecuteCommand

int SC10::Initialize(){   // Get info about device.    std::string deviceInfo;   int ret = ExecuteCommand("*idn?", deviceInfo);   if (ret != DEVICE_OK)      // With some ports, the first command fails.  In that case, repeat once      ret = ExecuteCommand("*idn?", deviceInfo);      if (ret != DEVICE_OK)         return ret;   CreateProperty("Device Info", deviceInfo.c_str(), MM::String, true);   LogMessage(deviceInfo.c_str());   // Set device to manual mode (1) needed for normal operation   std::string answer;   ret = ExecuteCommand("mode=1", answer);   if (ret != DEVICE_OK)      return ret;      CPropertyAction* pAct = new CPropertyAction(this, &SC10::OnCommand);   ret = CreateProperty("SC10 Command:", "", MM::String, false, pAct);            ret = UpdateStatus();   if (ret != DEVICE_OK)      return ret;   initialized_ = true;   return DEVICE_OK;}
开发者ID:ckc7,项目名称:micromanager2,代码行数:29,


示例6: initialized_

Controller::Controller(const char* name) :   initialized_(false),    intensity_(0),   state_(0),   name_(name),    busy_(false),   error_(0),   changedTime_(0.0){   assert(strlen(name) < (unsigned int) MM::MaxStrLength);   InitializeDefaultErrorMessages();   // create pre-initialization properties   // ------------------------------------   // Name   CreateProperty(MM::g_Keyword_Name, name_.c_str(), MM::String, true);   // Description   CreateProperty(MM::g_Keyword_Description, "PrecisExcite LED Illuminator", MM::String, true);   // Port   CPropertyAction* pAct = new CPropertyAction (this, &Controller::OnPort);   CreateProperty(MM::g_Keyword_Port, "Undefined", MM::String, false, pAct, true);   EnableDelay(); // signals that the delay setting will be used   UpdateStatus();}
开发者ID:ckc7,项目名称:micromanager2,代码行数:29,


示例7: CPropertyAction

void MUCamSource::InitPixelType(){    bitCnt_ = bitDepth_ * bytesPerPixel_;    // pixel type    CPropertyAction*pAct = new CPropertyAction (this, &MUCamSource::OnPixelType);    int ret;    vector<string> pixelTypeValues;    if(colorChannel_ == 1)    {        ret = CreateProperty(MM::g_Keyword_PixelType, g_PixelType_8bit, MM::String, false, pAct);        pixelTypeValues.push_back(g_PixelType_8bit);        // if(MIDP_Has16Bits() == 0)        {            pixelTypeValues.push_back(g_PixelType_16bit);        }    }    else if(colorChannel_ == 3)    {        ret = CreateProperty(MM::g_Keyword_PixelType, g_PixelType_32bitRGB, MM::String, false, pAct);        pixelTypeValues.push_back(g_PixelType_8bit);        pixelTypeValues.push_back(g_PixelType_32bitRGB);        // if(MIDP_Has16Bits() == 0)        {            pixelTypeValues.push_back(g_PixelType_16bit);            pixelTypeValues.push_back(g_PixelType_64bitRGB);        }        bytesPerPixel_ = 4;    }    ret = SetAllowedValues(MM::g_Keyword_PixelType, pixelTypeValues);}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:30,


示例8: CPropertyAction

//Tells micromanager the step size, top speed and acceleration. //Speed and acceleration ranges does not refer to a meaningful unit but//the range that the hardware uses.int XYStage::Initialize(){   // Step size   CPropertyAction* pAct = new CPropertyAction (this, &XYStage::OnStepSizeX);   CreateProperty("StepSizeX_um", "0.1", MM::Float, true, pAct);   pAct = new CPropertyAction (this, &XYStage::OnStepSizeY);   CreateProperty("StepSizeY_um", "0.1", MM::Float, true, pAct);   // Max Speed   pAct = new CPropertyAction (this, &XYStage::OnMaxSpeed);   CreateProperty("MaxSpeed", "30000", MM::Integer, false, pAct);   SetPropertyLimits("MaxSpeed", 1000, 50000);   // Acceleration   pAct = new CPropertyAction (this, &XYStage::OnAcceleration);   CreateProperty("Acceleration", "500", MM::Integer, false, pAct);   SetPropertyLimits("Acceleration", 1, 1000);      int ret = UpdateStatus();   if (ret != DEVICE_OK)      return ret;   initialized_ = true;   return DEVICE_OK;}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:28,


示例9: port_

Cobolt::Cobolt() :port_("Undefined"),initialized_(false),busy_(false),answerTimeoutMs_(1000),power_(0.00),maxPower_(0.00),laserOn_("On"),laserStatus_("Undefined"),interlock_ ("Interlock Open"),fault_("No Fault"),serialNumber_("0"),version_("0"){    InitializeDefaultErrorMessages();    SetErrorText(ERR_PORT_CHANGE_FORBIDDEN, "You can't change the port after device has been initialized.");        // Name    CreateProperty(MM::g_Keyword_Name, g_DeviceCoboltName, MM::String, true);        // Description    CreateProperty(MM::g_Keyword_Description, "Cobolt Laser Power Controller", MM::String, true);        // Port    CPropertyAction* pAct = new CPropertyAction (this, &Cobolt::OnPort);    CreateProperty(MM::g_Keyword_Port, "Undefined", MM::String, false, pAct, true);    // Max Power    pAct = new CPropertyAction (this, &Cobolt::OnPowerMax);    CreateProperty("Max Power", "Undefined", MM::Float, false, pAct, true);  }
开发者ID:coronin,项目名称:micromanager-upstream,代码行数:31,


示例10: CPropertyAction

void PIGCSControllerDLLDevice::CreateInterfaceProperties(void){   CPropertyAction* pAct;   std::string interfaceParameterLabel = "";   // Interface type   if (bShowInterfaceProperties_)   {      pAct = new CPropertyAction (this, &PIGCSControllerDLLDevice::OnInterfaceType);      CreateProperty(PIGCSControllerDLLDevice::PropInterfaceType_, interfaceType_.c_str(), MM::String, false, pAct, true);      interfaceParameterLabel = PIGCSControllerDLLDevice::PropInterfaceParameter_;   }   else   {      if (strcmp(interfaceType_.c_str(), "PCI") == 0)      {         interfaceParameterLabel = "PCI Board";      }      else if (strcmp(interfaceType_.c_str(), "RS-232") == 0)      {         interfaceParameterLabel = "ComPort ; Baudrate";      }   }      // Interface parameter   if (interfaceParameterLabel.empty()) return;   pAct = new CPropertyAction (this, &PIGCSControllerDLLDevice::OnInterfaceParameter);   CreateProperty(interfaceParameterLabel.c_str(), interfaceParameter_.c_str(), MM::String, false, pAct, true);}
开发者ID:coronin,项目名称:micromanager-upstream,代码行数:31,


示例11: ExecuteCommand

int LStepOld::Initialize(){   std::string answer;   int s = ExecuteCommand( g_cmd_get_motor_speed, NULL, 0, &answer );   if (s!=DEVICE_OK)      return s;   motor_speed_ = atof( answer.c_str() ) * .1;   char speed[5];   sprintf( speed, "%2.1f",  motor_speed_ );   CPropertyAction* pAct = new CPropertyAction(this, &LStepOld::OnSpeed );   CreateProperty( "Motor-speed [Hz]", speed, MM::Float, false, pAct);   SetPropertyLimits( "Motor-speed [Hz]", 0.01, 25 );   s = ExecuteCommand( g_cmd_get_version, NULL, 0, &answer );   if (s!=DEVICE_OK)      return s;   CreateProperty("Firmware Version", answer.c_str(), MM::String, true);   pAct = new CPropertyAction( this, &LStepOld::OnJoystick );   CreateProperty( "Joystick command", "False", MM::String, false, pAct);   std::vector<std::string> allowed_boolean;   allowed_boolean.push_back("True");   allowed_boolean.push_back("False");   SetAllowedValues("Joystick command", allowed_boolean);   return DEVICE_OK;}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:27,


示例12: CreateProperty

int ZStage::Initialize(){    if(!g_device_connected)        return DEVICE_NOT_CONNECTED;    if(_init)        return DEVICE_OK;    // Name and description    CreateProperty(MM::g_Keyword_Name, g_devlist[MoticZ][0],                   MM::String, true);    CreateProperty(MM::g_Keyword_Description, g_devlist[MoticZ][1],                   MM::String, true);    double l(0), r(0);    z_SpeedRange(&l, &r);    CreateProperty(PROP_ZSPEED, CDeviceUtils::ConvertToString(r / 2), MM::Float, false, 0);    SetPropertyLimits(PROP_ZSPEED, l, r);    Hub* hub = static_cast<Hub*>(GetParentHub());    if(hub)    {        hub->AddEventReceiver(this);    }    UpdateStatus();    _init = true;    return DEVICE_OK;}
开发者ID:kwitekrac,项目名称:micromanager2,代码行数:30,


示例13: XYStage

///////////////////////////////////////////////////////////////////////////////// XYStageH128//XYStage::XYStage() : // LIN 01/01/2012 DIDN'T RENAME FUNCTION. ASSUMING MMCORE WILL EXPECT TO CALL ON XYStage()   CXYStageBase<XYStage>(),   initialized_(false),    port_("Undefined"),    stepSizeXUm_(0.1), // LIN 01/02/2012 changed initial value from 0.0 to 0.1   stepSizeYUm_(0.1), // LIN 01/02/2012 changed initial value from 0.0 to 0.1   answerTimeoutMs_(1000),   originX_(0),   originY_(0),   mirrorX_(false),   mirrorY_(false),   busy_(false) // LIN 01/01/2012 ADDED{   InitializeDefaultErrorMessages();   // create pre-initialization properties   // ------------------------------------   // Name   // CreateProperty(MM::g_Keyword_Name, g_LegacyXYStageDeviceName, MM::String, true); // LIN 01/01/2012 RENAMED   // Description    CreateProperty(MM::g_Keyword_Description, "Prior H128 XY stage driver adapter", MM::String, true); // LIN 01/01/2012 RENAMED   // Port   CPropertyAction* pAct = new CPropertyAction (this, &XYStage::OnPort);   CreateProperty(MM::g_Keyword_Port, "Undefined", MM::String, false, pAct, true);   EnableDelay(); // LIN 01-01-2012 ADDED SO WE CAN SET DELAY INSTEAD OF QUERYING H128 BUSY STATUS}
开发者ID:coronin,项目名称:micromanager-upstream,代码行数:33,


示例14: initialized_

H101CryoControl::H101CryoControl() :   initialized_(false)  { InitializeDefaultErrorMessages(); CreateProperty(MM::g_Keyword_Name, g_H101CryoControl , MM::String, true); CreateProperty(MM::g_Keyword_Description, "Okolab H101 Cryo Control adapter", MM::String, true);}
开发者ID:bwagjor,项目名称:Thesis,代码行数:8,


示例15: dev_num

/*--------------------------------------------------------------------------- Default constructor.---------------------------------------------------------------------------*/Mightex_Sirius_SLC_USB::Mightex_Sirius_SLC_USB() :	dev_num(0),	cur_dev(0),	devHandle(-1),	channels(-1),	devModuleType(MODULE_AA),	mode(DISABLE_MODE),	m_ratio(50),	m_period(1),	m_channel(1),	m_name(""),    m_LEDOn("Off"),	m_mode("DISABLE"),   m_status("No Fault"),	m_serialNumber("n/a"),   m_busy(false),   m_initialized(false){	InitializeDefaultErrorMessages();	SetErrorText(ERR_PORT_CHANGE_FORBIDDEN, "You can't change the port after device has been initialized.");	SetErrorText(ERR_INVALID_DEVICE, "The selected plugin does not fit for the device.");	// Name	CreateProperty(MM::g_Keyword_Name, g_DeviceSiriusSLCUSBName, MM::String, true);	// Description	CreateProperty(MM::g_Keyword_Description, "Mightex Sirius SLC LED Driver(USB)", MM::String, true);	CPropertyAction* pAct = new CPropertyAction (this, &Mightex_Sirius_SLC_USB::OnDevices);	CreateProperty("Devices", "", MM::String, false, pAct, true);	AddAllowedValue( "Devices", ""); // no device yet	HidInit();	char ledName[64];	char devName[32];	char serialNum[32];	int dev_Handle;	std::string s_devName;	dev_num = MTUSB_LEDDriverInitDevices();	for(int i = 0; i < dev_num; i++)	{		dev_Handle = MTUSB_LEDDriverOpenDevice(i);		if(dev_Handle >= 0)			if(HidGetDeviceName(dev_Handle, devName, sizeof(devName)) > 0)				if(MTUSB_LEDDriverSerialNumber(dev_Handle, serialNum, sizeof(serialNum)) > 0)				{					sprintf(ledName, "%s:%s", devName, serialNum);					AddAllowedValue( "Devices", ledName);					s_devName = ledName;					devNameList.push_back(s_devName);				}		MTUSB_LEDDriverCloseDevice(dev_Handle);	}}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:60,


示例16: GetLabel

int PIGCSControllerDLLDevice::Initialize(){	if (initialized_)		return DEVICE_OK;	char szLabel[MM::MaxStrLength];	GetLabel(szLabel);	ctrl_ = new PIGCSControllerDLL(szLabel, this, GetCoreCallback());    int ret = ctrl_->LoadDLL(dllName_);   if (ret != DEVICE_OK)   {      LogMessage(std::string("Cannot load dll ") + dllName_);      Shutdown();	  return ret;   }   ret = ctrl_->ConnectInterface(interfaceType_, interfaceParameter_);   if (ret != DEVICE_OK)   {	   LogMessage("Cannot connect");	   Shutdown();	   return ret;   }   initialized_ = true;   int nrJoysticks = ctrl_->FindNrJoysticks();	if (nrJoysticks > 0)	{		CPropertyAction* pAct = new CPropertyAction (this, &PIGCSControllerDLLDevice::OnJoystick1);		CreateProperty("Joystick 1", "0" , MM::Integer, false, pAct);	}	if (nrJoysticks > 1)	{		CPropertyAction* pAct = new CPropertyAction (this, &PIGCSControllerDLLDevice::OnJoystick2);		CreateProperty("Joystick 2", "0" , MM::Integer, false, pAct);	}	if (nrJoysticks > 2)	{		CPropertyAction* pAct = new CPropertyAction (this, &PIGCSControllerDLLDevice::OnJoystick3);		CreateProperty("Joystick 3", "0" , MM::Integer, false, pAct);	}	if (nrJoysticks > 3)	{		CPropertyAction* pAct = new CPropertyAction (this, &PIGCSControllerDLLDevice::OnJoystick4);		CreateProperty("Joystick 4", "0" , MM::Integer, false, pAct);	}   return ret;}
开发者ID:coronin,项目名称:micromanager-upstream,代码行数:51,


示例17: obsROE_Device

int RappScanner::Initialize(){   UGA_ = new obsROE_Device();      UGA_->Connect(port_.c_str());   // Other devices may have send signals to the UGA 40.  If connection failed, try one more time to clear this up   if (!UGA_->IsConnected())    {      UGA_->Connect(port_.c_str());   }   if (UGA_->IsConnected())    {      UGA_->UseMaxCalibration(false);      UGA_->SetCalibrationMode(false, false);	  UGA_->SetCalibrationMode(false, true);      RunDummyCalibration(false);	  RunDummyCalibration(true);      UGA_->CenterSpot();      currentX_ = 0;      currentY_ = 0;      initialized_ = true;   } else {      initialized_ = false;      return DEVICE_NOT_CONNECTED;   }   CPropertyAction* pAct = new CPropertyAction(this, &RappScanner::OnCalibrationMode);   CreateProperty("CalibrationMode", "0", MM::Integer, false, pAct);   AddAllowedValue("CalibrationMode", "1");   AddAllowedValue("CalibrationMode", "0");   pAct = new CPropertyAction(this, &RappScanner::OnSequence);   CreateProperty("Sequence", "", MM::String, false, pAct);   pAct = new CPropertyAction(this, &RappScanner::OnTTLTriggered);   CreateProperty("TTLTriggered", "Rising Edge", MM::String, false, pAct);   AddAllowedValue("TTLTriggered", "Rising Edge");   AddAllowedValue("TTLTriggered", "Falling Edge");   pAct = new CPropertyAction(this, &RappScanner::OnSpotSize);   CreateProperty("SpotSize", "0", MM::Float, false, pAct);   pAct = new CPropertyAction(this, &RappScanner::OnRasterFrequency);   CreateProperty("RasterFrequency_Hz", "500", MM::Integer, false, pAct);   pAct = new CPropertyAction(this, &RappScanner::OnAccuracy);   CreateProperty("AccuracyPercent", "10", MM::Integer, false, pAct);   pAct = new CPropertyAction(this, &RappScanner::OnMinimumRectSize);   CreateProperty("MinimumRectSize", "250", MM::Integer, false, pAct);   pAct = new CPropertyAction(this, &RappScanner::OnLaser);   CreateProperty("Laser", "1", MM::Integer, false, pAct);   AddAllowedValue("Laser", "1");   AddAllowedValue("Laser", "2");   return DEVICE_OK;}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:60,


示例18: initialized_

Xcite120PC::Xcite120PC() :   initialized_(false),   port_("Undefined"),   is_open_(false),   is_locked_("False"),   lamp_intensity_("100"),   lamp_state_("On"),   exposure_time_s_(0.2){  InitializeDefaultErrorMessages();  CreateProperty(MM::g_Keyword_Name, g_Xcite120PCName, MM::String, true);  CPropertyAction* pAct = new CPropertyAction (this, &Xcite120PC::OnPort);  CreateProperty(MM::g_Keyword_Port, "Unefined", MM::String, false, pAct, true);}
开发者ID:ckc7,项目名称:micromanager2,代码行数:15,


示例19: CPropertyAction

void Sapphire::GenerateReadOnlyIDProperties(){	CPropertyAction* pAct;     pAct = new CPropertyAction(this, &Sapphire::OnMinimumLaserPower);   CreateProperty("Minimum Laser Power", "", MM::Float, false, pAct);   	pAct = new CPropertyAction(this, &Sapphire::OnMaximumLaserPower);   CreateProperty("Maximum Laser Power", "", MM::Float, false, pAct);	pAct = new CPropertyAction(this, &Sapphire::OnWaveLength);   CreateProperty("Wavelength", "", MM::Float, false, pAct);}
开发者ID:ckc7,项目名称:micromanager2,代码行数:16,


示例20: CreateProperty

XnStatus XnDeviceModuleHolder::UnsafeSetProperties(const XnActualPropertiesHash& props){	XnStatus nRetVal = XN_STATUS_OK;		for (XnActualPropertiesHash::ConstIterator it = props.Begin(); it != props.End(); ++it)	{		XnProperty* pRequestProp = it->Value();		XnProperty* pProp = NULL;		// check if property already exist		nRetVal = m_pModule->GetProperty(pRequestProp->GetName(), &pProp);		if (nRetVal == XN_STATUS_DEVICE_PROPERTY_DONT_EXIST)		{			// property doesn't exist. create it now			nRetVal = CreateProperty(pRequestProp);			XN_IS_STATUS_OK(nRetVal);		}		else if (nRetVal == XN_STATUS_OK)		{			// property exists. Change its value			nRetVal = UnsafeSetProperty(pRequestProp, pProp);			XN_IS_STATUS_OK(nRetVal);		}		else		{			// error			return (nRetVal);		}	} // props loop		return (XN_STATUS_OK);}
开发者ID:DogfishLab88,项目名称:debian-openni-sensor-avin2-sensorkinect,代码行数:33,


示例21: CPropertyAction

void Controller::GeneratePropertyState(){	CPropertyAction* pAct = new CPropertyAction(this, &Controller::OnState);	CreateProperty(g_Keyword_Global_State, "0", MM::Integer, false, pAct);	AddAllowedValue(g_Keyword_Global_State, "0");	AddAllowedValue(g_Keyword_Global_State, "1");}
开发者ID:csachs,项目名称:micro-manager,代码行数:7,


示例22: MUCam_getBinningCount

void MUCamSource::InitBinning(){    BinningsVec_.clear();    int cnt = MUCam_getBinningCount(hCameras_[currentCam_]);    int x[6], y[6];    MUCam_getBinningList(hCameras_[currentCam_], x, y);    for(int i = 0; i < cnt; i++)    {        BinningsVec_.push_back(x[i]);        BinningsVec_.push_back(y[i]);    }    binning_ = 1;        // binning    CPropertyAction *pAct = new CPropertyAction (this, &MUCamSource::OnBinning);    int ret = CreateProperty(MM::g_Keyword_Binning,                             CDeviceUtils::ConvertToString(1<<binning_), MM::Integer, false, pAct);    SetBinning(1<<binning_);    //assert(ret == DEVICE_OK);        vector<string> binningValues;    for(int i = 0; i < cnt; i++)    {        binningValues.push_back(CDeviceUtils::ConvertToString(1<<i));    }        ret = SetAllowedValues(MM::g_Keyword_Binning, binningValues);    assert(ret == DEVICE_OK);}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:30,


示例23: CPropertyAction

void Controller::GeneratePropertyTriggerSequence(){   int ret;   CPropertyAction* pAct = new CPropertyAction (this, &Controller::OnTriggerSequence);   ret = CreateProperty(g_Keyword_Trigger_Sequence, "ABCD0", MM::String, false, pAct);   SetProperty(g_Keyword_Trigger_Sequence, "ABCD0");}
开发者ID:ckc7,项目名称:micromanager2,代码行数:7,


示例24: CreateProperty

/*--------------------------------------------------------------------------- This function creates the static read only properties.---------------------------------------------------------------------------*/int Mightex_Sirius_SLC_USB::CreateStaticReadOnlyProperties(void){	int nRet = DEVICE_OK;	char serialNum[32] = "";	nRet = CreateProperty("Device Name", m_name.c_str(), MM::String, true);	if (DEVICE_OK != nRet)	return nRet;	if(devHandle >= 0)		MTUSB_LEDDriverSerialNumber(devHandle, serialNum, sizeof(serialNum));	m_serialNumber = serialNum;	nRet = CreateProperty("Serial Number", m_serialNumber.c_str(), MM::String, true);	if (DEVICE_OK != nRet)	return nRet;	return nRet;}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:19,


示例25: FindMoticCameras

/** * Intializes the hardware. * Typically we access and initialize hardware at this point. * Device properties are typically created here as well. * Required by the MM::Device API. */int MUCamSource::Initialize(){    if (!LoadFunctions())        return DEVICE_ERR;    if (initialized_)        return DEVICE_OK;    // set property list    // -----------------    FindMoticCameras();    if(cameraCnt_ == 0)    {        return ERR_NO_CAMERAS_FOUND;    }    currentCam_ = 0;//MIDP_GetCurCameraIndex();    int ret;    CPropertyAction* pAct;    if (!OpenCamera(hCameras_[currentCam_])) return DEVICE_ERR;    char sName[Camera_Name_Len];    GetMotiCamNAME(hCameras_[currentCam_], sName);    //memcpy(sName, GetMotiCamNAME(hCameras_[currentCam_]), Camera_Name_Len);    pAct = new CPropertyAction(this, &MUCamSource::OnDevice);    ret = CreateProperty(g_Keyword_Cameras, sName, MM::String, true, pAct);    ret = SetAllowedValues(g_Keyword_Cameras, DevicesVec_);    assert(ret == DEVICE_OK);        ret = InitDevice();    if(ret == DEVICE_OK)    {        initialized_ = true;    }    return ret;}
开发者ID:PI-SRau,项目名称:micro-manager,代码行数:41,


示例26: busy_

LCDA::LCDA() :      busy_(false),       minV_(0.0),       maxV_(10.0),       bitDepth_(14),      volts_(0.0),      gatedVolts_(0.0),      encoding_(0),       resolution_(8),       channel_(1),       name_(""),      gateOpen_(true){   InitializeDefaultErrorMessages();   // add custom error messages   SetErrorText(ERR_BOARD_NOT_FOUND,GS_ERR_BOARD_NOT_FOUND);   SetErrorText(ERR_UNKNOWN_POSITION, "Invalid position (state) specified");   SetErrorText(ERR_INITIALIZE_FAILED, "Initialization of the device failed");   SetErrorText(ERR_WRITE_FAILED, "Failed to write data to the device");   SetErrorText(ERR_CLOSE_FAILED, "Failed closing the device");   CPropertyAction* pAct = new CPropertyAction(this, &LCDA::OnChannel);   CreateProperty("Channel", "1", MM::Integer, false, pAct, true);   // TODO: The SDK can give us the number of channels, but only after the board is open   for (int i=1; i< 5; i++){      std::ostringstream os;      os << i;      AddAllowedValue("Channel", os.str().c_str());   }}
开发者ID:ckc7,项目名称:micromanager2,代码行数:32,



注:本文中的CreateProperty函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CreateQueue函数代码示例
C++ CreateProgram函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。