F´ Flight Software - C/C++ Documentation
NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
BlockDriverImpl.cpp
Go to the documentation of this file.
1
#include <
Drv/BlockDriver/BlockDriverImpl.hpp
>
2
#include <
Fw/Types/BasicTypes.hpp
>
3
#include <
Fw/Types/Assert.hpp
>
4
5
namespace
Drv
{
6
7
BlockDriverImpl::BlockDriverImpl
(
const
char
* compName) :
8
BlockDriverComponentBase
(compName), m_cycles(0)
9
{
10
11
}
12
13
void
BlockDriverImpl::init
(
NATIVE_INT_TYPE
queueDepth) {
14
BlockDriverComponentBase::init
(queueDepth);
15
}
16
17
BlockDriverImpl::~BlockDriverImpl
(
void
) {
18
19
}
20
21
void
BlockDriverImpl::InterruptReport_internalInterfaceHandler(U32 ip) {
22
// get time
23
Svc::TimerVal
timer;
24
timer.
take
();
25
// call output timing signal
26
this->CycleOut_out(0,timer);
27
// increment cycles and write channel
28
this->tlmWrite_BD_Cycles(this->m_cycles);
29
this->m_cycles++;
30
}
31
32
void
BlockDriverImpl::BufferIn_handler(
NATIVE_INT_TYPE
portNum,
Drv::DataBuffer
& buffer) {
33
// just a pass-through
34
this->
BufferOut_out
(0,buffer);
35
}
36
37
void
BlockDriverImpl::Sched_handler(
NATIVE_INT_TYPE
portNum,
NATIVE_UINT_TYPE
context) {
38
}
39
40
void
BlockDriverImpl::callIsr
(
void
) {
41
s_driverISR(
this
);
42
}
43
44
void
BlockDriverImpl::s_driverISR(
void
* arg) {
45
FW_ASSERT
(arg);
46
// cast argument to component instance
47
BlockDriverImpl
* compPtr =
static_cast<
BlockDriverImpl
*
>
(arg);
48
compPtr->InterruptReport_internalInterfaceHandler(0);
49
}
50
51
void
BlockDriverImpl::PingIn_handler(
52
const
NATIVE_INT_TYPE
portNum,
53
U32 key
54
)
55
{
56
// call ping output port
57
this->
PingOut_out
(0,key);
58
}
59
60
61
}
Drv::DataBuffer
Definition:
DataBuffer.hpp:9
Drv::BlockDriverComponentBase::PingOut_out
void PingOut_out(NATIVE_INT_TYPE portNum, U32 key)
Definition:
BlockDriverComponentAc.cpp:489
Drv::BlockDriverImpl::callIsr
void callIsr(void)
Definition:
BlockDriverImpl.cpp:40
Drv::BlockDriverComponentBase
Auto-generated base for BlockDriver component.
Definition:
BlockDriverComponentAc.hpp:41
Drv
Definition:
BlockDriverComponentAc.cpp:22
BlockDriverImpl.hpp
Assert.hpp
Svc::TimerVal
Serializable class for carrying timer values.
Definition:
TimerVal.hpp:22
Fw::ObjBase::init
void init(void)
Object initializer.
Definition:
ObjBase.cpp:26
Drv::BlockDriverImpl::BlockDriverImpl
BlockDriverImpl(const char *compName)
Definition:
BlockDriverImpl.cpp:7
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition:
BasicTypes.hpp:30
Svc::TimerVal::take
void take(void)
Function to store a timer value.
Definition:
TimerVal.cpp:37
FW_ASSERT
#define FW_ASSERT(...)
Definition:
Assert.hpp:9
BasicTypes.hpp
Declares ISF basic types.
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition:
BasicTypes.hpp:29
Drv::BlockDriverImpl
Definition:
BlockDriverImpl.hpp:8
Drv::BlockDriverImpl::~BlockDriverImpl
~BlockDriverImpl(void)
Definition:
BlockDriverImpl.cpp:17
Drv::BlockDriverComponentBase::BufferOut_out
void BufferOut_out(NATIVE_INT_TYPE portNum, Drv::DataBuffer &buff)
Definition:
BlockDriverComponentAc.cpp:479
Drv
BlockDriver
BlockDriverImpl.cpp
Generated by
1.8.19