Bitstream Interpretation Library (BIL)  0.1
V5FARRegister.cpp
Go to the documentation of this file.
1 
9 
10 using namespace bil;
11 
12 
14  Register(V5RegisterAddress::FAR, V5RegisterAddress::FAR_STRING, true, true),
15  m_frameAddress()
16 {
17 
18 }
19 
20 
21 void V5FARRegister::write(const boost::uint32_t* words, size_t wordCount)
22 {
23  Register::write(words, wordCount);
24 
25  // word count has to be 1
26  if (1 != wordCount) throw Exception();
27  // set command and execute
28  m_frameAddress.rawAddress(*words);
29 }
30 
31 
32 void V5FARRegister::read(boost::uint32_t* words, size_t wordCount) const
33 {
34  Register::read(words, wordCount);
35 
36  // word count has to be 1
37  if (1 != wordCount) throw Exception();
38  // return current command code
39  *words = m_frameAddress.rawAddress();
40 }
41 
42 
44 {
45  return m_frameAddress;
46 }
47 
48 
50 {
51  return m_frameAddress;
52 }