MCPcopy Create free account
hub / github.com/domoticz/domoticz / WWWUpdateSingleState

Method WWWUpdateSingleState

main/EventSystem.cpp:1210–1240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1208}
1209
1210void CEventSystem::WWWUpdateSingleState(const uint64_t ulDevID, const std::string &devname, const _eReason reason)
1211{
1212 if (!m_bEnabled)
1213 return;
1214
1215 std::string l_deviceName; l_deviceName.reserve(100); l_deviceName.assign(devname);
1216
1217 if (reason == REASON_DEVICE)
1218 {
1219 boost::unique_lock<boost::shared_mutex> devicestatesMutexLock(m_devicestatesMutex);
1220
1221 auto itt = m_devicestates.find(ulDevID);
1222 if (itt != m_devicestates.end())
1223 {
1224 _tDeviceStatus replaceitem = itt->second;
1225 replaceitem.deviceName = l_deviceName;
1226 itt->second = replaceitem;
1227 }
1228 }
1229 else if (reason == REASON_SCENEGROUP)
1230 {
1231 boost::unique_lock<boost::shared_mutex> scenesgroupsMutexLock(m_scenesgroupsMutex);
1232 auto itt = m_scenesgroups.find(ulDevID);
1233 if (itt != m_scenesgroups.end())
1234 {
1235 _tScenesGroups replaceitem = itt->second;
1236 replaceitem.scenesgroupName = l_deviceName;
1237 itt->second = replaceitem;
1238 }
1239 }
1240}
1241
1242void CEventSystem::WWWUpdateSecurityState(int securityStatus)
1243{

Callers 4

Cmd_UpdateSceneMethod · 0.80
Cmd_RenameDeviceMethod · 0.80
Cmd_RenameSceneMethod · 0.80
Cmd_SetDeviceUsedMethod · 0.80

Calls 3

reserveMethod · 0.80
endMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected