Elmomc Multi-Axis Motion Controller-Maestro Instrukcja Użytkownika Strona 250

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 313
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 249
3. Verify an IP address.
typedef union IP_CONVERT
{
DWORD dw;
BYTE bt[4];
} IP_CONVERT; //IP Address converting
CString sIP;
sIP.Format(_T("%u.%u.%u.%u"), _IP.bt[3], _IP.bt[2], _IP.bt[1],
_IP.bt[0]);
long lIP = 0;
spLocator->IsPresentMaestro(CComBSTR(sIP), &lIP);
if( _IP.dw == (DWORD)lIP )
{//IP successfully verified
}
else
{//failure
}
4. Create a subscription via the Subscribe method. dwIP is the DWORD variable with
the Maestro IP address.
HRESULT hr = m_queue->Subscribe(dwIP);
5. Cancel the subscription via the Unsubscribe method. dwIP is the DWORD variable
with the Maestro IP address.
HRESULT hr = m_queue->Unsubscribe(dwIP);
6. Clear the Message Queue via the MessageQueueErase method.
HRESULT hr = m_queue->MessageQueueErase();
7. Obtain the Message Queue Size via the MessageQueueSize method.
DWORD dwSize=0;
HRESULT hr = m_queue->MessageQueueSize(&dwSize);
8. Obtain a Maestro Message via the ReadMessage method.
DWORD dwIP, dwID, dwWParam, dwLParam, dwTime;
HRESULT hr = m_queue->ReadMessage(&dwIP, &dwID, &dwWParam,
&dwLParam, &dwTime);
Maestro Software Manual Maestro Message Queue
MAN-MASSW (Ver. Q)
14-3
Przeglądanie stron 249
1 2 ... 245 246 247 248 249 250 251 252 253 254 255 ... 312 313

Komentarze do niniejszej Instrukcji

Brak uwag