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
TlmChanImplGet.cpp
Go to the documentation of this file.
1
/*
2
* TelemChanImpl.cpp
3
*
4
* Created on: Mar 28, 2014
5
* Author: tcanham
6
*/
7
8
#include <
Svc/TlmChan/TlmChanImpl.hpp
>
9
#include <cstring>
10
#include <
Fw/Types/BasicTypes.hpp
>
11
#include <
Fw/Types/Assert.hpp
>
12
13
#include <stdio.h>
14
15
namespace
Svc
{
16
17
void
TlmChanImpl::TlmGet_handler
(
NATIVE_INT_TYPE
portNum,
FwChanIdType
id
,
Fw::Time
&timeTag,
Fw::TlmBuffer
&val) {
18
19
// Compute index for entry
20
21
NATIVE_UINT_TYPE
index = this->doHash(
id
);
22
23
// Search to see if channel has been stored
24
TlmEntry
*entryToUse = this->
m_tlmEntries
[this->
m_activeBuffer
].
slots
[index];
25
for
(
NATIVE_UINT_TYPE
bucket = 0; bucket < TLMCHAN_HASH_BUCKETS; bucket++) {
26
if
(entryToUse) {
// If bucket exists, check id
27
if
(entryToUse->
id
==
id
) {
28
break
;
29
}
else
{
// otherwise go to next bucket
30
entryToUse = entryToUse->
next
;
31
}
32
}
else
{
// no buckets left to search
33
break
;
34
}
35
}
36
37
if
(entryToUse) {
38
val
= entryToUse->
buffer
;
39
timeTag
= entryToUse->
lastUpdate
;
40
}
else
{
// requested entry may not be written yet; empty buffer
41
val
.resetSer();
42
}
43
44
}
45
}
Fw::Time
Definition:
Time.hpp:10
Svc::TlmChanImpl::tlmEntry::lastUpdate
Fw::Time lastUpdate
last updated time
Definition:
TlmChanImpl.hpp:53
TlmChanImpl.hpp
Component that stores telemetry channel values.
Fw::TlmBuffer
Definition:
TlmBuffer.hpp:21
FwChanIdType
#define FwChanIdType
Type representation for a channel id.
Definition:
FpConfig.hpp:66
Svc::TlmChanImpl::m_activeBuffer
U32 m_activeBuffer
Definition:
TlmChanImpl.hpp:66
Svc::TlmChanImpl::TlmSet::slots
TlmEntry * slots[TLMCHAN_NUM_TLM_HASH_SLOTS]
set of hash slots in hash table
Definition:
TlmChanImpl.hpp:61
Assert.hpp
Svc::TlmChanImpl::tlmEntry
Definition:
TlmChanImpl.hpp:50
Svc::TlmChanImpl::val
PRIVATE FwChanIdType Fw::Time Fw::TlmBuffer & val
Definition:
TlmChanImpl.hpp:40
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition:
BasicTypes.hpp:30
Svc::TlmChanImpl::TlmGet_handler
void TlmGet_handler(NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Handler for input port TlmGet.
Definition:
TlmChanImplGet.cpp:17
Svc::TlmChanImpl::tlmEntry::id
FwChanIdType id
telemetry id stored in slot
Definition:
TlmChanImpl.hpp:51
Svc::TlmChanImpl::tlmEntry::buffer
Fw::TlmBuffer buffer
buffer to store serialized telemetry
Definition:
TlmChanImpl.hpp:54
Svc
Definition:
ActiveLoggerComponentAc.cpp:22
Svc::TlmChanImpl::tlmEntry::next
tlmEntry * next
pointer to next bucket in table
Definition:
TlmChanImpl.hpp:55
BasicTypes.hpp
Declares ISF basic types.
Svc::TlmChanImpl::m_tlmEntries
struct Svc::TlmChanImpl::TlmSet m_tlmEntries[2]
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition:
BasicTypes.hpp:29
Svc::TlmChanImpl::timeTag
PRIVATE FwChanIdType Fw::Time & timeTag
Definition:
TlmChanImpl.hpp:40
Svc
TlmChan
TlmChanImplGet.cpp
Generated by
1.8.19