Bitstream Interpretation Library (BIL)  0.1
V5MFWRRegister.cpp
Go to the documentation of this file.
1 
11 
12 using namespace bil;
13 
14 
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 
38 {
39  return m_cmdReg;
40 }
41 
42 
44 {
45  return m_fdriReg;
46 }