06ec74d6eb0ad03565ecfdc79e2d9d0600cf69b7
[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 .gv e LIB lib
29 .im &{lib}/man/setup.im 
30
31 &line_len(6i)
32
33 &h1(RMR Library Functions)
34 &h2(NAME)
35         rmr_str2xact
36
37 &h2(SYNOPSIS)
38 &indent
39 &ex_start
40 #include <rmr/rmr.h>
41
42 int rmr_str2xact( rmr_mbuf_t* mbuf, unsigned char* src, int len )
43 &ex_end
44
45 &uindent
46
47 &h2(DESCRIPTION)
48 The &cw(rmr_str2xact) function will copy the string pointed to by src to the 
49 transaction ID (xaction) field in the given message.  
50 The field is a fixed length, gated by the constant &cw(RMR_MAX_XID) and if string length is larger
51 than this value, then &bold(nothing) will be copied. (Note, this differs slightly from the
52 behaviour of the &cw( lrmr_bytes2xact() ) function.)
53
54 &beg_dlist(.75i : ^&bold_font )
55 &h2(RETURN VALUE)
56 On success, the value RMR_OK is returned. 
57 If the string cannot be copied to the message, the return value will be one of the 
58 errors listed below.
59
60 &h2(ERRORS)
61 If the return value is not RMR_OK, then it will be set to one of the values below.
62
63 &half_space
64 &di(RMR_ERR_BADARG) The message, or an internal portion of the message, was corrupted or the pointer was invalid.
65
66 &half_space
67 &di(RMR_ERR_OVERFLOW) The length passed in was larger than the maximum length of the field; only a portion of
68         the source bytes were copied.
69 &end_dlist
70
71 &h2(EXAMPLE)
72
73
74 &h2(SEE ALSO )
75 rmr_alloc_msg(3),
76 rmr_bytes2meid(3),
77 rmr_bytes2xact(3),
78 rmr_call(3),
79 rmr_free_msg(3),
80 rmr_get_meid(3),
81 rmr_get_rcvfd(3),
82 rmr_get_xact(3),
83 rmr_payload_size(3),
84 rmr_send_msg(3),
85 rmr_rcv_msg(3),
86 rmr_rcv_specific(3),
87 rmr_rts_msg(3),
88 rmr_ready(3),
89 rmr_fib(3),
90 rmr_has_str(3),
91 rmr_tokenise(3),
92 rmr_mk_ring(3),
93 rmr_ring_free(3),
94 rmr_str2meid(3),
95 rmr_wh_open(3),
96 rmr_wh_send_msg(3)
97 .qu
98