next up previous contents
Next: Lower Interface Functions Up: ESRO Protocol Engine Previous: ESRO Service Primitives   Contents

Subsections


Upper Interface Functions

SAP Management

The ESROP-User calls ESROP SAP management functions to register or deregister as an ESROS service user.

Bind an ESROP-User

Int
ESROP_sapBind   (ESROP_SapDescsapDesc,
                               ESROP_SapSelsapSel,
                               ESROP_FunctionalUnit functionalUnit,
                               int (*invokeInd)(ESROP_SapSel,
                                         ESROP_SapSel,
                                         T_SapSel */
                                         N_SapAddr */
                                         ESROP_InvokeDesc,
                                         ESROP_OperationValue,
                                         ESROP_EncodingType,
                                         DU_View),
                               int (*resultInd) (ESROP_InvokeDesc,
                                         ESROP_UserInvokeRef,
                                         ESROP_EncodingType,
                                         DU_View),
                               int (*errorInd)  (ESROP_InvokeDesc,
                                         ESROP_UserInvokeRef,
                                         ESROP_EncodingType,
                                         ESROP_ErrorValue,
                                         DU_View),
                               int (*resultCnf) (ESROP_InvokeDesc,
                                         ESROP_UserInvokeRef),
                               int (*errorCnf)( ESROP_InvokeDesc,
                                         ESROP_UserInvokeRef),
                               int (*failureInd)(ESROP_InvokeDesc,
                                         ESROP_UserInvokeRef,
                                         ESROP_FailureValue))

This function binds an ESROP-User at the ESROP layer by creating an ESROP-SAP.

The sapSel argument specifies the ESROP-SAP Selector Address to be associated with this service user. The ESROP-SAP descriptor value is returned to the caller through sapDesc argument.

The functionalUnit argument specifies the method of handshaking used by the SAP.

The remaining arguments specify the addresses of the callback functions (and their arguments) that the SAP should invoke upon the occurrence of specific events. For instance, invokeInd points to the function that is executed when a performer ESROP receives an invocation.

ESROP_sapBind returns 0 on successful completion. It returns a negative value if unsuccessful.

Unbind an ESROP-User

SuccFail
ESROP_sapUnbind(ESROP_SapSel sapSel)

This function unbinds an ESROP-User. If there are any remaining invocations associated with this SAP for that ESROP-User, the pending or in process requests are dropped and if there are any events queued up for this ESROP-User's SAP, they are discarded.

The sapSel argument specifies the ESROP-SAP currently in use by the caller.

This function returns 0 on successful completion. It returns a negative value if unsuccessful.

ESROP Action Primitives

ESROS-INVOKE.request

Int
ESROP_invokeReq(ESROP_InvokeDescinvokeDesc,
                              ESROP_UserInvokeRefuserInvokeRef,
                              ESROP_SapSellocESRSap, 
                              ESROP_SapSelremESRSap, 
                              T_SapSel*remTsap, 
                              N_SapAddr*remNsap, 
                              ESROP_OperationValueopValue, 
                              ESROP_EncodingTypeencodingType, 
                              DU_View   parameter)

The invoker ESROP-User invokes this function to initiate the invocation of an ESROS operation. The ESROP-User specifies both local and remote ESROP-SAP. The locESROSap argument contains the ESROP-SAP Selector of the invoker, while the remESROSap argument contains the ESROP-SAP of the performer. The remTsap specifies the Transport SAP Selector of the performer and remNsap specifies the Network SAP of the performer. Invoker ESROP-User passes an invocation identifier (userInvokeRef) to the ESROP which is returned to it in all future references to that specific operation.

opValue is the operation value. The invoker ESROP-User can specify its desired encoding type through the encodingType argument. parameter is the operation's parameter.

An invocation descriptor is passed to the caller of the function (invoker ESROP-User) through the invokeDesc argument to be used to identify the ESROS invocation in future references. If ESROP fails in initializing the invocation operation a negative value is returned by the function, otherwise 0 is returned on successful completion of the function call.

ESROS-RESULT.request

Int
ESROP_resultReq(ESROP_InvokeDescinvokeDesc,
ESROP_UserInvokeRefuserInvokeRef,
ESROP_EncodingTypeencodingType,
DU_View parameter)

When ESROP performer user accepts an invocation indication, it invokes this function to request transmission of the result of the operation.

invokeDesc is the invocation identifier that was previously obtained through the ESROS-INVOKE.indication primitive on performer-user side. Performer ESROP-User passes the userInvokeRef to ESROP which is returned to it in all future references to the operation. encodingType reflects the encoding type of the parameter. parameter is the operation's parameter.

This function returns 0 on successful completion. If the function is unsuccessful, it returns a negative value.

ESROS-ERROR.request

Int
ESROP_errorReq(ESROP_InvokeDesc invokeDesc,
                              ESROP_UserInvokeRefuserInvokeRef,
                              ESROP_EncodingType encodingType, 
                              ESROP_ErrorValue errorValue, 
                              DU_View parameter)

When ESROP performer user accepts an invocation indication, it invokes this function to request transmission of the error response to the invoker of the operation.

invokeDesc is the invocation identifier that was previously obtained through the ESROS-INVOKE.indication primitive on performer-user side. encodingType reflects the encoding type of the parameter. parameter is the operation's parameter.

This function returns 0 on successful completion. If the function is unsuccessful, it returns a negative value.

ESROS Event Primitives

ESROS-INVOKE.indication

Int
(*ESROP_invokeInd)(ESROP_SapSellocESROSap,
                                 ESROP_SapSelremESROSap,
                                 T_SapSel **remTsap,
                                 N_SapAddr **remNsap,
                                 ESROP_InvokeDescinvokeDesc,
                                 ESROP_OperationValueoperationValue,
                                 ESROP_EncodingTypeencodingType, 
                                 DU_Viewparameter)

The performer ESROP invokes this function to communicate an invoke indication to the ESROP-User. ESROP specifies both the invoker ESROP-SAP Selector and the performer ESROP-SAP Selector.

The remTsap argument contains the Transport SAP Selector of the performer and remNsap specifies the Network SAP of the performer. The encodingType argument specifies the encoding type of the parameter. parameter is the operation's parameter.

This function returns 0 in the case of success and a negative value if unsuccessful.

ESROS-RESULT.indication

Int
(*ESROP_resultInd)(ESROP_InvokeDescinvokeDesc,
                                 ESROP_UserInvokeRefuserInvokeRef,
                                 ESROP_EncodingTypeencodingType,
                                 DU_View        parameter)

The ESROP invokes this function to communicate to the ESROP-User a result indication.

invokeDesc is the invocation identifier that was previously communicated to the invoker user through ESROS-INVOKE-P.confirm. userInvokeRef is the user's invocation identifier that was passed to ESROP by invoker-user at the time of initiation of ESROS-INVOKE.request. encodingType reflects the encoding type of the parameter used by the performer ESROP-User. parameter is the operation's parameter.

This function returns 0 in the case of success and a negative value if unsuccessful.

ESROS-ERROR.indication

Int
(*ESROP_errorInd) (ESROP_InvokeDescinvokeDesc,
                                 ESROP_UserInvokeRefuserInvokeRef,
                                 ESROP_EncodingTypeencodingType,
                                 ESROP_ErrorValueerrorValue,
                                 DU_Viewparameter)

The ESROP invokes this function to communicate to the invoker ESROP-User an error response to its invocation.

invokeDesc is the invocation identifier that was previously communicated to the invoker user through ESROS-INVOKE-P.confirm (ESROP_invokeReq parameter). userInvokeRef is the user's invocation identifier that was passed to ESROP by invoker-user at the time of initiation of ESROS-INVOKE.request. encodingType reflects the encoding type of the parameter used by the performer ESROP-User. parameter is the operation's parameter.

This function returns 0 in the case of success and a negative value if unsuccessful.

ESROS-FAILURE.indication

Int
(*ESROP_failureInd) (ESROP_InvokeDescinvokeDesc,
                                 ESROP_UserInvokeRefuserInvokeRef,
                                 ESROP_FailureValuefailureValue)

The ESROP invokes this function to communicate to the ESROP-User a failure indication.

invokeDesc is the invocation identifier that was previously communicated to the invoker ESROP-User through ESROS-INVOKE-P.confirm (ESROP_invokeReq parameter) or communicated to the performer ESROP-User through ESROS-INVOKE.indication. userInvokeRef is the user's invocation identifier that was passed to ESROP by invoker-user at the time of initiation of ESROS-INVOKE.request (ESROP_invokeReq) on invoker side or ESROS-RESULT/ERROR.request on performer side.

The failureValue argument specifies the failure reason.

This function returns 0 in the case of success and a negative error value if unsuccessful.

ESROS-RESULT.confirm

Int
(*ESROP_resultCnf) (ESROP_InvokeDescinvokeDesc,
                                ESROP_UserInvokeRefuserInvokeRef)

The ESROP invokes this function to communicate the confirmation of the result.

invokeDesc is the invocation identifier that was previously communicated to the performer ESROP-user through ESROS-INVOKE.indication. userInvokeRef is the user's invocation identifier that was passed to ESROP by performer ESROP-User at the time of initiation of ESROS-RESULT.request (ESROP_resultReq).

This function returns 0 in the case of success and a negative value if unsuccessful.

ESROS-ERROR.confirm

Int
(*ESROP_errorCnf)(ESROP_InvokeDescinvokeDesc,
                              ESROP_UserInvokeRefuserInvokeRef)

The ESROP invokes this function to communicate the confirmation of the error.

invokeDesc is the invocation identifier that was previously communicated to the performer ESROP-user through ESROS-INVOKE.indication. userInvokeRef is the user's invocation identifier that was passed to ESROP by performer ESROP-User at the time of initiation of ESROS-ERROR.request (ESROP_errorReq).

This function returns 0 in the case of success and a negative value if unsuccessful.


next up previous contents
Next: Lower Interface Functions Up: ESRO Protocol Engine Previous: ESRO Service Primitives   Contents