Multiple magellan clients, and timing data.

Post questions, comments and feedback to our 3Dconnexion UNIX and Linux Development Team.

Moderator: Moderators

Post Reply
Posts: 15
Joined: Sat Jun 16, 2007 6:24 am
Location: Greece

Multiple magellan clients, and timing data.

Post by nuclear » Wed Jun 27, 2007 4:27 pm

Hello everyone.
During this past week, I created a free 3dxsrv replacement driver (daemon), and I'm in the process of ironing out a few quirks and fixing some bugs before I release it to the public. However, during my inability to run the official proprietary 3dxsrv (it crashes), I don't have enough information to figure out all the details, and I'd like to ask some questions.

1) when motion events occur, the daemon apparently transmits some sort of "time interval" value to the clients, through the X ClientMessage data array. I figured that this interval must be from the last motion event, and the most logical thing would be to have it in milliseconds. However the use of this information by the magellan library is not consistent which makes me question the correctness of that assertion.

Apparently, the magellan API provides two different functions that can potentially handle the ClientMessage events: MagellanInputEvent (which uses a MagellanIntEvent, and multiplies the timing value by 1000 then divides by 60), and the MagellanTranslateEvent (which uses a MagellanFloatEvent, and passes the timing value unprocessed).

Why this discrepancy? why are there two functions doing the same thing? and what is the daemon supposed to send anyway?

2) As I said I can't actually run 3dxsrv, and thus I can't figure the following out by myself. Is the daemon supposed to handle multiple magellan clients or not? From an observation of the magellan library and its interactions with the server, I would say that the whole thing was designed to work with only one client. The only "problem" that I detected in supporting multiple clients is that the SetSensitivity client message, which is supposed to give a multiplication factor to the daemon to scale the axis values before passing them to the client, does not contain any indication of which client actually sends it.

My daemon works quite happily with multiple clients, except that due to that fact I'm unable to keep per-client sensitivity factors. Is there any piece of information that I missed, and identifies the client that sends this message?

Thanks, and sorry for the rather long post.

P.S. I also prepared a specification of the magellan library and its "communication protocol" with the daemon, in order to give it to someone who hasn't seen the magellan library code, and is willing to help me produce a cleanroom free-sw implementation. If anyone is interested, or just willing to take a look at the spec and point out any mistakes, I'd appreciate it:

Post Reply