Generic hardware access library
|
00001 #include "hal/AddCommand.hh" 00002 00003 00004 HAL::AddCommand::AddCommand( std::string variable, 00005 HAL::CommandSequence& sequence ) 00006 throw (HAL::SequencerSyntaxError) 00007 : sequence(sequence) { 00008 constant = 0; 00009 opPtr = &constant; 00010 variablePointer = sequence.getVariablePointer( variable ); 00011 } 00012 00013 void HAL::AddCommand::setOp( long constant ) { 00014 this->constant = constant; 00015 } 00016 00017 void HAL::AddCommand::setOpPointer( long* opPtr ) { 00018 this->opPtr = opPtr; 00019 } 00020 00021 void HAL::AddCommand::excecute( const HAL::HardwareDeviceInterface& device ) const 00022 throw() { 00023 (*variablePointer) += (*opPtr); 00024 }