User`s guide

Creating Device Properties
6-7
// Create a property of type double with a default value
hProp = devicePropFact->createDoubleProperty("MyDoubleProp",2.5);
// Specify when the property value can be modified.
devicePropFact->setPropReadOnly(hProp,
imaqkit::imaqengine::READONLY_ALWAYS);
// Add the property to the device-specific property container.
devicePropFact->addProperty(hProp);
// Create a bounded int property with maximum and minimum values
hProp = devicePropFact->createIntProperty("MyBoundedIntProp",
0, 100, 50);
// Specify when the property value can be modified.
devicePropFact->setPropReadOnly(hProp,
imaqkit::imaqengine::READONLY_NEVER);
// Add the property to the device-specific property container.
devicePropFact->addProperty(hProp);
// Create an enumerated property
hProp = devicePropFact->createEnumProperty("MyEnumeratedProp",
"green", 1);
// Add additional enumerations
devicePropFact->addEnumValue(hProp, "blue", 2);
devicePropFact->addEnumValue(hProp, "red", 3);
// Specify when the property value can be modified.
devicePropFact->setPropReadOnly(hProp,
imaqkit::imaqengine::READONLY_WHILE_RUNNING);
// Add the property to the device-specific property container.
devicePropFact->addProperty(hProp);
2
Compile and link your adaptor to create the DLL.
3
Start the MATLAB software.
4
Create a video input object for your adaptor.
vid = videoinput('mydevice',1)
5
Use the getselectedsource function to get a handle to the video source object and
view the device-specific properties you created.
src = getselectedsource(vid);
get(vid)
General Settings:
Parent = [1x1 videoinput]
Selected = on
SourceName = input1
Tag =