SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Events | Private Member Functions | Private Attributes | List of all members
Seci.LabView.LvmqUpdater Class Reference

This class is used for checking to see if the LabVIEW messages received from the message panel VI have changed. It contains an instance of the BackgroundWorker class that is used as a separate thread for retrieving the current information, and an instance of the Timer class which fires off the BackgroundWorker every x milliseconds. An event is raised if the messages have changed. More...

Inheritance diagram for Seci.LabView.LvmqUpdater:
Inheritance graph
Collaboration diagram for Seci.LabView.LvmqUpdater:
Collaboration graph

Public Member Functions

void Dispose ()
 The dispose method to be called from code. More...
 
 LvmqUpdater (int updateRate)
 Constructor. Initialises the BackgroundWorker object. More...
 
void PauseUpdater ()
 Method for pausing the timer. This is done by setting the delay and period to infinity. More...
 
void ResumeUpdater ()
 Method for resuming the timer. This is done by setting the delay and period to their normal values. More...
 
void StartUpdater ()
 Method for starting the timer that fires off the update thread. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 If the value passed it true then the method has been called directly or indirectly from SECI code. If the value passed is false then the method has been called by the runtime from inside the finalizer. More...
 

Events

EventHandler OnChangeToLVMessages
 Event for indicating to the GUI level that the values were updated. More...
 
EventHandler OnLabviewNotThere
 

Private Member Functions

void backgroundUpdater_DoWork (object sender, System.ComponentModel.DoWorkEventArgs e)
 The method that is run on the BackgroundWorker thread. More...
 
void backgroundUpdater_RunWorkerCompleted (object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
 The method that is run once the BackgroundWorker thread is finished. This raises an OnChangeToLVMessages event. More...
 
void updateTimer_Tick (object obj)
 The method that is called when the timer ticks. If the BackgroundWorker thread is not busy it will request that it starts running. More...
 

Private Attributes

BackgroundWorker _backgroundUpdater
 
Boolean _messagesChanged
 
TimerCallback _updateCallBack
 
int _updateRate = 3000
 
Timer _updateTimer
 

Detailed Description

This class is used for checking to see if the LabVIEW messages received from the message panel VI have changed. It contains an instance of the BackgroundWorker class that is used as a separate thread for retrieving the current information, and an instance of the Timer class which fires off the BackgroundWorker every x milliseconds. An event is raised if the messages have changed.

Definition at line 17 of file LVMQUpdater.cs.

Constructor & Destructor Documentation

Seci.LabView.LvmqUpdater.LvmqUpdater ( int  updateRate)
inline

Constructor. Initialises the BackgroundWorker object.

Parameters
updateRateThe rate at which the values should be updated in milliseconds

Definition at line 36 of file LVMQUpdater.cs.

Member Function Documentation

void Seci.LabView.LvmqUpdater.backgroundUpdater_DoWork ( object  sender,
System.ComponentModel.DoWorkEventArgs  e 
)
inlineprivate

The method that is run on the BackgroundWorker thread.

Parameters
senderThe sender
eThe event arguments

Definition at line 112 of file LVMQUpdater.cs.

References Seci.LabView.LabViewApp.AreYouThere().

Here is the call graph for this function:

void Seci.LabView.LvmqUpdater.backgroundUpdater_RunWorkerCompleted ( object  sender,
System.ComponentModel.RunWorkerCompletedEventArgs  e 
)
inlineprivate

The method that is run once the BackgroundWorker thread is finished. This raises an OnChangeToLVMessages event.

Parameters
senderThe sender
eThe event arguments

Definition at line 143 of file LVMQUpdater.cs.

void Seci.LabView.LvmqUpdater.Dispose ( )
inline

The dispose method to be called from code.

Definition at line 158 of file LVMQUpdater.cs.

virtual void Seci.LabView.LvmqUpdater.Dispose ( bool  disposing)
inlineprotectedvirtual

If the value passed it true then the method has been called directly or indirectly from SECI code. If the value passed is false then the method has been called by the runtime from inside the finalizer.

Parameters
disposingIndicates where the call has come from

Definition at line 177 of file LVMQUpdater.cs.

void Seci.LabView.LvmqUpdater.PauseUpdater ( )
inline

Method for pausing the timer. This is done by setting the delay and period to infinity.

Definition at line 67 of file LVMQUpdater.cs.

void Seci.LabView.LvmqUpdater.ResumeUpdater ( )
inline

Method for resuming the timer. This is done by setting the delay and period to their normal values.

Definition at line 78 of file LVMQUpdater.cs.

void Seci.LabView.LvmqUpdater.StartUpdater ( )
inline

Method for starting the timer that fires off the update thread.

Definition at line 55 of file LVMQUpdater.cs.

void Seci.LabView.LvmqUpdater.updateTimer_Tick ( object  obj)
inlineprivate

The method that is called when the timer ticks. If the BackgroundWorker thread is not busy it will request that it starts running.

Parameters
objThe state of the sender

Definition at line 91 of file LVMQUpdater.cs.

Member Data Documentation

BackgroundWorker Seci.LabView.LvmqUpdater._backgroundUpdater
private

Definition at line 19 of file LVMQUpdater.cs.

Boolean Seci.LabView.LvmqUpdater._messagesChanged
private

Definition at line 24 of file LVMQUpdater.cs.

TimerCallback Seci.LabView.LvmqUpdater._updateCallBack
private

Definition at line 21 of file LVMQUpdater.cs.

int Seci.LabView.LvmqUpdater._updateRate = 3000
private

Definition at line 22 of file LVMQUpdater.cs.

Timer Seci.LabView.LvmqUpdater._updateTimer
private

Definition at line 20 of file LVMQUpdater.cs.

Event Documentation

EventHandler Seci.LabView.LvmqUpdater.OnChangeToLVMessages

Event for indicating to the GUI level that the values were updated.

Definition at line 29 of file LVMQUpdater.cs.

EventHandler Seci.LabView.LvmqUpdater.OnLabviewNotThere

Definition at line 30 of file LVMQUpdater.cs.


The documentation for this class was generated from the following file: