struct Device *findDeviceByName(char *name,struct Device *phead)
{
struct Device *tmp=phead;
if(phead==NULL)
{
return NULL;
}
else
{
while(tmp!=NULL)
{
if(strcmp(tmp->deviceName,name)==0)
{
return tmp;
}
tmp=tmp->next;
}
return NULL;
}
}
基于树莓派的智能家居系统(十四)——根据设备名寻找设备结构体节点
本文介绍如何在基于树莓派的智能家居系统中,通过设备名称来定位和操作对应的设备结构体节点,涉及C++编程技巧和智能家居系统开发。
摘要由CSDN通过智能技术生成