File size: 652 Bytes
bd5cb32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <sawControllers/mtsController.h>
#include <cisstMultiTask/mtsInterfaceProvided.h>

mtsController::mtsController( const std::string& taskname,
			      double period,
			      osaCPUMask cpumask ) :
  mtsTaskPeriodic( taskname, period, true ),
  cpumask( cpumask ),
  ctl( NULL ),
  mtsEnabled( false ) {

  ctl = AddInterfaceProvided( "Control" );
  if( ctl ){
    
    StateTable.AddData( mtsEnabled, "Enabled" );
    ctl->AddCommandWriteState( StateTable, mtsEnabled, "Enable" );

  }
  else{
    CMN_LOG_RUN_ERROR << "Failed to create interface Control for " << GetName()
		      << std::endl;
  }

  
}

mtsController::~mtsController(){}