![Omron DeviceNet 3G8F7-DRM21-E Скачать руководство пользователя страница 101](http://html.mh-extra.com/html/omron/devicenet-3g8f7-drm21-e/devicenet-3g8f7-drm21-e_operation-manual_743611101.webp)
84
Explicit Message API Functions
Section 4-6
Reading a Client Explicit Message: SCAN_ReceiveClientExplicit()
Application Range
Online status
Function
Gets a client response message from the reception queue.
Call Format
BOOL SCAN_ReceiveClientExplicit(DWORD
Handle
, CLIENT_RES*
Msg
)
Arguments
Return Value
TRUE is returned if the response message was read successfully from the
specified node address. FALSE is returned if an error occurred. Detailed error
information can be read with the GetLastError() function.
Description
The CLIENT_RES structure’s destination (remote) node address, service
data storage buffer size, and service data storage buffer address must be set
when calling this function.
Reserve a buffer large enough to store the response message. Check the
event data length with the notification message or SCAN_GetClient
EventLength() function.
If this function is completed normally, the message ID, service code, and size
of the buffer containing service data are saved in the CLIENT_RES structure
and the received service data (response) is stored in the specified service
data storage buffer.
4-6-3
Server Message Service API Functions
Registering an Object Class ID: SCAN_RegObjectClass()
Application Range
Open status
Function
Registers the object class implemented in the application program.
WORD
ServiceCode
Service code
Stores the service code when function processing is
completed.
WORD
DataLength
The size (in bytes) of the buffer containing the ser-
vice data
Setting range: 0x0 to 0x228 (0 to 552)
Specifies the size of the buffer for storing the service
data before calling the function.
A buffer for storing service data must be reserved
that is the size of the reception response buffer
obtained using the client response communications
message or SCAN_GetClientEventLength().
When the function is completed, the number of
bytes of service data that was actually stored will be
set.
BYTE*
ServiceData
Buffer address where service data is stored.
A buffer of the number of bytes specified under
DataLength must be set aside before the function is
called.
When the function is completed, the received ser-
vice data is stored to the buffer address specified
here.
Type
Name
Contents
Type
Name
Contents
DWORD
Handle
Device handle obtained by SCAN_Open()
CLIENT_RES*
Msg
Buffer address where the response message is
stored
Содержание DeviceNet 3G8F7-DRM21-E
Страница 1: ...OPERATION MANUAL Cat No W381 E1 02 3G8F7 DRM21 E DeviceNet PCI Board ...
Страница 2: ...3G8F7 DRM21 E DeviceNet PCI Board Operation Manual Revised July 2005 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 29: ...12 Preparation for Operation Section 1 8 ...
Страница 67: ...50 PC Watchdog Timer Management Function Section 3 11 ...
Страница 115: ...98 Maintenance API Functions Section 4 7 ...
Страница 131: ...114 Remote I O Communications Characteristics Section 6 1 ...
Страница 145: ...Index 128 ...
Страница 147: ...130 Revision History ...