114 std::chrono::milliseconds td(1);
122 MetaInfoSizeBasePtr info = tmpSharedMemoryProvider->getMetaInfo();
124 long oldTimestamp = info ? info->timeProvided : 0;
129 MetaInfoSizeBasePtr info = tmpSharedMemoryProvider->getMetaInfo();
132 if (!info || info->timeProvided == oldTimestamp)
135 <<
"The image provider did not set a timestamp - measuring "
136 "the timestamp now. The ImageProvider implementation "
137 "should call updateTimestamp()!";
142 image_timestamp = IceUtil::Time::microSeconds(info->timeProvided);
158 new Variant(std::to_string(dimension.width) +
"x" +
159 std::to_string(dimension.height)));
164 std::this_thread::sleep_for(td);
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
Property< PropertyType > getProperty(const std::string &name)
std::string getName() const
Retrieve name of object.
void setMetaInfo(const std::string &id, const VariantBasePtr &value)
Allows to set meta information that can be queried live via Ice interface on the ArmarXManager.
bool hasProperty(const std::string &name)
static IceUtil::Time GetTime(TimeMode timeMode=TimeMode::VirtualTime)
Get the current time.
The Variant class is described here: Variants.
virtual void onStopCapture()=0
This is called when the image provider capturing has been stopped.
virtual void onStartCapturingImageProvider()
This is called when the Component::onConnectComponent() setup is called.
ImageSyncMode getImageSyncMode()
Returns the image sync mode.
virtual void onInitCapturingImageProvider()=0
This is called when the Component::onInitComponent() is called.
virtual bool capture(void **ppImageBuffers)=0
Main capturing function.
float frameRate
Required frame rate.
void stopCapture(const Ice::Current &c=Ice::emptyCurrent) override
Stops image capturing.
void startCapture(float framesPerSecond, const Ice::Current &c=Ice::emptyCurrent) override
Starts image capturing.
void onConnectImageProvider() override
void setImageSyncMode(ImageSyncMode imageSyncMode)
Sets the image synchronization mode.
FPSCounter fpsCounter
FPS manager.
virtual void onExitCapturingImageProvider()=0
This is called when the Component::onExitComponent() setup is called.
void onInitImageProvider() override
virtual void onStartCapture(float framesPerSecond)=0
This is called when the image provider capturing has been started.
void onExitImageProvider() override
armarx::RunningTask< CapturingImageProvider >::pointer_type captureTask
Capture thread.
std::mutex captureMutex
mutex for capturing for proper exit
ImageSyncMode imageSyncMode
Image synchronization information.
bool captureEnabled
Indicates that capturing is enabled and running.
void recordImages(const IceUtil::Time &image_timestamp)
bool isExiting()
Retrieve whether provider is exiting.
armarx::IceSharedMemoryProvider< unsignedchar >::pointer_type sharedMemoryProvider
shared memory provider
void updateTimestamp(Ice::Long timestamp, bool threadSafe=true)
Updates the timestamp of the currently captured image.
ImageFormatInfo getImageFormat(const Ice::Current &c=Ice::emptyCurrent) override
Returns the entire image format info struct via Ice.
void ** imageBuffers
Image buffer memory.
ImageProcessorInterfacePrx imageProcessorProxy
Ice proxy of the image processor interface.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_INFO
The normal logging level.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
This file offers overloads of toIce() and fromIce() functions for STL container types.