F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
o
p
r
s
t
u
v
w
Variables
b
c
f
g
k
l
m
o
p
r
s
t
u
w
z
Typedefs
a
b
c
d
e
f
g
h
i
l
n
o
p
r
s
t
u
v
w
Enumerations
Enumerator
a
b
f
h
i
k
n
o
p
s
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
e
f
i
m
r
s
t
w
Enumerations
b
c
d
f
g
h
m
o
q
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Related Symbols
:
a
b
c
d
f
g
h
l
p
q
r
s
t
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Functions
f
g
i
m
p
r
s
t
u
Variables
_
b
c
f
g
i
l
p
r
s
w
Typedefs
a
b
c
e
f
i
n
p
s
t
u
Enumerations
Enumerator
a
b
c
f
g
h
p
r
s
t
Macros
_
a
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
►
F´ Flight Software - C/C++ Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
Utils.cpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title Utils.cpp
3
// \author T. Chieu
4
// \brief cpp file for Utils class
5
//
6
// \copyright
7
// Copyright (C) 2009-2022 California Institute of Technology.
8
// ALL RIGHTS RESERVED. United States Government Sponsorship
9
// acknowledged.
10
//
11
// ======================================================================
12
13
#include "STest/Pick/Pick.hpp"
14
15
#include <string>
16
#include <limits>
17
#include <iostream>
18
19
namespace
FppTest
{
20
21
namespace
Utils
{
22
23
U8
getNonzeroU8
() {
24
return
static_cast<
U8
>
(STest::Pick::lowerUpper(
25
1,
26
std::numeric_limits<U8>::max()
27
));
28
}
23
U8
getNonzeroU8
() {
…
}
29
30
U32
getNonzeroU32
() {
31
return
STest::Pick::lowerUpper(
32
1,
33
std::numeric_limits<U32>::max()
34
);
35
}
30
U32
getNonzeroU32
() {
…
}
36
37
char
getChar
() {
38
return
static_cast<
char
>
(STest::Pick::lowerUpper(32, 127));
39
}
37
char
getChar
() {
…
}
40
41
void
setString
(
char
* buf, U32 size) {
42
U32 length = STest::Pick::lowerUpper(1, size);
43
44
if
(length == 0) {
45
buf[0] = 0;
46
return
;
47
}
48
49
for
(U32 i = 0; i < length - 1; i++) {
50
buf[i] =
getChar
();
51
}
52
53
buf[length-1] = 0;
54
}
41
void
setString
(
char
* buf, U32 size) {
…
}
55
56
}
// namespace Utils
21
namespace
Utils
{
…
}
57
58
}
// namespace FppTest
U8
uint8_t U8
8-bit unsigned integer
Definition
BasicTypes.h:26
FppTest::Utils::setString
void setString(char *buf, U32 size)
Definition
Utils.cpp:41
FppTest::Utils::getNonzeroU32
U32 getNonzeroU32()
Definition
Utils.cpp:30
FppTest::Utils::getChar
char getChar()
Definition
Utils.cpp:37
FppTest::Utils::getNonzeroU8
U8 getNonzeroU8()
Definition
Utils.cpp:23
FppTest
Definition
FormalParamTypes.cpp:18
Utils
Definition
CRCChecker.cpp:20
FppTest
utils
Utils.cpp
Generated by
1.10.0