~kamalmostafa/ubuntu/lucid/pdp/fix-504941-ftbfs

« back to all changes in this revision

Viewing changes to modules/README

  • Committer: Bazaar Package Importer
  • Author(s): Guenter Geiger (Debian/GNU)
  • Date: 2005-03-15 22:21:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050315222105-1q287rsihmd9j1tb
Tags: 1:0.12.4-2
* fixed the hardcoded depends
* added 3dp library

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
This file describes the protocol used for communicating packets.
2
 
See include/pdp.h and the sources in this directory for more info.
3
 
 
4
 
There are 3 kinds of pdp messages:
5
 
 
6
 
[pdp register_ro <packet_id>]
7
 
[pdp register_rw <packet_id>]
8
 
[pdp process]
9
 
 
10
 
Together they form the pdp protocol. An object can receive a packet 
11
 
by catching the 3 kinds of messages:
12
 
 
13
 
When a register_ro message is received, the object can call 
14
 
pdp_packet_copy_ro(packet) to reserve a read only copy for itself.
15
 
 
16
 
The same goes for handling the register_rw message. You can
17
 
reserve a read/write copy by using pdp_packet_copy_rw(packet)
18
 
 
19
 
When a process message is received, the object is allowed to start
20
 
processing the packet data end send the resulting packet(s) out.
21
 
 
22
 
To send out a packet, use the pdp_packet_pass_if_valid(outlet, &packet)
23
 
method. It passes a packet, and sets the reference to -1 (the undefined
24
 
packet id).
25
 
 
26
 
 
27
 
If you want to write pdp externs, consider using the pdp_base object
28
 
to derive your object from. Have a look at pdp_add, pdp_gain, pdp_noise
29
 
to see how to do this.
30