JevGetOpen
- Organization of this page
Description
This function connects the program to the event server of JP1/Base so that the program can acquire JP1 events.
Definition header
JevApi.h
Format
JEVGETKEY JevGetOpen(long* lplStatus, const char* lpszServer, const char* lpszFilter, long lPosition);
Arguments
lplStatus
In lplStatus, specify the pointer to the area for containing the status code that this function returns if the function abnormally terminates. The following explains the status codes that may be returned.
Status code |
Meaning |
---|---|
JEV_NO_LIBRARY |
No library is found.#1 Alternatively, the shared library cannot be found because too many files are open. |
JEV_S_CONNECT_ERROR |
Failed to connect the event server. |
JEV_S_PARAM_ERROR |
An invalid parameter is specified. |
JEV_S_MAXOPEN |
The number of open files reached the maximum. |
JEV_S_NOMEMORY |
Memory is insufficient. |
JEV_S_IO_ERR |
An I/O error occurred. |
JEV_S_SYSTEM_ERROR |
A system error occurred (system resources became insufficient). |
JEV_S_NO_AUTHORITY |
The JP1 program or user application does not have sufficient authority to connect the event server.#2 |
JEV_S_FILTER_ERROR |
The filter contains an error (excluding errors in regular expressions). |
JEV_S_REGEX_ERROR |
The regular expression specified in the filter contains an error. |
JEV_S_REGEX_CANNOY_USED |
The regular expression library cannot be used. |
#1: Check if necessary files have been deleted or if incorrect compile options are specified. If necessary files have been deleted, reinstall JP1/Base. If compile options are incorrect, reconfigure the option settings.
#2: The users parameter in the event server settings (conf) file for JP1/Base defines the authority to connect the event server.
lpszServer
In lpszServer, specify the pointer to a character string that indicates a destination event server name and ends with \0. If you specify a null pointer, the function connects the program to the event server that has the same name as the local host name. Specify an event server name of 256 bytes or less, including the \0.
lpszFilter
In lpszFilter, specify the pointer to a character string ending in \0 that indicates a filter, as described by the filter syntax section in the manual Job Management Partner 1/Base User's Guide. If you specify a null pointer, the function targets all the JP1 events.
lPosition
In lPosition, specify a serial number in the event database as the position from which to start acquiring JP1 events.
If you specify -1, the function can acquire the JP1 events registered after the issuance of this function. Note that events that occur during execution of this function might not be acquired. Therefore, acquisition is guaranteed for JP1 events that are registered after the completion of this function.
Return values
Situation |
Explanation |
---|---|
Normal termination |
This function returns the handle for acquiring the JP1 event. |
Abnormal termination |
The function returns a null pointer. Also, in the area specified in lplStatus, the function stores the detailed error code. |