Commit a6ed6d1a authored by Daniel Roldan's avatar Daniel Roldan

AcquisitionFrameRate features

parent 4891f4d8
......@@ -185,6 +185,14 @@ class LIBBASLER_API Camera
void setAcquisitionFrameCount(int AFC);
void getAcquisitionFrameCount(int& AFC) const;
// -- change AcquisitionFrameRateEnable
void setAcquisitionFrameRateEnable(bool AFC);
void getAcquisitionFrameRateEnable(bool& AFC) const;
// -- change acq frame count
void setAcquisitionFrameRateAbs(int AFC);
void getAcquisitionFrameRateAbs(int& AFC) const;
// -- Pylon buffers statistics
void getStatisticsTotalBufferCount(long& count);
void getStatisticsFailedBufferCount(long& count);
......
......@@ -12,24 +12,24 @@ namespace Basler
enum Status {
Ready, Exposure, Readout, Latency,
};
enum LineSource {
Off, ExposureActive, FrameTriggerWait, LineTriggerWait,
Timer1Active, Timer2Active, Timer3Active, Timer4Active, TimerActive,
UserOutput1, UserOutput2, UserOutput3, UserOutput4, UserOutput,
TriggerReady, SerialTx, AcquisitionTriggerWait, ShaftEncoderModuleOut, FrequencyConverter,
PatternGenerator1, PatternGenerator2, PatternGenerator3, PatternGenerator4,
AcquisitionTriggerReady,
};
enum TrigActivation {
RisingEdge=Basler_GigECamera::TriggerActivation_RisingEdge,
FallingEdge=Basler_GigECamera::TriggerActivation_FallingEdge,
AnyEdge=Basler_GigECamera::TriggerActivation_AnyEdge,
LevelHigh=Basler_GigECamera::TriggerActivation_LevelHigh,
LevelLow=Basler_GigECamera::TriggerActivation_LevelLow
};
enum LineSource {
Off, ExposureActive, FrameTriggerWait, LineTriggerWait,
Timer1Active, Timer2Active, Timer3Active, Timer4Active, TimerActive,
UserOutput1, UserOutput2, UserOutput3, UserOutput4, UserOutput,
TriggerReady, SerialTx, AcquisitionTriggerWait, ShaftEncoderModuleOut, FrequencyConverter,
PatternGenerator1, PatternGenerator2, PatternGenerator3, PatternGenerator4,
AcquisitionTriggerReady,
};
enum TrigActivation {
RisingEdge=Basler_GigECamera::TriggerActivation_RisingEdge,
FallingEdge=Basler_GigECamera::TriggerActivation_FallingEdge,
AnyEdge=Basler_GigECamera::TriggerActivation_AnyEdge,
LevelHigh=Basler_GigECamera::TriggerActivation_LevelHigh,
LevelLow=Basler_GigECamera::TriggerActivation_LevelLow
};
Camera(const std::string& camera_ip,int mtu_size = -1,int received_priority = 0);
~Camera();
......@@ -79,8 +79,8 @@ namespace Basler
void setFrameTransmissionDelay(int ftd);
void getFrameRate(double& frame_rate /Out/) const;
bool isBinningAvailable() const;
bool isRoiAvailable() const;
bool isBinningAvailable() const;
bool isRoiAvailable() const;
void setTimeout(int TO);
void reset();
......@@ -92,23 +92,31 @@ namespace Basler
void getStatus(Basler::Camera::Status& status /Out/);
bool isTemperatureAvailable() const;
void getTemperature(double& temperature /Out/);
void isColor(bool& color_flag /Out/) const;
void hasVideoCapability(bool& video_flag /Out/) const;
// -- change output line source
void setOutput1LineSource(Basler::Camera::LineSource);
void getOutput1LineSource(Basler::Camera::LineSource&) const;
// -- change acq frame count
void setAcquisitionFrameCount(int AFC);
void getAcquisitionFrameCount(int& AFC /Out/) const;
// -- Pylon buffers statistics
void getStatisticsTotalBufferCount(long& count);
void getStatisticsFailedBufferCount(long& count);
bool isTemperatureAvailable() const;
void getTemperature(double& temperature /Out/);
void isColor(bool& color_flag /Out/) const;
void hasVideoCapability(bool& video_flag /Out/) const;
// -- change output line source
void setOutput1LineSource(Basler::Camera::LineSource);
void getOutput1LineSource(Basler::Camera::LineSource&) const;
// -- change acq frame count
void setAcquisitionFrameCount(int AFC);
void getAcquisitionFrameCount(int& AFC /Out/) const;
// -- change AcquisitionFrameRateEnable
void setAcquisitionFrameRateEnable(bool AFC);
void getAcquisitionFrameRateEnable(bool& AFC) const;
// -- change acq frame count
void setAcquisitionFrameRateAbs(int AFC);
void getAcquisitionFrameRateAbs(int& AFC) const;
// -- Pylon buffers statistics
void getStatisticsTotalBufferCount(long& count);
void getStatisticsFailedBufferCount(long& count);
};
};
......@@ -1800,6 +1800,96 @@ void Camera::setFrameTransmissionDelay(int ftd)
}
}
//--------------------------------------------------------
//
//-----------------------------------------------------
void Camera::setAcquisitionFrameRateEnable(bool& val)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(val);
try
{
Camera_->AcquisitionFrameRateEnable.SetValue(val);
}
catch (GenICam::GenericException &e)
{
// Error handling
THROW_HW_ERROR(Error) << e.GetDescription();
}
}
//--------------------------------------------------------
//
//-----------------------------------------------------
void Camera::getAcquisitionFrameRateEnable(bool& val) const
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(val);
try
{
if (GenApi::IsAvailable(Camera_->AcquisitionFrameRateEnable))
{
val = Camera_->AcquisitionFrameRateEnable.GetValue();
}
else
{
val = false;
// THROW_HW_ERROR(Error)<<"AcquisitionFrameRateEnable Parameter is not Available !";
}
}
catch (GenICam::GenericException &e)
{
// Error handling
THROW_HW_ERROR(Error) << e.GetDescription();
}
DEB_RETURN() << DEB_VAR1(val);
}
//--------------------------------------------------------
//
//-----------------------------------------------------
void Camera::setAcquisitionFrameRateAbs(int& val)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(val);
try
{
Camera_->AcquisitionFrameRateAbs.SetValue(val);
}
catch (GenICam::GenericException &e)
{
// Error handling
THROW_HW_ERROR(Error) << e.GetDescription();
}
}
//--------------------------------------------------------
//
//-----------------------------------------------------
void Camera::getAcquisitionFrameRateAbs(int& val)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(val);
try
{
if (GenApi::IsAvailable(Camera_->AcquisitionFrameRateAbs))
{
val = Camera_->AcquisitionFrameRateAbs.GetValue();
}
else
{
val = false;
// THROW_HW_ERROR(Error)<<"AcquisitionFrameRateAbs Parameter is not Available !";
}
}
catch (GenICam::GenericException &e)
{
// Error handling
THROW_HW_ERROR(Error) << e.GetDescription();
}
DEB_RETURN() << DEB_VAR1(val);
}
//---------------------------
//- Camera::reset()
//---------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment