esi-msi-function

esi-msi-function This class is the base clase for the MSI function mapping, for consistency, all functions used by the MSI function mapping must be in a class which directly inherits from this base class. The two methods INPUT and OUTPUT only define examples how an input method as well as an output message can be defined. They don’t have any function and produce an error, indicating that they are not yet defined correctly. Eiter overwrite them with a usefull implementation in the derived class, or shadow them with non functional properties ( e.g. INPUT= false, OUTPUT= false) so that they can not be called by accident.)

Dependencies:

library version inmation core library

esi-class

2.0.0

yes

Available functions:

All functions have to be called according to the ESI standard, using colons, e.g. lib:FUNCTIONNAME(params)

Documentation

INPUT

Description

Input function template

Parameters

Name Description

data

the input data

optTable

lua table with custom options

msgId

an Id of the incomming message, which can be used in bidirection messages to find the correct pending message. This allows to have several message in execution in parallel.

mapTable

the central mapping table from the MessageProcessor.

msgConfig

the message configuration object, which calls this methode.

Returns

  • return a directReponse, which has the same format as the input data.

  • if the respose shall be generated by the OUTPUT function, this must be nil.

OUTPUT

Description

Output function template

Parameters

Name Description

optTable

lua table with custom options specific to this function

mapTable

the central mapping table from the MessageProcessor.

msgConfig

the message configuration object, which calls this methode.

Returns

  • the values paramResponse, abortReponse and msgId (required for bidirectional messages only)

  • if the paramResponse is given, this is used to create a Production Parameter message,

  • if that is not given, the second parameter is used to create an abort message

  • the msgId allows to find the correct pending message for this function.

  • That way several messages can run in parallel.