@@ -39,7 +39,8 @@ namespace OnixSourcePlugin
3939 DESPWR = 2 ,
4040 PORTVOLTAGE = 3 ,
4141 SAVEVOLTAGE = 4 ,
42- LINKSTATE = 5
42+ LINKSTATE = 5 ,
43+ LINKFLAGS = 7 ,
4344 };
4445
4546 enum class PortStatusCode : uint32_t
@@ -83,14 +84,10 @@ namespace OnixSourcePlugin
8384 PortController (PortName port_, std::shared_ptr<Onix1> ctx_);
8485
8586 int configureDevice () override ;
86-
87- bool updateSettings () override { return true ; }
88-
87+ bool updateSettings () override ;
8988 void startAcquisition () override ;
90-
9189 void processFrames () override ;
92-
93- void addSourceBuffers (OwnedArray<DataBuffer>& sourceBuffers) override {};
90+ void addSourceBuffers (OwnedArray<DataBuffer>& sourceBuffers) override ;
9491
9592 void updateDiscoveryParameters (DiscoveryParameters parameters);
9693
@@ -106,12 +103,20 @@ namespace OnixSourcePlugin
106103
107104 static DiscoveryParameters getHeadstageDiscoveryParameters (std::string headstage);
108105
109- std::string getPortName () const { return OnixDevice::getPortName (port); }
106+ std::string getPortNameString () const ;
107+
108+ PortName getPort () const ;
109+
110+ /* * Check if the port status changed during acquisition and there is an error reported */
111+ bool getErrorFlag ();
112+
113+ double getLastVoltageSet () const ;
110114
111- /* * Check if the port status changed and there is an error reported */
112- bool getErrorFlag () { return errorFlag; }
115+ /* * Writes to the link flags register to reset the flags. This should be called after headstages are locked. */
116+ bool resetLinkFlags ();
113117
114- double getLastVoltageSet () const { return lastVoltageSet; }
118+ /* * Returns the link flags value, which is zero unless the lock or pass was lost outside of acquisition */
119+ uint32_t getLinkFlags ();
115120
116121 private:
117122
@@ -135,7 +140,7 @@ namespace OnixSourcePlugin
135140 {
136141 public:
137142 ConfigureVoltageWithProgressBar (DiscoveryParameters params, PortController* port)
138- : ThreadWithProgressWindow(" Configuring voltage on " + port->getPortName (), true, false)
143+ : ThreadWithProgressWindow(" Configuring voltage on " + port->getPortNameString (), true, false)
139144 {
140145 m_params = params;
141146 m_port = port;
0 commit comments