98 namespace multisense {
128 }
catch (
const std::exception& e) {
149 }
catch (
const std::exception& e) {
170 }
catch (
const std::exception& e) {
191 }
catch (
const std::exception& e) {
206 std::list<ImageListener*>::iterator it;
211 if ((*it)->callback() == callback) {
218 }
catch (
const std::exception& e) {
234 std::list<LidarListener*>::iterator it;
239 if ((*it)->callback() == callback) {
246 }
catch (
const std::exception& e) {
262 std::list<PpsListener*>::iterator it;
267 if ((*it)->callback() == callback) {
274 }
catch (
const std::exception& e) {
290 std::list<ImuListener*>::iterator it;
295 if ((*it)->callback() == callback) {
302 }
catch (
const std::exception& e) {
315 if (dispatchBufferReferenceTP) {
321 }
catch (
const std::exception& e) {
345 }
catch (
const std::exception& e) {
372 CRL_DEBUG(
"no meta cached for frameId %ld",
373 static_cast<long int>(frameId));
380 const int entries = histogram.
channels * histogram.
bins;
381 const int sizeBytes = entries *
sizeof(uint32_t);
383 histogram.
data.resize(entries);
384 memcpy(&(histogram.
data[0]), metaP->histogramP, sizeBytes);
388 }
catch (
const std::exception& e) {
463 for (uint32_t index = 0 ; index < streams.size() ; ++index) {
496 std::vector<wire::DirectedStream>::const_iterator it = rsp.
streams.begin();
497 for(; it != rsp.
streams.end(); ++it)
501 (*it).fpsDecimation));
560 duty = (data.
intensity[i] * 100.0f) / 255;
593 return requestStatus;
649 void setCal(
float fx,
float fy,
float cx,
float cy,
650 float tx,
float ty,
float tz,
651 float r,
float p,
float w) {
652 m_fx = fx; m_fy = fy; m_cx = cx; m_cy = cy;
653 m_tx = tx; m_ty = ty; m_tz = tz;
654 m_roll = r; m_pitch = p; m_yaw = w;
659 ConfigAccess& a = *((ConfigAccess *) &config);
873 modes.resize(d.
modes.size());
874 for(uint32_t i=0; i<d.
modes.size(); i++) {
977 info.
pcbs.push_back(pcb);
1152 std::vector<imu::Info>& info)
1164 info.resize(w.
details.size());
1165 for(uint32_t i=0; i<w.
details.size(); i++) {
1169 info[i].name = d.
name;
1170 info[i].device = d.
device;
1171 info[i].units = d.
units;
1173 info[i].rates.resize(d.
rates.size());
1174 for(uint32_t j=0; j<d.
rates.size(); j++) {
1175 info[i].rates[j].sampleRate = d.
rates[j].sampleRate;
1176 info[i].rates[j].bandwidthCutoff = d.
rates[j].bandwidthCutoff;
1178 info[i].ranges.resize(d.
ranges.size());
1179 for(uint32_t j=0; j<d.
ranges.size(); j++) {
1180 info[i].ranges[j].range = d.
ranges[j].range;
1181 info[i].ranges[j].resolution = d.
ranges[j].resolution;
1192 std::vector<imu::Config>& c)
1205 for(uint32_t i=0; i<w.
configs.size(); i++) {
1206 c[i].name = w.
configs[i].name;
1208 c[i].rateTableIndex = w.
configs[i].rateTableIndex;
1209 c[i].rangeTableIndex = w.
configs[i].rangeTableIndex;
1219 uint32_t samplesPerMessage,
1220 const std::vector<imu::Config>& c)
1230 for(uint32_t i=0; i<c.size(); i++) {
1231 w.
configs[i].name = c[i].name;
1233 w.
configs[i].rateTableIndex = c[i].rateTableIndex;
1234 w.
configs[i].rangeTableIndex = c[i].rangeTableIndex;
1244 uint32_t& bufferSize)
1256 uint32_t bufferSize)
1259 CRL_DEBUG(
"WARNING: supplying less than recommended number of large buffers: %ld/%ld\n",
1260 static_cast<long int>(buffers.size()),
1263 CRL_DEBUG(
"WARNING: supplying smaller than recommended large buffers: %ld/%ld bytes\n",
1264 static_cast<long int>(bufferSize),
1275 BufferPool::const_iterator it;
1283 for(uint32_t i=0; i<buffers.size(); i++)
1286 }
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)
std::vector< PcbInfo > pcbs
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)
CRL_THREAD_LOCAL utility::BufferStream * dispatchBufferReferenceTP
float ambientLightPercentage
virtual Status verifyFirmware(const std::string &file)
virtual Status setTriggerSource(TriggerSource s)
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)
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
virtual Status setExternalCalibration(const system::ExternalCalibration &calibration)
virtual Status getLightingConfig(lighting::Config &c)
virtual Status getImageConfig(image::Config &c)
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
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)
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
float stereoPostFilterStrength() const
virtual Status stopStreams(DataSource mask)
uint32_t autoExposureMax() const
virtual Status getNetworkConfig(system::NetworkConfig &c)
uint32_t autoWhiteBalanceDecay() const
virtual Status getSensorCalibration(image::SensorCalibration &c)
float stereoPostFilterStrength
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
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
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
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 uint32_t SOURCE_INTERNAL
uint32_t autoExposureDecay
static CRL_CONSTEXPR uint32_t STATUS_EXTERNAL_LED_OK
static uint32_t imagerApiToWire(uint32_t h)
utility::Mutex m_streamLock
utility::TimeStamp uptime
float laserToSpindle[4][4]
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
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)
uint32_t hardwareRevision
float rightImagerTemperature
float autoWhiteBalanceThresh
virtual Status flashBitstream(const std::string &file)
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)
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
static CRL_CONSTEXPR uint8_t MAX_PCBS
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