OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

dc_log_notify_receive - Receive message logs

Format

ANSI C, C++

#include <dclog.h>
DCLONG  dc_log_notify_receive (char *msg, DCLONG msglen,
                               DCLONG timeout, DCLONG flags)

K&R C

#include <dclog.h>
DCLONG  dc_log_notify_receive (msg, msglen, timeout, flags)
char       *msg;
DCLONG     msglen;
DCLONG     timeout;
DCLONG     flags;

Description

The function dc_log_notify_receive() receives the message logs reported by OpenTP1. Calling the function dc_log_notify_receive() once retrieves one message log.

Arguments whose values are set in the UAP

msg

Specify the area to contain a receive message log. Here, specify length greater than or equal to that specified in DCLOG_NOTIFY_MSG_LEN.

msglen

Specify the length of the area specified in msg.

timeout

Specify the time (in seconds) during which the function dc_log_notify_receive() waits if no message log arrives. The number of seconds must be from -1 to 65,535. If 0 is specified, the function returns without waiting for message logs. If -1 is specified, the function waits until a message log arrives.

flags

Specify DCNOFLAGS.

Return values

Return value Return value (numeric) Meaning
Integer of 0 or larger A message log was stored normally in the area specified in msg. An integer of 0 or larger indicates the length of the received message log.
DCLOGER_PARAM_ARGS -1900 An incorrect value is specified as the argument.
DCLOGER_PROTO -1999 The function dc_log_notify_open() is not called.
DCLOGER_TIMEOUT -1907 Though the number of seconds specified in timeout is exceeded, no message log is reported.
DCLOGER_COMM -1901 Initialization of the communication path failed.