/// <summary> /// 获取各个通道连接状态 /// </summary> /// <param name="lightType">通道类型</param> /// <returns>-1:函数执行失败,0:已连接光源,1:没有连接光源,2:短路保护3:过压保护4:过流保护</returns> public int GetChannelState(LightChn lightType) { int i = 0; unsafe { int *p = &i; int ret = opt.GetChannelState(SwitchChannel(lightType), p); if (ret == 0) { return(i); } return(-1); } }