36 #ifndef _LibMultiSense_details_channel_hh 37 #define _LibMultiSense_details_channel_hh 54 #include <netinet/ip.h> 66 namespace multisense {
78 impl(
const std::string& address);
168 std::vector<imu::Info>& info);
170 std::vector<imu::Config>& c);
172 uint32_t samplesPerMessage,
173 const std::vector<imu::Config>& c);
176 uint32_t& bufferSize);
178 uint32_t bufferSize);
187 const uint8_t *dataP,
255 const uint8_t *dataP) {
317 typedef std::vector<utility::BufferStreamWriter*>
BufferPool;
407 int32_t attempts=DEFAULT_ACK_ATTEMPTS);
408 #if defined (_MSC_VER) 411 const double& timeout,
420 int32_t attempts=DEFAULT_ACK_ATTEMPTS);
423 template<
class T>
void publish (
const T& message);
451 uint32_t& microseconds);
467 static DWORD WINAPI
rxThread (
void *userDataP);
470 static void *
rxThread (
void *userDataP);
478 #endif // LibMultiSense_details_channel_hh
std::list< ImageListener * > m_imageListeners
static uint32_t imagerWireToApi(uint32_t h)
virtual Status setNetworkConfig(const system::NetworkConfig &c)
int64_t m_unWrappedRxSeqId
#define CRL_EXCEPTION(fmt,...)
static uint32_t hardwareWireToApi(uint32_t h)
BufferPool m_rxLargeBufferPool
virtual Status getMtu(int32_t &mtu)
virtual Status verifyBitstream(const std::string &file)
virtual Status getLocalUdpPort(uint16_t &port)
virtual Status setImuConfig(bool storeSettingsInFlash, uint32_t samplesPerMessage, const std::vector< imu::Config > &c)
double sensorToLocalTime(const double &sensorTime)
virtual Status verifyFirmware(const std::string &file)
virtual Status setTriggerSource(TriggerSource s)
virtual Status getExternalCalibration(system::ExternalCalibration &calibration)
bool assemble(uint32_t bytes, uint32_t offset, const uint8_t *dataP)
static CRL_CONSTEXPR uint32_t MAX_DIRECTED_STREAMS
virtual Status getLightingSensorStatus(lighting::SensorStatus &status)
struct sockaddr_in m_sensorAddress
virtual Status networkTimeSynchronization(bool enabled)
virtual Status removeIsolatedCallback(image::Callback callback)
UdpTracker(uint32_t t, UdpAssembler a, utility::BufferStreamWriter &s)
void(* Callback)(const Header &header, void *userDataP)
UdpAssemblerMap m_udpAssemblerMap
virtual Status setExternalCalibration(const system::ExternalCalibration &calibration)
virtual Status getLightingConfig(lighting::Config &c)
virtual Status getImageConfig(image::Config &c)
void applySensorTimeOffset(const double &offset)
wire::StatusResponse m_statusResponseMessage
virtual Status setLidarCalibration(const lidar::Calibration &c)
static wire::SourceType sourceApiToWire(DataSource mask)
std::string * frameId(M &m)
std::list< PpsListener * > m_ppsListeners
virtual Status getLargeBufferDetails(uint32_t &bufferCount, uint32_t &bufferSize)
virtual Status startDirectedStream(const DirectedStream &stream)
virtual Status setMotorSpeed(float rpm)
DepthCache< int64_t, wire::ImageMeta > m_imageMetaCache
void dispatch(utility::BufferStreamWriter &buffer)
virtual Status setMtu(int32_t mtu)
DepthCache< int64_t, UdpTracker > m_udpTrackerCache
virtual Status getDeviceStatus(system::StatusMessage &status)
utility::Thread * m_rxThreadP
uint32_t m_bytesAssembled
UdpAssembler getUdpAssembler(const uint8_t *udpDatagramP, uint32_t length)
void(* Callback)(const Header &header, void *userDataP)
virtual Status stopStreams(DataSource mask)
virtual Status getNetworkConfig(system::NetworkConfig &c)
virtual Status getSensorCalibration(image::SensorCalibration &c)
void eraseFlashRegion(uint32_t region)
virtual Status setSensorCalibration(const image::SensorCalibration &c)
std::vector< uint8_t > m_incomingBuffer
static CRL_CONSTEXPR uint32_t RX_POOL_SMALL_BUFFER_COUNT
virtual Status startDirectedStreams(const std::vector< DirectedStream > &streams)
static CRL_CONSTEXPR uint32_t RX_POOL_SMALL_BUFFER_SIZE
virtual Status addIsolatedCallback(image::Callback callback, DataSource imageSourceMask, void *userDataP)
void(* UdpAssembler)(utility::BufferStreamWriter &stream, const uint8_t *dataP, uint32_t offset, uint32_t length)
utility::Mutex m_dispatchLock
static CRL_CONSTEXPR uint32_t MAX_USER_PPS_QUEUE_SIZE
virtual Status getVersionInfo(system::VersionInfo &v)
static CRL_CONSTEXPR uint32_t IMAGE_META_CACHE_DEPTH
virtual Status getSensorVersion(VersionType &version)
static CRL_CONSTEXPR VersionType API_VERSION
static CRL_CONSTEXPR uint16_t DEFAULT_SENSOR_TX_PORT
virtual Status getImuConfig(uint32_t &samplesPerMessage, std::vector< imu::Config > &c)
uint16_t m_serverSocketPort
static CRL_CONSTEXPR uint32_t RX_POOL_LARGE_BUFFER_COUNT
virtual Status getEnabledStreams(DataSource &mask)
wire::VersionResponse m_sensorVersion
utility::BufferStreamWriter & stream()
static CRL_CONSTEXPR uint32_t MAX_USER_IMU_QUEUE_SIZE
const int64_t & unwrapSequenceId(uint16_t id)
utility::BufferStreamWriter & findFreeBuffer(uint32_t messageLength)
bool m_networkTimeSyncEnabled
static CRL_CONSTEXPR uint32_t DEFAULT_ACK_ATTEMPTS
virtual Status getImageHistogram(int64_t frameId, image::Histogram &histogram)
virtual Status setLargeBuffers(const std::vector< uint8_t * > &buffers, uint32_t bufferSize)
static uint32_t imagerApiToWire(uint32_t h)
utility::Mutex m_streamLock
static CRL_CONSTEXPR uint32_t MAX_MTU_SIZE
static CRL_CONSTEXPR uint32_t UDP_TRACKER_CACHE_DEPTH
static CRL_CONSTEXPR double DEFAULT_ACK_TIMEOUT()
virtual Status startStreams(DataSource mask)
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
void dispatchImu(imu::Header &header)
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)
void dispatchPps(pps::Header &header)
utility::Mutex m_timeLock
virtual Status getImageCalibration(image::Calibration &c)
static CRL_CONSTEXPR uint32_t RX_POOL_LARGE_BUFFER_SIZE
uint32_t m_totalBytesInMessage
BufferPool m_rxSmallBufferPool
std::list< LidarListener * > m_lidarListeners
virtual Status getImuInfo(uint32_t &maxSamplesPerMessage, std::vector< imu::Info > &info)
virtual Status maxDirectedStreams(uint32_t &maximum)
virtual Status getDeviceModes(std::vector< system::DeviceMode > &modes)
static uint32_t hardwareApiToWire(uint32_t h)
impl(const std::string &address)
virtual Status flashBitstream(const std::string &file)
void publish(const T &message)
void(* Callback)(const Header &header, void *userDataP)
static void * rxThread(void *userDataP)
virtual Status setTransmitDelay(const image::TransmitDelay &c)
void dispatchLidar(utility::BufferStream &buffer, lidar::Header &header)
std::list< ImuListener * > m_imuListeners
std::vector< utility::BufferStreamWriter * > BufferPool
static CRL_CONSTEXPR uint32_t TIME_SYNC_OFFSET_DECAY
virtual Status getLidarCalibration(lidar::Calibration &c)
virtual Status getTransmitDelay(image::TransmitDelay &c)
uint32_t m_packetsAssembled
utility::BufferStreamWriter m_stream
std::map< wire::IdType, UdpAssembler > UdpAssemblerMap
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)
static void * statusThread(void *userDataP)
virtual Status flashFirmware(const std::string &file)
DataSource m_streamsEnabled
virtual Status setLightingConfig(const lighting::Config &c)
void programOrVerifyFlashRegion(std::ifstream &file, uint32_t operation, uint32_t region)
virtual Status setImageConfig(const image::Config &c)
virtual Status getDirectedStreams(std::vector< DirectedStream > &streams)
utility::Thread * m_statusThreadP
static DataSource sourceWireToApi(wire::SourceType mask)
Status doFlashOp(const std::string &filename, uint32_t operation, uint32_t region)
virtual Status getDeviceInfo(system::DeviceInfo &info)
void(* Callback)(const Header &header, void *userDataP)
void dispatchImage(utility::BufferStream &buffer, image::Header &header)
virtual Status releaseCallbackBuffer(void *referenceP)