XnStatus MockGenerator::FrameSyncWith(xn::ProductionNode& other) { XnStatus nRetVal = XN_STATUS_OK; if (!other.IsValid()) { return XN_STATUS_BAD_PARAM; } nRetVal = SetFrameSyncNode(other.GetName()); XN_IS_STATUS_OK(nRetVal); return (XN_STATUS_OK); }
XnBool MockGenerator::CanFrameSyncWith(xn::ProductionNode& other) { if (!m_bFrameSyncCap) { return FALSE; } if (!other.IsValid()) { return XN_STATUS_BAD_PARAM; } return (strcmp(other.GetName(), m_strFrameSyncWith) == 0); }
XnStatus MockGenerator::StopFrameSyncWith(xn::ProductionNode& other) { XnStatus nRetVal = XN_STATUS_OK; if (!other.IsValid()) { return XN_STATUS_BAD_PARAM; } if (strcmp(other.GetName(), m_strFrameSyncWith) != 0) { // not synced right now with this node return XN_STATUS_BAD_PARAM; } nRetVal = SetFrameSyncNode(""); XN_IS_STATUS_OK(nRetVal); return (XN_STATUS_OK); }
XnBool MockGenerator::IsFrameSyncedWith(xn::ProductionNode& other) { return other.IsValid() && (strcmp(other.GetName(), m_strFrameSyncWith) == 0); }