Create an instance of ReturnEventData.
Exactly one of the parameters result
or error
is required.
The executionInfo
parameter is optional and may be specified
both in case of success and error.
the result value to be returned (any JSON data type, optional)
the error object in case of failure (optional)
information about execution environment (optional)
The error object to be returned in case the operation call yielded an error (optional).
The value is undefined
if the operation executed successfully.
The error object consists of two properties: code
, message
.
The error code given is an integer that indicates the error type
that occurred, either a predefined error or an application defined one. Predefined error
codes are defined by the RemoteCallErrorCode
enum. Predefined error
codes are within the range -32768 to -32000. Application defined error codes must be
defined outside this range.
The error message provides a short description of the error. Predefined error messages
exist for all predefined error codes (see enum RemoteCallErrorMessage
).
Defines additional information about the execution environment (ayn JSON value) such as the execution time of the operation or the ID of the operated control unit (optional).
The value is undefined
, if no execution info has been specified.
Determines whether an error object has been returned.
Returns true, if remote operation failed with an error; false otherwise.
The result value to be returned (any JSON data type). The value is undefined
,
if operation execution yielded an error.
Generated using TypeDoc
Defines event data format for returning a result or error from executing a remote operation call.