Name
cyg_mbop_read_id — Return specific extended device ID
Synopsis
#include <cyg/modbus.h>
Cyg_ErrNo cyg_mbop_read_id(
void *private, cyg_uint8 objectid, cyg_uint8 *nextid, cyg_uint8 *len, cyg_uint8 *buffer)
;
Description
This function does not provide a response, but purely supplies
“Extended” ObjectID
data to the common
MEI Type 14 request handler.
The objectid
parameter specifies the object to
be returned. The caller supplies an optional data buffer pointer in
the buffer
parameter, with the value referenced
by the len
pointer being the space available in
the buffer. If the objectid
is supported then
the buffer is filled, and len
is updated with
the actual length of the object. The use of
a NULL
buffer
allows a
caller to ascertain the length of an object prior to calling again
with a supplied buffer of the required size.
If the nextid
pointer is supplied then the next
available object ID after objectid
is written,
or 0
if no more objects are available.
Return value
On success ENOERR
is returned and
the len
and nextid
values updated accordingly. If the handler does not recognise the
passed objectid
then ENOENT
is returned and *len
is NOT updated. If the
passed *len
is not large enough for the object
then EAGAIN
is returned
and *len
is update with the required length.
2024-03-18 | eCosPro Non-Commercial Public License |