Debian Codegraph @

man/getBitIndicators.Rd

raw
1 \name{getBitIndicators}
2 \alias{getBitIndicators}
3 \alias{setBitIndicators}
4 \title{Operate on bit fields}
5 \description{
6 The \code{getBitIndicators} function decompose a value into its respective
7 bit components.
8 The \code{setBitIndicators} combines individual components into a
9 single number
10 to "set" a bit field value.
11 }
12 \usage{
13 getBitIndicators(val, defs)
14 setBitIndicators(vals, defs)
15 }
16 %- maybe also 'usage' for other objects documented here.
17 \arguments{
18 \item{val}{the value to break up into the bit field components.}
19 \item{defs}{the named integer vector that defines the bit field elements.}
20 \item{vals}{the individual components that are to be combined into a
21 single integer value representing the collection of components.
22 These can be given as names or integer values that correspond to the
23 elements in the defs, either by name or value.
24 }
25 }
26 \value{
27 \code{getBitIndicators} returns a named integer vector representing
28 the components of the bit field in the value.
29 The names of the vector give the symbolic elements that were set in
30 the value.
31
32 \code{setBitIndicators} returns a single integer value representing
33 the value from combining the different components (e.g. ORing the bits
34 of the different values).
35 }
36
37 \references{Curl homepage \url{https://curl.se/}}
38 \author{Duncan Temple Lang}
39
40
41 \seealso{
42 The features field in \code{\link{curlVersion}}.
43 }
44 \examples{
45 getBitIndicators(7, c(A = 1, B = 2, C = 4))
46 getBitIndicators(3, c(A = 1, B = 2, C = 4))
47 getBitIndicators(5, c(A = 1, B = 2, C = 4))
48 }
49 \keyword{manip}
50
51