F´ Flight Software - C/C++ Documentation
NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
g
h
i
m
r
s
t
v
w
Variables
Typedefs
Enumerations
Enumerator
a
b
c
f
h
i
l
m
n
o
p
s
t
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
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
c
t
u
w
Enumerations
b
c
d
e
f
g
h
i
m
o
p
q
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
w
Related Functions
a
b
c
f
g
h
l
p
r
s
t
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Functions
f
i
m
s
u
Variables
_
c
f
i
l
p
t
Typedefs
Enumerations
Enumerator
a
c
d
f
i
m
p
r
s
t
w
Macros
a
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
PolyDbImpl.cpp
Go to the documentation of this file.
1
/*
2
* PolyDbImpl.cpp
3
*
4
* Created on: May 13, 2014
5
* Author: Timothy Canham
6
*/
7
8
#include <
Svc/PolyDb/PolyDbImpl.hpp
>
9
#include <
Fw/Types/Assert.hpp
>
10
#include <
Fw/Types/BasicTypes.hpp
>
11
12
namespace
Svc
{
13
PolyDbImpl::PolyDbImpl
(
const
char
* name) :
PolyDbComponentBase
(name) {
14
// initialize all entries to stale
15
for
(
NATIVE_INT_TYPE
entry
= 0;
entry
< POLYDB_NUM_DB_ENTRIES;
entry
++) {
16
this->m_db[
entry
].status =
MEASUREMENT_STALE
;
17
}
18
}
19
20
void
PolyDbImpl::init
(
NATIVE_INT_TYPE
instance) {
21
PolyDbComponentBase::init
(instance);
22
}
23
24
// If ports are no longer guarded, these accesses need to be protected from each other
25
// If there are a lot of accesses, perhaps an interrupt lock could be used instead of guarded ports
26
27
void
PolyDbImpl::getValue_handler(
NATIVE_INT_TYPE
portNum, U32 entry,
MeasurementStatus
&status,
Fw::Time
&time,
Fw::PolyType
&val) {
28
FW_ASSERT
(
entry
< POLYDB_NUM_DB_ENTRIES,
entry
);
29
status
= this->m_db[
entry
].status;
30
time
= this->m_db[
entry
].time;
31
val
= this->m_db[
entry
].val;
32
}
33
34
void
PolyDbImpl::setValue_handler(
NATIVE_INT_TYPE
portNum, U32 entry,
MeasurementStatus
&status,
Fw::Time
&time,
Fw::PolyType
&val) {
35
FW_ASSERT
(
entry
< POLYDB_NUM_DB_ENTRIES,
entry
);
36
this->m_db[
entry
].status =
status
;
37
this->m_db[
entry
].time =
time
;
38
this->m_db[
entry
].val =
val
;
39
}
40
41
PolyDbImpl::~PolyDbImpl
() {
42
}
43
44
}
Fw::Time
Definition:
Time.hpp:10
Svc::PolyDbComponentBase::entry
PROTECTED U32 entry
Definition:
PolyDbComponentAc.hpp:119
Assert.hpp
PolyDbImpl.hpp
PolyDb is a database for storing telemetry for internal software use.
Fw::ObjBase::init
void init(void)
Object initializer.
Definition:
ObjBase.cpp:26
Svc::PolyDbComponentBase::status
PROTECTED U32 MeasurementStatus & status
Definition:
PolyDbComponentAc.hpp:120
Svc::PolyDbImpl::PolyDbImpl
PolyDbImpl(const char *name)
PolyDbImpl constructor.
Definition:
PolyDbImpl.cpp:13
Svc::PolyDbComponentBase::time
PROTECTED U32 MeasurementStatus Fw::Time & time
Definition:
PolyDbComponentAc.hpp:121
Svc::MeasurementStatus
MeasurementStatus
Definition:
PolyPortAc.hpp:26
FW_ASSERT
#define FW_ASSERT(...)
Definition:
Assert.hpp:9
Svc::PolyDbComponentBase
Auto-generated base for PolyDb component.
Definition:
PolyDbComponentAc.hpp:32
Svc::PolyDbComponentBase::val
PROTECTED U32 MeasurementStatus Fw::Time Fw::PolyType & val
Definition:
PolyDbComponentAc.hpp:123
Fw::PolyType
Definition:
PolyType.hpp:12
Svc
Definition:
ActiveLoggerComponentAc.cpp:22
Svc::PolyDbImpl::~PolyDbImpl
virtual ~PolyDbImpl()
PolyDbImpl destructor.
Definition:
PolyDbImpl.cpp:41
BasicTypes.hpp
Declares ISF basic types.
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition:
BasicTypes.hpp:29
Svc::MEASUREMENT_STALE
@ MEASUREMENT_STALE
Definition:
PolyPortAc.hpp:29
Svc
PolyDb
PolyDbImpl.cpp
Generated by
1.8.19