Commit 23e26a6d authored by Samuel Debionne's avatar Samuel Debionne
parents 09621d4c 17f83c4d
Pipeline #7511 passed with stages
in 6 minutes and 52 seconds
......@@ -186,6 +186,14 @@ class BASLER_EXPORT Camera
void setAcquisitionFrameCount(int AFC);
void getAcquisitionFrameCount(int& AFC) const;
// -- change AcquisitionFrameRateEnable
void setAcquisitionFrameRateEnable(bool AFRE);
void getAcquisitionFrameRateEnable(bool& AFRE) const;
// -- change acq frame count
void setAcquisitionFrameRateAbs(int AFRA);
void getAcquisitionFrameRateAbs(int& AFRA) 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 AFRE)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(AFRE);
try
{
Camera_->AcquisitionFrameRateEnable.SetValue(AFRE);
}
catch (GenICam::GenericException &e)
{
// Error handling
THROW_HW_ERROR(Error) << e.GetDescription();
}
}
//--------------------------------------------------------
//
//-----------------------------------------------------
void Camera::getAcquisitionFrameRateEnable(bool& AFRE) const
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(AFRE);
try
{
if (GenApi::IsAvailable(Camera_->AcquisitionFrameRateEnable))
{
AFRE = Camera_->AcquisitionFrameRateEnable.GetValue();
}
else
{
AFRE = 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(AFRE);
}
//--------------------------------------------------------
//
//-----------------------------------------------------
void Camera::setAcquisitionFrameRateAbs(int AFRA)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(AFRA);
try
{
Camera_->AcquisitionFrameRateAbs.SetValue(AFRA);
}
catch (GenICam::GenericException &e)
{
// Error handling
THROW_HW_ERROR(Error) << e.GetDescription();
}
}
//--------------------------------------------------------
//
//-----------------------------------------------------
void Camera::getAcquisitionFrameRateAbs(int& AFRA) const
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(AFRA);
try
{
if (GenApi::IsAvailable(Camera_->AcquisitionFrameRateAbs))
{
AFRA = Camera_->AcquisitionFrameRateAbs.GetValue();
}
else
{
AFRA = 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(AFRA);
}
//---------------------------
//- 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