From fbf359a1c393fbcbcf17f34c64a8b599a7d0f030 Mon Sep 17 00:00:00 2001
From: donker <donker@astron.nl>
Date: Tue, 31 Aug 2021 08:00:12 +0200
Subject: [PATCH] L2SDP-456, add some comment for Masked and Online

---
 src/periph/fpga.cpp | 2 +-
 src/periph/fpga.h   | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/periph/fpga.cpp b/src/periph/fpga.cpp
index 4fb2601c..05e54116 100644
--- a/src/periph/fpga.cpp
+++ b/src/periph/fpga.cpp
@@ -468,7 +468,7 @@ bool Periph_fpga::monitor(TermOutput& termout)
     // first 9 read functions on 4 nodes will take 6 msec.
     string name = "periph.fpga.monitor node " + to_string(GlobalNr);
     tictoc.tic(name.c_str());
-    read_system_info(termout);
+    read_system_info(termout);  // read_system_info() will set Online state.
     if (Online) {
         read_time_since_last_pps(termout, REG_FORMAT_INT64, R_UCP);
         read_bsn_monitor_input_sync_timeout(termout, REG_FORMAT_INT64, R_UCP);
diff --git a/src/periph/fpga.h b/src/periph/fpga.h
index b282586e..44327362 100644
--- a/src/periph/fpga.h
+++ b/src/periph/fpga.h
@@ -47,7 +47,11 @@ private:
   UCP *ucp;
   CMMap *mmap;
   uint32_t GlobalNr;
+
+  // Masked is set by the client and is used to set the fpga's to communinicate with, true is communicate, false do not.
   bool Masked;
+  // Online is the communication state with the fpga true if no errors, false is no communication.
+  // state is set in read_system_info() function that is called every second from the monitor() function.
   bool Online;
 
   std::string my_current_design_name;
-- 
GitLab