102 namespace multisense {
132 }
catch (
const std::exception& e) {
153 }
catch (
const std::exception& e) {
174 }
catch (
const std::exception& e) {
195 }
catch (
const std::exception& e) {
210 std::list<ImageListener*>::iterator it;
215 if ((*it)->callback() == callback) {
222 }
catch (
const std::exception& e) {
238 std::list<LidarListener*>::iterator it;
243 if ((*it)->callback() == callback) {
250 }
catch (
const std::exception& e) {
266 std::list<PpsListener*>::iterator it;
271 if ((*it)->callback() == callback) {
278 }
catch (
const std::exception& e) {
294 std::list<ImuListener*>::iterator it;
299 if ((*it)->callback() == callback) {
306 }
catch (
const std::exception& e) {
319 if (dispatchBufferReferenceTP) {
325 }
catch (
const std::exception& e) {
349 }
catch (
const std::exception& e) {
376 CRL_DEBUG(
"no meta cached for frameId %ld",
377 static_cast<long int>(frameId));
384 const int entries = histogram.
channels * histogram.
bins;
385 const int sizeBytes = entries *
sizeof(uint32_t);
387 histogram.
data.resize(entries);
388 memcpy(&(histogram.
data[0]), metaP->histogramP, sizeBytes);
393 catch (
const std::exception& e) {
413 CRL_DEBUG(
"no meta cached for frameId %ld",
414 static_cast<long int>(frameId));
423 catch (
const std::exception& e) {
451 cmd.
enable = enabled ? 1 : 0;
519 for (uint32_t index = 0 ; index < streams.size() ; ++index) {
552 std::vector<wire::DirectedStream>::const_iterator it = rsp.
streams.begin();
553 for(; it != rsp.
streams.end(); ++it)
557 (*it).fpsDecimation));
626 duty = (data.
intensity[i] * 100.0f) / 255;
659 return requestStatus;
715 void setCal(
float fx,
float fy,
float cx,
float cy,
716 float tx,
float ty,
float tz,
717 float r,
float p,
float w) {
718 m_fx = fx; m_fy = fy; m_cx = cx; m_cy = cy;
719 m_tx = tx; m_ty = ty; m_tz = tz;
720 m_roll = r; m_pitch = p; m_yaw = w;
725 ConfigAccess& a = *((ConfigAccess *) &config);
758 a.setCameraProfile(static_cast<CameraProfile>(d.
cameraProfile));
964 modes.resize(d.
modes.size());
965 for(uint32_t i=0; i<d.
modes.size(); i++) {
1079 info.
pcbs.push_back(pcb);
1252 std::vector<imu::Info>& info)
1264 info.resize(w.
details.size());
1265 for(uint32_t i=0; i<w.
details.size(); i++) {
1269 info[i].name = d.
name;
1270 info[i].device = d.
device;
1271 info[i].units = d.
units;
1273 info[i].rates.resize(d.
rates.size());
1274 for(uint32_t j=0; j<d.
rates.size(); j++) {
1275 info[i].rates[j].sampleRate = d.
rates[j].sampleRate;
1276 info[i].rates[j].bandwidthCutoff = d.
rates[j].bandwidthCutoff;
1278 info[i].ranges.resize(d.
ranges.size());
1279 for(uint32_t j=0; j<d.
ranges.size(); j++) {
1280 info[i].ranges[j].range = d.
ranges[j].range;
1281 info[i].ranges[j].resolution = d.
ranges[j].resolution;
1292 std::vector<imu::Config>& c)
1305 for(uint32_t i=0; i<w.
configs.size(); i++) {
1306 c[i].name = w.
configs[i].name;
1308 c[i].rateTableIndex = w.
configs[i].rateTableIndex;
1309 c[i].rangeTableIndex = w.
configs[i].rangeTableIndex;
1319 uint32_t samplesPerMessage,
1320 const std::vector<imu::Config>& c)
1330 for(uint32_t i=0; i<c.size(); i++) {
1331 w.
configs[i].name = c[i].name;
1333 w.
configs[i].rateTableIndex = c[i].rateTableIndex;
1334 w.
configs[i].rangeTableIndex = c[i].rangeTableIndex;
1344 uint32_t& bufferSize)
1356 uint32_t bufferSize)
1359 CRL_DEBUG(
"WARNING: supplying less than recommended number of large buffers: %ld/%ld\n",
1360 static_cast<long int>(buffers.size()),
1363 CRL_DEBUG(
"WARNING: supplying smaller than recommended large buffers: %ld/%ld bytes\n",
1364 static_cast<long int>(bufferSize),
1375 BufferPool::const_iterator it;
1383 for(uint32_t i=0; i<buffers.size(); i++)
1386 }
catch (
const std::exception& e) {
std::list< ImageListener * > m_imageListeners
static uint32_t imagerWireToApi(uint32_t h)
virtual Status setNetworkConfig(const system::NetworkConfig &c)
static CRL_CONSTEXPR uint32_t OP_PROGRAM
Listener< image::Header, image::Callback > ImageListener
static uint32_t hardwareWireToApi(uint32_t h)
#define CRL_DEBUG_RAW(fmt)
std::vector< PcbInfo > pcbs
virtual Status getPtpStatus(int64_t frameId, system::PtpStatus &ptpStatus)
BufferPool m_rxLargeBufferPool
virtual Status getMtu(int32_t &mtu)
std::string firmwareBuildDate
virtual Status verifyBitstream(const std::string &file)
virtual Status getLocalUdpPort(uint16_t &port)
static CRL_CONSTEXPR uint32_t SOURCE_EXTERNAL
virtual Status setImuConfig(bool storeSettingsInFlash, uint32_t samplesPerMessage, const std::vector< imu::Config > &c)
uint16_t autoExposureRoiX
CRL_THREAD_LOCAL utility::BufferStream * dispatchBufferReferenceTP
float ambientLightPercentage
virtual Status verifyFirmware(const std::string &file)
virtual Status setTriggerSource(TriggerSource s)
virtual Status getMotorPos(int32_t &mtu)
Listener< pps::Header, pps::Callback > PpsListener
float stereoPostFilterStrength
virtual Status getExternalCalibration(system::ExternalCalibration &calibration)
static CRL_CONSTEXPR TriggerSource Trigger_Internal
static CRL_CONSTEXPR uint32_t MAX_DIRECTED_STREAMS
virtual Status getLightingSensorStatus(lighting::SensorStatus &status)
static CRL_CONSTEXPR TriggerSource Trigger_PTP
virtual Status networkTimeSynchronization(bool enabled)
uint8_t intensity[lighting::MAX_LIGHTS]
virtual Status removeIsolatedCallback(image::Callback callback)
bool autoWhiteBalance() const
void(* Callback)(const Header &header, void *userDataP)
uint64_t sensorHardwareMagic
uint8_t storeSettingsInFlash
CameraProfile cameraProfile() const
virtual Status ptpTimeSynchronization(bool enabled)
virtual Status setExternalCalibration(const system::ExternalCalibration &calibration)
virtual Status getLightingConfig(lighting::Config &c)
virtual Status getImageConfig(image::Config &c)
static CRL_CONSTEXPR uint32_t SOURCE_EXTERNAL_INVERTED
float getDutyCycle(uint32_t i) const
VersionType firmwareVersion
float cameraToSpindleFixed[4][4]
uint32_t samplesPerMessage
static CRL_CONSTEXPR TriggerSource Trigger_External
wire::StatusResponse m_statusResponseMessage
static CRL_CONSTEXPR uint32_t SOURCE_PTP
virtual Status setLidarCalibration(const lidar::Calibration &c)
static wire::SourceType sourceApiToWire(DataSource mask)
static CRL_CONSTEXPR uint32_t STATUS_LASER_OK
std::list< PpsListener * > m_ppsListeners
static CRL_CONSTEXPR uint32_t CMD_START
virtual Status getLargeBufferDetails(uint32_t &bufferCount, uint32_t &bufferSize)
uint16_t autoExposureRoiX() const
uint16_t autoExposureRoiWidth
float whiteBalanceBlue() const
uint32_t disparities() const
virtual Status startDirectedStream(const DirectedStream &stream)
virtual Status setMotorSpeed(float rpm)
DepthCache< int64_t, wire::ImageMeta > m_imageMetaCache
std::string sensorFirmwareBuildDate
static CRL_CONSTEXPR Status Status_Failed
bool setDutyCycle(float percent)
virtual Status setMtu(int32_t mtu)
std::vector< imu::Config > configs
virtual Status getDeviceStatus(system::StatusMessage &status)
void(* Callback)(const Header &header, void *userDataP)
uint32_t supportedDataSources
float powerSupplyTemperature
uint16_t autoExposureRoiHeight() const
float stereoPostFilterStrength() const
virtual Status stopStreams(DataSource mask)
uint32_t autoExposureMax() const
virtual Status getNetworkConfig(system::NetworkConfig &c)
bool m_ptpTimeSyncEnabled
uint32_t autoWhiteBalanceDecay() const
virtual Status getSensorCalibration(image::SensorCalibration &c)
float stereoPostFilterStrength
uint16_t autoExposureRoiX
virtual Status setSensorCalibration(const image::SensorCalibration &c)
void enable(SourceType mask)
uint32_t maxSamplesPerMessage
float laserToSpindle[4][4]
std::vector< uint32_t > data
virtual Status startDirectedStreams(const std::vector< DirectedStream > &streams)
float autoExposureThresh() const
uint16_t autoExposureRoiY
static CRL_CONSTEXPR uint32_t RGN_FIRMWARE
virtual Status addIsolatedCallback(image::Callback callback, DataSource imageSourceMask, void *userDataP)
static CRL_CONSTEXPR uint32_t STATUS_CAMERAS_OK
float autoWhiteBalanceThresh
utility::Mutex m_dispatchLock
static CRL_CONSTEXPR uint32_t CMD_STOP
static CRL_CONSTEXPR uint32_t MAX_USER_PPS_QUEUE_SIZE
float leftImagerTemperature
virtual Status getVersionInfo(system::VersionInfo &v)
#define CPY_ARRAY_2(d_, s_, n_, m_)
virtual Status getSensorVersion(VersionType &version)
static CRL_CONSTEXPR uint32_t OP_VERIFY
DATA * find_nolock(KEY key)
static CRL_CONSTEXPR VersionType API_VERSION
uint16_t autoExposureRoiY
void setFlash(bool onOff)
std::vector< DeviceMode > modes
virtual Status getImuConfig(uint32_t &samplesPerMessage, std::vector< imu::Config > &c)
uint32_t hardwareRevision
static CRL_CONSTEXPR uint32_t FLAGS_ENABLED
bool autoExposure() const
Type boundValue(Type const &value, Type const &minimum, Type const &maximum)
uint16_t m_serverSocketPort
uint16_t autoExposureRoiY() const
static CRL_CONSTEXPR uint32_t RX_POOL_LARGE_BUFFER_COUNT
static CRL_CONSTEXPR Status Status_Ok
bool processingPipelineOk
virtual Status getEnabledStreams(DataSource &mask)
wire::VersionResponse m_sensorVersion
static CRL_CONSTEXPR uint32_t MAX_USER_IMU_QUEUE_SIZE
uint32_t autoWhiteBalanceDecay
bool m_networkTimeSyncEnabled
virtual Status getImageHistogram(int64_t frameId, image::Histogram &histogram)
virtual Status setLargeBuffers(const std::vector< uint8_t * > &buffers, uint32_t bufferSize)
static CRL_CONSTEXPR TriggerSource Trigger_External_Inverted
static CRL_CONSTEXPR uint32_t SOURCE_INTERNAL
uint32_t autoExposureDecay
static CRL_CONSTEXPR uint32_t STATUS_EXTERNAL_LED_OK
static uint32_t imagerApiToWire(uint32_t h)
bool storeSettingsInFlash
utility::Mutex m_streamLock
utility::TimeStamp uptime
float laserToSpindle[4][4]
uint16_t autoExposureRoiWidth() const
float whiteBalanceRed() const
uint32_t autoExposureDecay() const
virtual Status startStreams(DataSource mask)
Listener< lidar::Header, lidar::Callback > LidarListener
uint32_t exposure() const
VersionType sensorFirmwareVersion
virtual Status setDeviceInfo(const std::string &key, const system::DeviceInfo &i)
virtual void * reserveCallbackBuffer()
virtual Status getApiVersion(VersionType &version)
virtual Status setImageCalibration(const image::Calibration &c)
static CRL_CONSTEXPR uint32_t MAX_USER_LASER_QUEUE_SIZE
std::vector< RangeType > ranges
#define CPY_ARRAY_1(d_, s_, n_)
static CRL_CONSTEXPR uint32_t STATUS_LASER_MOTOR_OK
Status waitAck(const T &msg, wire::IdType id=MSG_ID(T::ID), const double &timeout=DEFAULT_ACK_TIMEOUT(), int32_t attempts=DEFAULT_ACK_ATTEMPTS)
virtual Status stopDirectedStream(const DirectedStream &stream)
float cameraToSpindleFixed[4][4]
#define CRL_DEBUG(fmt,...)
static CRL_CONSTEXPR uint32_t STATUS_PIPELINE_OK
uint16_t autoExposureRoiHeight
float nominalRelativeAperture
virtual Status getImageCalibration(image::Calibration &c)
static CRL_CONSTEXPR uint32_t RX_POOL_LARGE_BUFFER_SIZE
std::list< LidarListener * > m_lidarListeners
virtual Status getImuInfo(uint32_t &maxSamplesPerMessage, std::vector< imu::Info > &info)
virtual Status maxDirectedStreams(uint32_t &maximum)
uint32_t autoWhiteBalanceDecay
static CRL_CONSTEXPR uint32_t MAX_LIGHTS
Listener< imu::Header, imu::Callback > ImuListener
virtual Status getDeviceModes(std::vector< system::DeviceMode > &modes)
static uint32_t hardwareApiToWire(uint32_t h)
uint16_t autoExposureRoiHeight
uint32_t hardwareRevision
float rightImagerTemperature
float autoWhiteBalanceThresh
virtual Status flashBitstream(const std::string &file)
uint16_t autoExposureRoiWidth
void(* Callback)(const Header &header, void *userDataP)
virtual Status setTransmitDelay(const image::TransmitDelay &c)
std::list< ImuListener * > m_imuListeners
static CRL_CONSTEXPR Status Status_Exception
std::vector< wire::DirectedStream > streams
virtual Status getLidarCalibration(lidar::Calibration &c)
virtual Status getTransmitDelay(image::TransmitDelay &c)
static CRL_CONSTEXPR uint32_t MAX_USER_IMAGE_QUEUE_SIZE
Status waitData(const T &command, U &data, const double &timeout=DEFAULT_ACK_TIMEOUT(), int32_t attempts=DEFAULT_ACK_ATTEMPTS)
bool storeSettingsInFlash() const
virtual Status flashFirmware(const std::string &file)
DataSource m_streamsEnabled
static CRL_CONSTEXPR Status Status_Error
uint64_t sensorHardwareVersion
void disable(SourceType mask)
std::vector< RateType > rates
uint8_t intensity[lighting::MAX_LIGHTS]
static CRL_CONSTEXPR uint32_t RGN_BITSTREAM
virtual Status setLightingConfig(const lighting::Config &c)
std::vector< imu::Details > details
float ambientLightPercentage
static CRL_CONSTEXPR uint32_t STATUS_GENERAL_OK
DataSource supportedDataSources
float autoWhiteBalanceThresh() const
virtual Status setImageConfig(const image::Config &c)
virtual Status getDirectedStreams(std::vector< DirectedStream > &streams)
static DataSource sourceWireToApi(wire::SourceType mask)
Status doFlashOp(const std::string &filename, uint32_t operation, uint32_t region)
virtual Status getDeviceInfo(system::DeviceInfo &info)
static CRL_CONSTEXPR uint32_t STATUS_IMU_OK
void(* Callback)(const Header &header, void *userDataP)
uint32_t autoExposureDecay
virtual Status releaseCallbackBuffer(void *referenceP)
float nominalRelativeAperture