Thomas,
>What do you mean by "I manually instantiate the pvserver manager stuff"?
>Please mention, where
Did you look in the InitServerManager function? you can see how we manually
start up a server manager. We tell it that we are a PVBATCH (ie no connection
required from a client). All you need to do is poke around with this code and
set the application type to a CLIENT, then instantiate a connection.
Once you've done that, the proxy related stuff is all business as usual.
>The only relation to server manager classes (vtkSMProxies) I find in your code
>is in the files
try ... almost everywhere in DemoCPPipeline. Proxies are used for everything.
You must need glasses if you didn't see any of it!
(and yes SMAdapator is just there for me to copy and paste stuff from. Most of
the convenience functions in the paraview source code are in pqSMadaptor, but
make use of Qt classes which I'm not interested in).
JB
//----------------------------------------------------------------------------
int DemoCPPipeline::InitServerManager(vtkCPDataDescription* DataDescription)
{
if (this->ServerManagerInitialized) return 1;
int argc = 0;
char** argv = new char*[1];
argv[0] = new char[200];
string CWD = vtksys::SystemTools::GetCurrentWorkingDirectory();
#ifdef COPROCESSOR_WIN32_BUILD
strcpy_s(argv[0], strlen(CWD.c_str())+1, CWD.c_str());
#else
strcpy(argv[0], CWD.c_str());
#endif
// create the correct options for this process
vtkPVServerOptions* options = vtkPVServerOptions::New();
options->SetProcessType(vtkPVOptions::PVBATCH);
options->SetSymmetricMPIMode(1);
options->SetUseOffscreenRendering(OFFSCREEN_RENDER);
// Let pv built in code do all the intialization
vtkInitializationHelper::Initialize(argc, argv, options);
this->ServerManagerInitialized = 1;
//
this->ConnectionID =
vtkProcessModuleConnectionManager::GetRootServerConnectionID();
// To operate on multiblock data we must use the composite pipeline executive
vtkSmartPointer<vtkCompositeDataPipeline> exec =
vtkSmartPointer<vtkCompositeDataPipeline>::New();
vtkAlgorithm::SetDefaultExecutivePrototype(exec);
return 1;
}
-----Original Message-----
From: Thomas Kipling [mailto:[email protected]]
Sent: 16 December 2010 10:18
To: Biddiscombe, John A.; [email protected]
Subject: AW: [Paraview] low level C++ example how to communicate with pvserver
Dear John,
thank you very much for sharing the example. However, I don't see how I can
make
use of it in relation to my original question. I am not sure whether the reason
is that I am not enough familiar with the Paraview concepts or because the
actual server manager usage examples that I am looking for are left out in your
code.
>I manually instantiate the pvserver manager stuff and then access it via
>proxies (whereas you want to communicate with an existing pvserver).
>
What do you mean by "I manually instantiate the pvserver manager stuff"? Please
mention, where this takes place in your code. Can you roughly describe how
"instantiating the pvserver manager stuff" can be replaced by connecting to a
running pvserver? Because this was my actual problem.
The only relation to server manager classes (vtkSMProxies) I find in your code
is in the files SMAdaptor.h and SMAdaptor.cxx, but these are included or linked
nowhere else.
I am sure your example may give some answers to my initial question, but due to
my limited knowledge I only see a MPI VTK application without obvious
connection
to pvserver communication. Would you help with further explanations?
Regards,
Thomas
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview