Commit d69f9e97 authored by Pavel Vainerman's avatar Pavel Vainerman

Сделал работу SMInterface через проверенные функции UniersalInterface

(в случае когда работа идёт не через указатель на SM).
parent 8e290313
...@@ -113,8 +113,8 @@ void SMInterface::setState ( UniSetTypes::ObjectId id, bool state ) ...@@ -113,8 +113,8 @@ void SMInterface::setState ( UniSetTypes::ObjectId id, bool state )
END_FUNC(SMInterface::setState) END_FUNC(SMInterface::setState)
} }
BEG_FUNC(SMInterface::setState) BEG_FUNC1(SMInterface::setState)
shm->fastSetState(si,state,myid); ui->fastSetState(si,state,myid);
return; return;
END_FUNC(SMInterface::setState) END_FUNC(SMInterface::setState)
} }
...@@ -133,8 +133,8 @@ void SMInterface::setValue ( UniSetTypes::ObjectId id, long value ) ...@@ -133,8 +133,8 @@ void SMInterface::setValue ( UniSetTypes::ObjectId id, long value )
END_FUNC(SMInterface::setValue) END_FUNC(SMInterface::setValue)
} }
BEG_FUNC(SMInterface::setValue) BEG_FUNC1(SMInterface::setValue)
shm->fastSetValue(si,value,myid); ui->fastSetValue(si,value,myid);
return; return;
END_FUNC(SMInterface::setValue) END_FUNC(SMInterface::setValue)
} }
...@@ -150,8 +150,8 @@ bool SMInterface::saveState ( IOController_i::SensorInfo& si, bool state, ...@@ -150,8 +150,8 @@ bool SMInterface::saveState ( IOController_i::SensorInfo& si, bool state,
END_FUNC(SMInterface::saveState) END_FUNC(SMInterface::saveState)
} }
BEG_FUNC(SMInterface::saveState) BEG_FUNC1(SMInterface::saveState)
shm->fastSaveState(si,state,type,sup_id); ui->fastSaveState(si,state,type,sup_id);
return true; return true;
END_FUNC(SMInterface::saveState) END_FUNC(SMInterface::saveState)
} }
...@@ -167,8 +167,8 @@ bool SMInterface::saveValue ( IOController_i::SensorInfo& si, long value, ...@@ -167,8 +167,8 @@ bool SMInterface::saveValue ( IOController_i::SensorInfo& si, long value,
END_FUNC(SMInterface::saveValue) END_FUNC(SMInterface::saveValue)
} }
BEG_FUNC(SMInterface::saveValue) BEG_FUNC1(SMInterface::saveValue)
shm->fastSaveValue(si,value,type,sup_id); ui->fastSaveValue(si,value,type,sup_id);
return true; return true;
END_FUNC(SMInterface::saveValue) END_FUNC(SMInterface::saveValue)
} }
...@@ -186,8 +186,8 @@ long SMInterface::getValue ( UniSetTypes::ObjectId id ) ...@@ -186,8 +186,8 @@ long SMInterface::getValue ( UniSetTypes::ObjectId id )
END_FUNC(SMInterface::getValue) END_FUNC(SMInterface::getValue)
} }
BEG_FUNC(SMInterface::getValue) BEG_FUNC1(SMInterface::getValue)
return shm->getValue(si); return ui->getValue(si.id,si.node);
END_FUNC(SMInterface::getValue) END_FUNC(SMInterface::getValue)
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -204,8 +204,8 @@ bool SMInterface::getState ( UniSetTypes::ObjectId id ) ...@@ -204,8 +204,8 @@ bool SMInterface::getState ( UniSetTypes::ObjectId id )
END_FUNC(SMInterface::getState) END_FUNC(SMInterface::getState)
} }
BEG_FUNC(SMInterface::getState) BEG_FUNC1(SMInterface::getState)
return shm->getState(si); return ui->getState(si.id,si.node);
END_FUNC(SMInterface::getState) END_FUNC(SMInterface::getState)
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -227,8 +227,7 @@ bool SMInterface::saveLocalValue ( UniSetTypes::ObjectId id, long value, ...@@ -227,8 +227,7 @@ bool SMInterface::saveLocalValue ( UniSetTypes::ObjectId id, long value,
return saveValue(si,value,type,myid); return saveValue(si,value,type,myid);
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
void SMInterface::askSensor( UniSetTypes::ObjectId id, void SMInterface::askSensor( UniSetTypes::ObjectId id, UniversalIO::UIOCommand cmd, UniSetTypes::ObjectId backid )
UniversalIO::UIOCommand cmd, UniSetTypes::ObjectId backid )
{ {
IOController_i::SensorInfo_var si; IOController_i::SensorInfo_var si;
si->id = id; si->id = id;
...@@ -245,8 +244,8 @@ void SMInterface::askSensor( UniSetTypes::ObjectId id, ...@@ -245,8 +244,8 @@ void SMInterface::askSensor( UniSetTypes::ObjectId id,
END_FUNC(SMInterface::askSensor) END_FUNC(SMInterface::askSensor)
} }
BEG_FUNC(SMInterface::askSensor) BEG_FUNC1(SMInterface::askSensor)
shm->askSensor(si, ci, cmd ); ui->askRemoteSensor(si->id,cmd,si->node,ci->id);
return; return;
END_FUNC(SMInterface::askSensor) END_FUNC(SMInterface::askSensor)
} }
...@@ -317,9 +316,7 @@ bool SMInterface::exist() ...@@ -317,9 +316,7 @@ bool SMInterface::exist()
return ic->exist(); return ic->exist();
END_FUNC(SMInterface::exist) END_FUNC(SMInterface::exist)
} }
BEG_FUNC(SMInterface::exist) return ui->isExist(shmID);
return shm->exist();
END_FUNC(SMInterface::exist)
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
IOController::DIOStateList::iterator SMInterface::dioEnd() IOController::DIOStateList::iterator SMInterface::dioEnd()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment