Elmomc Multi-Axis Motion Controller-Maestro Uživatelský manuál Strana 249

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 313
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 248
1 2 ... 244 245 246 247 248 249 250 251 252 253 254 ... 312 313

Komentáře k této Příručce

Žádné komentáře