F´ Flight Software - C/C++ Documentation  NASA-v2.0.1
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BlockDriverImpl.cpp
Go to the documentation of this file.
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 
14  BlockDriverComponentBase::init(queueDepth);
15  }
16 
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 
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::BlockDriverImpl::callIsr
void callIsr(void)
Definition: BlockDriverImpl.cpp:40
Drv
Definition: BlockDriverImpl.cpp:5
BlockDriverImpl.hpp
Assert.hpp
Svc::TimerVal
Serializable class for carrying timer values.
Definition: TimerVal.hpp:22
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
Drv::BlockDriverImpl::init
void init(NATIVE_INT_TYPE queueDepth)
Definition: BlockDriverImpl.cpp:13
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