ProSoft Technology MVI69E-LDM User Manual

Page 77

Advertising
background image

MVI69E-LDM ♦ "C" Programmable

Contents

Linux Application Development Module

Developer's Manual

ProSoft Technology, Inc.

Page 77 of 130

August 21, 2014

MVI69_SendMsgResponseToBp

Syntax

int MVI69_SendMsgResponseToBp(MVI69HANDLE handle,
WORD *buffer,
WORD *length,
WORD reserved,
WORD timeout);

Parameters

handle

handle returned by previous call to MVI69_Open

buffer

pointer to buffer to send to processor

length

the length in words of the message to send

timeout

maximum number of milliseconds to wait to send message

Description
This function sends a response to the control processor.

handle must be a valid handle returned from MVI69_Open.

Upon calling this function, length should contain the response size in words. buffer must
point to a buffer of at least length words in size.

If length exceeds the maximum response size specified by the value MsgSndBufSize (see
the MVI69_GetIOConfig function), MVI69_ERR_BADPARAM will be returned.

When this function is called, the buffers data must contain the message in the following
format:

Name

Data Type

Description

MessageId

WORD

Must echo MessageID of request

SizeofMessage

WORD

Size of the Message data in bytes.

Message[...]

BYTEs

CIP Response packet, starting with
Service Response. Total number of
bytes is provided in the SizeofMessage
field.

The API uses the MessageId field to match responses to requests from the backplane.
Once the API matches a response to its request, the response will be forwarded to the
backplane and the original request can be released.

The API does not act upon any data of the Message.

Since the API maintains an internal queue of 8 messages, the user application must
generate responses to allow reception of more than 8 messages. If 8 requests are queued
and the API receives another request, it will be dropped.

If the SizeofMessage field is set to 0, the original request is released and no response is
sent to the backplane. This allows the user application to flush messages.

Advertising