Bitstream Interpretation Library (BIL)
0.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
packetprocessor
V5MFWRRegister.cpp
Go to the documentation of this file.
1
6
#include <
exception/Exception.hpp
>
7
#include <
packetprocessor/V5CMDRegister.hpp
>
8
#include <
packetprocessor/V5FDRIRegister.hpp
>
9
#include <
packetprocessor/V5MFWRRegister.hpp
>
10
#include <
packetprocessor/V5RegisterAddress.hpp
>
11
12
using namespace
bil;
13
14
15
V5MFWRRegister::V5MFWRRegister
(
const
V5CMDRegister
& cmdReg,
V5FDRIRegister
& fdriReg):
16
Register
(V5RegisterAddress::
MFWR
, V5RegisterAddress::
MFWR_STRING
, true, false),
17
m_cmdReg(cmdReg),
18
m_fdriReg(fdriReg)
19
{
20
21
}
22
23
24
void
V5MFWRRegister::write
(
const
boost::uint32_t* words,
size_t
wordCount)
25
{
26
Register::write
(words, wordCount);
27
28
// CMD register must be in MFW mode
29
if
(
V5CommandCode::MFW
!= m_cmdReg.
commandCode
())
throw
Exception
();
30
// at least two dummy words must be written
31
if
(2 > wordCount)
throw
Exception
();
32
// write frame
33
m_fdriReg.
writePreviousFrame
();
34
}
35
36
37
const
V5CMDRegister
&
V5MFWRRegister::cmdRegister
()
const
38
{
39
return
m_cmdReg;
40
}
41
42
43
V5FDRIRegister
&
V5MFWRRegister::fdriRegister
()
const
44
{
45
return
m_fdriReg;
46
}
Generated on Wed Aug 8 2012 21:57:40 for Bitstream Interpretation Library (BIL) by
1.8.1.1