OVP et type

Making & changing box plugins and external apps
Post Reply
matthieuG
Posts: 54
Joined: Thu Nov 12, 2009 10:22 am
Location: grenoble

OVP et type

Post by matthieuG »

I am building a box which write in a socket (like
acquisition client box). The box has an encoder with four inputs and concatenate them in BufferMemory to send in the socket.
However, I have got a problem, which seems to be on type, my handlers can't be filled :
This expression :

Code: Select all

ip_pExperimentInformationMemoryBuffer=l_rDynamicBoxContext.getInputChunk(0,0);
give me a compilation failure.

The message is :
.../ovpCBoxAlgorithmExpressionClient.cpp(106) : error C2679: '=' binaire :
aucun opérateur trouvé qui accepte un opérande de partie droite de type
'const OpenViBE::IMemoryBuffer *' (ou il n'existe pas de conversion
acceptable)
c:\work\sources-t\openvibe\trunc\include\openvibe\kernel/ovTParameterHandler.h(195):
peut être 'OpenViBE::Kernel::TParameterHandler<T>
&OpenViBE::Kernel::TParameterHandler<T>::operator =(const T &)'
with [ T=OpenViBE::IMemoryBuffer * ]
c:\work\sources-t\openvibe\trunc\include\openvibe\kernel/ovTParameterHandler.h(254):
ou 'OpenViBE::Kernel::TParameterHandler<T>
&OpenViBE::Kernel::TParameterHandler<T>::operator =(const
OpenViBE::Kernel::TParameterHandler<T> &)'
with [ T=OpenViBE::IMemoryBuffer * ]
lors de la tentative de mise en correspondance de la liste des
arguments
'(OpenViBE::Kernel::TParameterHandler<T>, const OpenViBE::IMemoryBuffer *)'
with [ T=OpenViBE::IMemoryBuffer * ]
ip_pExperimentInformationMemoryBuffer is defined as

Code: Select all

OpenViBE::Kernel::TParameterHandler < OpenViBE::IMemoryBuffer* > 
and is initialised with :

Code: Select all

ip_pExperimentInformationMemoryBuffer.initialize(m_pAcquisitionStreamEncoder->getInputParameter(OVP_GD_Algorithm_AcquisitionStreamEncoder_InputParameterId_ExperimentInformationStream));
Type of
OVP_GD_Algorithm_AcquisitionStreamEncoder_InputParameterId_ExperimentInformationStream
is probably false.
Is my reasoning right? If yes, where to check type of identifier OVP_...?
Else, what is wrong?
I give the whole code to read better.
Attachments
ovpCBoxAlgorithmExpressionClient.h
(3.87 KiB) Downloaded 263 times
ovpCBoxAlgorithmExpressionClient.cpp
(4.71 KiB) Downloaded 240 times
Last edited by matthieuG on Fri Jan 08, 2010 4:18 pm, edited 1 time in total.

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: OVP et type

Post by yrenard »

Dear matthieuG,

please post your message in English so everyone can understand the conversation.

Yann

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: OVP et type

Post by yrenard »

Dear matthieuG,

the l_rDynamicBoxContext.getInputChunk(0,0); returns a const pointer. You can't store such pointer in a OpenViBE::Kernel::TParameterHandler < OpenViBE::IMemoryBuffer* > object because this object handles non-const pointers. You should declare your parameter handler as follows :

Code: Select all

OpenViBE::Kernel::TParameterHandler < const OpenViBE::IMemoryBuffer* > ip_pExperimentInformationMemoryBuffer;
Everything will run fine from there.

Hope this helps,
Yann

matthieuG
Posts: 54
Joined: Thu Nov 12, 2009 10:22 am
Location: grenoble

Re: OVP et type

Post by matthieuG »

thanks, It compile well!

Post Reply