Next: A.1 Debug Information
Up: player
Previous: Bibliography
Contents
A. The C Client Interface
Included with Player is a simple, no-frills client interface library
written in ANSI C (client_libs/c). This client is
intentionally primitive and most users
will find it inconvenient for writing anything more that the simplest
control program. Rather than direct use, the C client should be considered
the reference implementation of a Player client library and should be
consulted for networking details when writing new clients in other
languages (the C client can also be used directly as a low-level substrate
for other clients; the C++ client is implemented in this way).
In the file playercclient.c are defined the 5
device-neutral functions necessary in any client:
- player_connect() : connect to the server
- player_disconnect() : disconnect from the server
- player_read() : read one data packet from the server
- player_write() : write one command packet to the server
- player_request() : send a request packet and wait for the reply
In addition, the very useful helper function
player_request_device_access() (a special case of
player_request() that obtains access to devices) is defined.
In the files print.c and helpers.c are defined some
device-specific functions that simplify direct use of the C client; we do
not document them here.
Subsections
Next: A.1 Debug Information
Up: player
Previous: Bibliography
Contents
2004-06-02