88
Explicit Message API Functions
Section 4-6
Arguments
Return Value
TRUE is returned if the request message was read successfully from the
specified Board. FALSE is returned if an error occurred. Detailed error infor-
mation can be read with the GetLastError() function.
Description
The SERVER_REQ structure’s ClassID, size of the service data storage
buffer, and address of the service data storage buffer must be set before call-
ing this function.
Reserve a buffer large enough to store the request message. Check the event
data length with the notification message or SCAN_GetServerEventLength()
function.
When this function is completed normally, the message ID automatically set
by the Board and the service code, class ID, instance ID, and service data
size sent from the client will be stored in the SERVER_REQ structure. The
received service data (request) will be stored in the specified service data
storage buffer.
Specify the obtained message ID as the message ID for the SERVER_RES
structure when sending the server response corresponding to the server
request.
SERVER_RES Structure
This structure defines the format of server response explicit messages. This
structure is used in the SCAN_SendServerExplicit() function.
Sending a Server Explicit Message: SCAN_SendServerExplicit()
Application Range
Online status
Function
Sends a server response message.
Call Format
BOOL SCAN_SendServerExplicit(DWORD
Handle
, SERVER_RES*
Msg
)
Type
Name
Contents
DWORD
Handle
Device handle obtained by SCAN_Open()
SERVER_REQ*
Msg
Buffer address where the request message is
stored
Type
Name
Contents
DWORD
MessageID
Message ID
Specifies the request message ID obtained by
SCAN_ReceiveServerExplicit().
WORD
ServiceCode
Service code
Specifies the service code sent as the response.
For normal responses:
Turns ON the leftmost bit (bit 15) of the service code
obtained using SCAN_ReceiveServerExplicit and
uses it as the response service code.
For error responses:
Specifies 0
×
94(148) as the service code for the
error response.
WORD
DataLength
The amount of service data in bytes
Setting range: 0x0 to 0x228 (0 to 552)
BYTE*
ServiceData
Provide the number of bytes of service data indi-
cated by the DataLength parameter.
Содержание 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 ...