Initial commit of RMR Library
[ric-plt/lib/rmr.git] / doc / src / man / rmr_str2xact.3.xfm
1
2 .if false
3 ==================================================================================
4         Copyright (c) 2019 Nokia 
5         Copyright (c) 2018-2019 AT&T Intellectual Property.
6
7    Licensed under the Apache License, Version 2.0 (the "License");
8    you may not use this file except in compliance with the License.
9    You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18 ==================================================================================
19 .fi
20
21 .if false
22         Mnemonic        rmr_str2xact.xfm
23         Abstract        The manual page for the rmr_str2xact function.
24         Author          E. Scott Daniels
25         Date            8 March 2019
26 .fi
27
28 .** if formatting with tfm, the roff.im will cause roff output to be generated
29 .** if formatting with pfm, then pretty postscript will be generated
30 .gv e LIB lib
31 .if pfm
32         .im &{lib}/generic_ps.im
33 .ei
34         .gv e OUTPUT_RST use_rst
35         .if .ev &use_rst 1 = 
36                 .im &{lib}/rst.im
37         .ei
38                 .im &{lib}/roff.im
39         .fi
40 .fi
41
42 &line_len(6i)
43
44 &h1(RMR Library Functions)
45 &h2(NAME)
46         rmr_str2xact
47
48 &h2(SYNOPSIS)
49 &indent
50 &ex_start
51 #include <rmr/rmr.h>
52
53 int rmr_str2xact( rmr_mbuf_t* mbuf, unsigned char* src, int len )
54 &ex_end
55
56 &uindent
57
58 &h2(DESCRIPTION)
59 The &cw(rmr_str2xact) function will copy the string pointed to by src to the 
60 transaction ID (xaction) field in the given message.  
61 The field is a fixed length, gated by the constant &cw(RMR_MAX_XID) and if string length is larger
62 than this value, then &bold(nothing) will be copied. (Note, this differs slightly from the
63 behaviour of the &cw( lrmr_bytes2xact() ) function.)
64
65 &beg_dlist(.75i : ^&bold_font )
66 &h2(RETURN VALUE)
67 On success, the value RMR_OK is returned. 
68 If the string cannot be copied to the message, the return value will be one of the 
69 errors listed below.
70
71 &h2(ERRORS)
72 If the return value is not RMR_OK, then it will be set to one of the values below.
73
74 &half_space
75 &di(RMR_ERR_BADARG) The message, or an internal portion of the message, was corrupted or the pointer was invalid.
76
77 &half_space
78 &di(RMR_ERR_OVERFLOW) The length passed in was larger than the maximum length of the field; only a portion of
79         the source bytes were copied.
80 &end_dlist
81
82 &h2(EXAMPLE)
83
84
85 &h2(SEE ALSO )
86 rmr_alloc_msg(3),
87 rmr_bytes2meid(3),
88 rmr_bytes2xact(3),
89 rmr_call(3),
90 rmr_free_msg(3),
91 rmr_get_rcvfd(3),
92 rmr_payload_size(3),
93 rmr_send_msg(3),
94 rmr_rcv_msg(3),
95 rmr_rcv_specific(3),
96 rmr_rts_msg(3),
97 rmr_ready(3),
98 rmr_fib(3),
99 rmr_has_str(3),
100 rmr_tokenise(3),
101 rmr_mk_ring(3),
102 rmr_ring_free(3),
103 rmr_str2meid(3),
104 rmr_wh_open(3),
105 rmr_wh_send_msg(3)
106 .qu
107