Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions indi-gige/AUTHORS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Hendrik Beijeman (hbeyeman@gmail.com) http://phym.nl
Spencer E. Olson (olsonse@umich.edu)
6 changes: 3 additions & 3 deletions indi-gige/README
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Requirements

cfitsio-devel is required to compile support for FITS.

+ aravis >= v0.6
+ aravis >= v0.8

aravis is required, see https://github.com/AravisProject/aravis

Expand Down Expand Up @@ -57,9 +57,9 @@ GigE machine vision overview
(2b) Vendor specific set

Project Aravis only uses genicam standard. For some features you need to
access the CSR directly. These can easily be queried with arv-tool-0.6 that come
access the CSR directly. These can easily be queried with arv-tool-0.8 that come
with aravis, i.e.
$ arv-tool-0.6 control R[0xF0F00A00] R[0xF0F00A04] R[0xF0F00A08] R[0xF0F00A10] R[0xF0F00A14]
$ arv-tool-0.8 control R[0xF0F00A00] R[0xF0F00A04] R[0xF0F00A08] R[0xF0F00A10] R[0xF0F00A14]

Point Grey Research-16048874
R[0xf0f00a00] = 0x08000600
Expand Down
2 changes: 1 addition & 1 deletion indi-gige/indi_gige_ccd.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<devGroup group="CCDs">
<device label="GigE CCD" mdpd="true">
<driver name="GigE CCD">indi_gige_ccd</driver>
<version>0.1</version>
<version>0.2</version>
</device>
</devGroup>

62 changes: 44 additions & 18 deletions indi-gige/src/ArvFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,49 @@

#define BLACKFLY_MODEL "BFLY-PGE-31S4M"

arv::ArvCamera *ArvFactory::find_first_available(void)
namespace arv {
std::unique_ptr<arv::ArvCamera> create_camera(unsigned int index)
{
if (index >= arv_get_n_devices())
/* no devices found */
return nullptr;

const char *device_id = arv_get_device_id(index);
const char *model_name = arv_get_device_model(index);

if (memmem(model_name, strlen(model_name), BLACKFLY_MODEL, strlen(BLACKFLY_MODEL)))
{
printf("Creating BlackFly... for %s-%s\n", model_name, device_id);
return std::unique_ptr<ArvCamera>(new BlackFly(device_id, model_name));
}
else
{
printf("Creating Generic... for %s-%s\n", model_name, device_id);
return std::unique_ptr<ArvCamera>(new ArvGeneric(device_id, model_name));
}
}
}

std::unique_ptr<arv::ArvCamera> ArvFactory::find_first_available(void)
{
/* We first ensure the library knows of all available devices and info */
arv_update_device_list();
return create_camera(0);
}

ArvFactory::Iterator ArvFactory::begin(void)
{
/* We first ensure the library knows of all available devices and info */
arv_update_device_list();
return ArvFactory::Iterator(0);
}

ArvFactory::Iterator ArvFactory::end(void)
{
return ArvFactory::Iterator(arv_get_n_devices());
}

std::unique_ptr<arv::ArvCamera> ArvFactory::Index::instantiate(void) const
{
GError *error = NULL;
::ArvCamera *camera = arv_camera_new(nullptr, &error);
const char *model_name = arv_camera_get_model_name(camera, &error);

if ((camera == nullptr) || (model_name == nullptr))
return nullptr;

if (memmem(model_name, strlen(model_name), BLACKFLY_MODEL, strlen(BLACKFLY_MODEL)))
{
printf("Creating BlackFly...\n");
return new BlackFly((void *)camera);
}
else
{
printf("Creating Generic...\n");
return new ArvGeneric((void *)camera);
}
return create_camera(this->index);
}
Loading
Loading