您的浏览器与网页部分内容不兼容,请及时更新。 点击此处了解如何更新浏览器。

OK
网上商店

How can I feed generic-style parameter access into native-style parameter access?

In some cases a camera feature might be very new and not yet included into the interface-specific headers used for native-style programming in pylon. This can be the case for custom cameras for example.

In these cases it is always possible to use the feature using generic-style parameter access. You need to know the name and the type of the parameters you want to access. Generic-style parameter access is documented in the programmer's guide and in the ParametrizeCamera_GenericParameterAccess C++ sample, but here are some quick examples:

// your native style code

// A new enum entry Line3FallingEdge has been added to
// an enumeration type parameter, you can use the FromString
// method in such case
camera.EventSelector.FromString("Line3FallingEdge");
camera.EventNotification.SetValue(EventNotification_GenICamEvent);

// A new enumeration type has been added to the camera
GenApi::CEnumerationPtr (camera.GetNodeMap().GetNode("NewEnumFeatureName"))->FromString("NewEnumItemName");

// A new integer type has been added to the
// camera, for other types you can use CBooleanPtr,
// CStringPtr, CFloatPtr etc.
GenApi::CIntegerPtr (camera.GetNodeMap().GetNode("NewIntegerFeatureName"))->SetValue(23);

// your native style code

// if you access a parameter often, you can create an
// instance of one of the GenApi Ptr classes
GenApi::INodeMap& nodeMap = camera.GetNodeMap();
GenApi::CIntegerPtr newIntegerFeature(nodeMap.GetNode("NewIntegerFeatureName"));

// use the parameter
newIntegerFeature ->SetValue(23);

我们很乐意为您提供协助

销售咨询
支持服务
中国区代理商
定制相机