1PKMESG(3PVM)                    PVM Version 3.4                   PKMESG(3PVM)
2
3
4

NAME

6       pvm_pkmesg, pvm_pkmesgbody, pvm_upkmesg - Pack messages into other mes‐
7       sages.
8
9

SYNOPSIS

11       C    int info = pvm_pkmesg( int bufid )
12            int info = pvm_pkmesgbody( int bufid )
13            int newbufid = pvm_upkmesg( )
14
15       Fortran   call pvmfpkmesg( bufid, info )
16            call pvmfpkmesgbody( bufid, info )
17            call pvmfupkmesg( bufid, newbufid )
18
19

PARAMETERS

21       bufid     Message buffer to pack.
22
23       newbufid  New message buffer unpacked or result code.
24
25       info      Result code.
26
27

DESCRIPTION

29       These functions are used to include messages in other messages, as data
30       elements.
31
32       pvm_pkmesg  packs  the  specified message into the current send buffer.
33       The entire body of the message is packed, along with header attributes:
34            length
35            context tag
36            message tag
37            wait identifier
38            encoding
39            checksum
40            source and destination addresses
41       The buffer specified must not be the same as the current  send  buffer.
42       Multiple  messages can be packed into a single message, and packed mes‐
43       sages can be mixed with any other data types.
44
45       pvm_upkmesg unpacks a message from the current receive buffer, allocat‐
46       ing  a  new  message buffer for it.  The body of the newly created mes‐
47       sage, and header attributes listed  above,  match  the  one  originally
48       packed using pvm_pkmesg.
49
50       pvm_pkmesgbody is similar to pvm_pkmesg, but packs only the body of the
51       specified message, omitting the header  fields.   In  other  words,  it
52       splices the messages together (the included message is left unaltered).
53       When calling pvm_pkmesgbody, the encoding types  of  the  two  messages
54       must  match because the included message body is simply appended to the
55       send buffer.  Calls to pvm_pkmesgbody can be mixed with calls  to  pack
56       any other data types.
57
58       Note:  pvm_upkmesgbody doesn't exist, because PVM doesn't keep track of
59       the boundary between the two messages.
60
61

EXAMPLES

63            pvm_recv(-1, -1);
64            pvm_initsend(PvmDataDefault);
65            pvm_pkstr("here is the message I received...");
66            pvm_pkmesg(pvm_getrbuf());
67
68

ERRORS

70       The  following  error  conditions  can  be  returned   by   pvm_pkmesg,
71       pvm_pkmesgbody or pvm_upkmesg:
72
73       PvmBadParam
74              An  invalid  value was specified for bufid argument, or bufid is
75              the current send buffer.
76
77       PvmNoSuchBuf
78              Message buffer bufid doesn't exist.
79
80       PvmNoMem
81              Libpvm is unable to allocate memory to pack data.
82
83       PvmNoData
84              The end of the message has been reached,  perhaps  because  pack
85              and unpack calls were mismatched.
86
87       PvmNoBuf
88              There is no current send (or receive) buffer.
89
90       PvmMismatch
91              pvm_pkmesgbody  was  called  and the encoding types of bufid and
92              the current send buffer don't match.
93

SEE ALSO

95       pvm_getrbuf(3PVM), pvm_getsbuf(3PVM), pvm_pack(3PVM),
96
97
98
99                               10 February, 1995                  PKMESG(3PVM)
Impressum