feat(doc): Add trace man pages
[ric-plt/lib/rmr.git] / doc / src / man / rmr_init_trace.3.xfm
1 .if false
2 ==================================================================================
3         Copyright (c) 2019 Nokia 
4         Copyright (c) 2018-2019 AT&T Intellectual Property.
5
6    Licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8    You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17 ==================================================================================
18 .fi
19
20 .if false
21         Mnemonic        rmr_init_trace_man.xfm
22         Abstract        The manual page for the rmr_init_trace function.
23         Author          E. Scott Daniels
24         Date            19 April 2019
25 .fi
26
27 .** if formatting with tfm, the roff.im will cause roff output to be generated
28 .** if formatting with pfm, then pretty postscript will be generated
29 .gv e LIB lib
30 .if pfm
31         .im &{lib}/generic_ps.im
32 .ei
33         .gv e OUTPUT_RST use_rst
34         .if .ev &use_rst 1 = 
35                 .im &{lib}/rst.im
36         .ei
37                 .im &{lib}/roff.im
38         .fi
39 .fi
40
41 &line_len(6i)
42
43 &h1(RMR Library Functions)
44 &h2(NAME)
45         rmr_init_trace
46
47 &h2(SYNOPSIS)
48 &indent
49 &ex_start
50 #include <rmr/rmr.h>
51
52 void* rmr_init_trace( void* ctx )
53 &ex_end
54
55 &uindent
56
57 &h2(DESCRIPTION)
58 The &cw(rmr_init_trace) function establishes the default trace space placed in each 
59 message buffer allocated with &cw(rmr_alloc_msg().)
60 If this function is never called, then no trace space is allocated by default into
61 any message buffer. 
62
63 .sp
64 Trace space allows the user application to pass some trace token, or other data
65 with the message, but outside of the payload.
66 Trace data may be added to any message with &cw(rmr_set_trace(),) and may be extracted
67 from a message with &cw(rmr_get_trace().)  
68 The number of bytes that a message contains for/with trace data can be determined by
69 invoking &cw(rmr_get_trlen().) 
70
71 .sp
72 This function may be safely called at any time during the life of the user programme
73 to (re)set the default trace space reserved.  
74 If the user programme needs to allocate a message with trace space of a different
75 size than is allocated by default, without fear of extra overhead of reallocating 
76 a message later, the &cw(rmr_tralloc_msg()) function can be used.
77
78 &h2(RETURN VALUE)
79 A value of 1 is returned on success, and 0 on failure.  A failure indicates that the 
80 RMr context (void *) passed to this function was not valid.
81
82 &h2(SEE ALSO )
83 rmr_alloc_msg(3),
84 rmr_tr_alloc_msg(3),
85 rmr_call(3),
86 rmr_free_msg(3),
87 rmr_get_rcvfd(3),
88 rmr_get_trace(3),
89 rmr_get_trlen(3),
90 rmr_payload_size(3),
91 rmr_send_msg(3),
92 rmr_rcv_msg(3),
93 rmr_rcv_specific(3),
94 rmr_rts_msg(3),
95 rmr_ready(3),
96 rmr_fib(3),
97 rmr_has_str(3),
98 rmr_tokenise(3),
99 rmr_mk_ring(3),
100 rmr_ring_free(3),
101 rmr_set_trace(3)
102
103
104 .qu
105