SetDeviceInfo
Top  Previous  Next

Description

Sets the device information fields and assigns a name to the XML information file.

[C++]
int
 SetDeviceInfo(const char* manufacturer, const char* model, const char* version, const char* info, const char* serial);


Parameters
[C/C++]
 
[in] const char* manufacturer  
String specifying the manufacturer of the virtual camera device.  
 
[in] const char* model  
String specifying the model of the virtual camera device.  
 
[in] const char* version  
String specifying the version of the virtual camera device.  
 
[in] const char* info  
String specifying the manufacturer's info of the virtual camera device.  
 
[in] const char* serial  
String specifying the serial number of the virtual camera device.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_INVALIDARG  
Unsupported format  
 
 
Example
 
This line of code sets the device information fields:

m_pCamera->SetDeviceInfo("gigecam","simulator", "v.2.5", "GigE Vision Camera Emulator", "00000-01");  
 

Remarks


Use this method to assign an identity of your virtual camera device.

SetDeviceInfo has a dual purpose. It fills out the device information registers used by external GigE Vision client applications to uniquely identify each GigE Vision device found on the network. When a client application lists all connected devices, it will typically use the vendor and model name in its user interface. SetDeviceInfo also assigns a unique name to the XML information file. The XML file is created in the GigESim memory and contains the information about all the features exposed by the camera. In the example above the following name will be assigned to the XML file of the virtual camera device: "gigecam_simulator_v.1.0.xml"

When a client application connects to a GigE Vision device, it retrieves the XML file and stores it in its database. As a rule, when another connection to the same device is made, the client application will not repeat the retrieval process, but will use the copy of the XML file previously stored, unless the name of the XML file reported by the device has changed. If you implement custom features in your virtual camera application, it is very important that you call SetDeviceInfo with a different value of the version parameter each time you add a new feature or modify an existing one. If you fail to do it, the client application may continue using the stored version of the XML file which wouldn't contain an updated information about your revised feature set.

If you do not implement any custom features, the version control is not required. In this case you can use SetDeviceInfo to assign your own name to the virtual camera or may not call this method at all. By default the following fields are preset in GigESim:

Manufacturer
"A&B Software"
Model
"GigeSim"
Version
"2.5.0.0"
Info
"GigE Vision Camera Simulator"
XML file name
"A&B_GigeSim_2.5.0.0.xml"


Note that the camera must be in the disconnected state in order for this method to work.