Need to get a valid controller for client-server communication


(Patrick) #1

Hello again,
as I wrote yesterday, I am trying to communicate between a server side object and its client proxy.

I want to simplify my question: How do I get a valid controller on the client that is responsible for client-server communication?
I tried the following:
vtkMultiProcessController *ctrl=vtkProcessModule::GetProcessModule()->GetGlobalController();
But the result is always ctrl==NULL, be it a builtin session, a connection to a remote server, sequential or MPI run.

How do I get a valid controller? The controller is needed to react to RMI requests.
Thanks


(Mathieu Westphal) #2

(I’ve moved the topic to development)

Are you connected to a server ? in this case this should work :
vtkMultiProcessController* globalController = vtkMultiProcessController::GetGlobalController();


(Patrick) #3

Thank you, Mathieu,
both your solution
vtkMultiProcessController::GetGlobalController()
and what I tried before:
vtkProcessModule::GetProcessModule()->GetGlobalController()
seem to work. I have no idea, what was wrong with my setup before, when I got NULL pointers. Sorry for that.