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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 313
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 248
Method Description Call Format and Parameters
CheckSubscription: Check the
subscription status
CheckSubscription ([in]DWORD
dwIP,[out]DWORD *pStatus)
dwIP - Maestro device IP address
pStatus – pointer to the DWORD variable to
retrieve the subscription status. When pStatus
= 1, the subscription for the Maestro device is
ready. When pStatus = 0, no subscription is
available for the Maestro device.
14.2 Using the Maestro Message Queue: Examples
This section presents examples of methods that are used to:
Create an instance of the IMaestroLocator.
Obtain an instance of the IMessageQueue.
Verify an IP address.
Create and cancel a Message Queue subscription.
Clear the Message Queue and check its size.
Get a message from the Message Queue.
1. Create an instance of the IMaestroLocator.
CComPtr<IMaestroLocator> spLocator;
HRESULT hr = spLocator.CoCreateInstance( CLSID_MaestroLocator
);
2. Obtain an instance of the IMessageQueue via the CreateMessageQueue method.
bstrName is a unique event name that you create. For example, for the event of a new
Maestro message entering the Message Queue.
CComQIPtr<IMessageQueue> m_queue;
CComBSTR bstrName(_T("MessageQueueEvent")
hr = spLocator-> CreateMessageQueue( bstrName, &m_queue);
Maestro Software Manual Maestro Message Queue
MAN-MASSW (Ver. Q)
14-2
Przeglądanie stron 248
1 2 ... 244 245 246 247 248 249 250 251 252 253 254 ... 312 313

Komentarze do niniejszej Instrukcji

Brak uwag