Great, it's working now!!!

Thanks a lot for the patient reply.

Let me briefly tell the problem I had and what I exactly did in order to get the system working, incase it helps someone else.

The problem:
I finally found out that my source build was associating some of the required libraries from the system installed copy of player (the one installed via repositories). Hence the changes I was doing in the source code were not being reflected in the executed version of player and my interface was not being detected even though it was appearing properly in the build/libplayerinterface/player_interfaces.h file.

What I did:

To get the libraries located properly:
1) I had to uninstall the system installed binaries. (though not necessary)
2) Set the environment variable $LD_LIBRARY_PATH to the correct location of my source generated libraries. (absolutely necessary)

To write a static interface (with a C client):
1) Added the file: /libplayerinterface/interfaces/110_linefollower.def
2) Added the entry 'interfaces/110_linefollower.def' in: libplayerinterface/CMakeLists.txt
3) Added the file: client_libs/libplayerc/dev_linefollower.c
4) Added the entry 'dev_linefollower.c' in: client_libs/libplayerc/CMakeLists.txt
5) Patched the following file with the struct and the functions defined in 'client_libs/libplayerc/dev_linefollower.c': client_libs/libplayerc/playerc.h
6) Compiled and installed my source files using: make install
7) Wrote an appropriate .cfg file, driver, and a client program (as explained in [1]) and tested out the interface, which was working great.

The contents of 1, 3 and 5 are very similar to the example driver mentioned in [1].

To arrange for the C++ proxy for support to C++ clients (referred to the 'client_libs/libplayerc++/rangerproxy.cc' for guidance) :
1) Added a file: client_libs/libplayerc++/linefollowerproxy.cc
2) Added the entry 'linefollowerproxy.cc' in: client_libs/libplayerc++/CMakeLists.txt
3) Added the class defined in 'client_libs/libplayerc++/linefollowerproxy.cc' in the header file: client_libs/libplayerc++/playerc++.h
4) Compiled and installed my source files using: make install
5) Wrote an appropriate client program and tested out the interface, which was working great again.

Thanks,
Anirban.

[1] http://playerstage.sourceforge.net/doc/Player-svn/player/group__tutorial__in
terface.html

On 16 June 2011 03:46, Rich Mattes <jpgr87@gmail.com> wrote:
The interface code is generated by a python script during the build process.
If you've already done this, and then added an interface, CMake might not be
able to track that the dependencies for libplayerinterface have changed
(since they're not source files.)  You could try starting from scratch
(create a new build folder, re-run cmake) and see if your interface ends up
in build/libplayerinterface/player_interfaces.h.  You'll also have to patch
client_libs/libplayerc/playerc.h with the function prototypes for your new
interface, add your client source file to client_libs/libplayerc, and add
the filename to client_libs/libplayerc/CMakeLists.txt

As far as creating a playerc++ client, I recommend looking at
client_libs/libplayerc++/playerc++.h.  Basically, each playerc++ client
proxy is a class that inherits the ClientProxy class, and wraps the playerc
bindings to the interface in C++ class.  Once you have the playerc client
working, it's quite easy to get the c++ bindings working.

There is some wiki documentation[1] on interfaces, which is admittedly
incomplete.  There is also some information in the online documentation
tutorials[2], and of course the example plugin code.  We're working to
improve the quality, location, and detail in the documentation, but Player
maintenance is largely a volunteer effort.

Rich

[1] http://playerstage.sourceforge.net/wiki/Writing_a_Player_interface
[2]
http://playerstage.sourceforge.net/doc/Player-svn/player/group__tutorial__in
terface.html


> -----Original Message-----
> From: Anirban Basumallik [mailto:anirban.tekno@gmail.com]
> Sent: Wednesday, June 15, 2011 5:35 PM
> To: playerstage-users@lists.sourceforge.net
> Subject: Re: [Playerstage-users] Adding a static interface to Player
>
> Can the developers please give a lead into:
>
> 1) How to write a static interface for a custom device in player?
> and
> 2) How to have a plugin interface that provides support to c++ clients
> for a custom plugin interface?
>
> There are no resources all over the net, telling about this.
> Resources on the net only tell about plugin interface with support for
> 'c' clients only (which I would say is also incomplete). I have that
> working perfectly by following the instructions and making the rest out
> by myself. But just cant make out how to do the above two. I doubt, if
> anybody other than the developers can help about it. So its a request
> to the developers to give some information regarding the above or
> atleast point out resources on the net which talks about doing the
> above.
>
> Thanks,
> Anirban.
>
>
> On 15 June 2011 03:31, Anirban Basumallik <anirban.tekno@gmail.com>
> wrote:
>
>
>       Hi All,
>
>       I have written a plugin interface and its working properly. Now I
> am trying to add a static interface by the name "linefollower" in the
> Player source code.
>
>       I have done the following so far:
>
>       Added a file: libplayerinterface/interfaces/110_linefollower.def
> (and added the entry in the corresponding CMakeLists.txt)
>       Added a file: client_libs/libplayerc/dev_linefollower.c (and
> added the entry in the corresponding CMakeLists.txt)
>       Added a struct and some function names needed by the above file
> in: client_libs/libplayerc/playerc.h
>
>       The source is compiling correctly without any errors.
>       But when I'm writing a driver and a .cfg file to use this
> interface, i'm getting an error example.cfg:15 error: unknown
> interface: [linefollower]
>
>       I suppose, I am missing out on something which registers the
> interface in some table. Can anyone suggest what else I am supposed to
> do to get the interface working?
>
>       Thanks,
>       Anirban.
>



------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users