Loading...
Searching...
No Matches
MqContextC_ConfigApi_Interface_C_API

MqContextC - various function to setup a interface for the contextMore...

+ Collaboration diagram for MqContextC_ConfigApi_Interface_C_API:

Macros

#define MqInterfaceDoc(mkrt, ctx, fCall, callback, fFree, fCopy)
 placeholder for interface docomentation
 

Functions

MQ_EXTERN void MqConfigSetServerSetup_RT (MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
 set the MqSetupS::ServerSetup
 
MQ_EXTERN void MqConfigSetServerCleanup_RT (MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
 set the MqSetupS::ServerCleanup
 
MQ_EXTERN void MqConfigSetBgError_RT (MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
 set the MqSetupS::BgError
 
MQ_EXTERN void MqConfigSetEvent_RT (MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
 set the MqSetupS::Event
 

MqContextC - MqContextC_ConfigApi_Interface_C_API - overload

#define MqConfigSetBgError_NULL(...)
 
#define MqConfigSetBgError(...)
 
#define MqConfigSetEvent_NULL(...)
 
#define MqConfigSetEvent(...)
 
#define MqConfigSetServerCleanup_NULL(...)
 
#define MqConfigSetServerCleanup(...)
 
#define MqConfigSetServerSetup_NULL(...)
 
#define MqConfigSetServerSetup(...)
 

Detailed Description

MqContextC - various function to setup a interface for the context

The "Setup"-Callback is special because this callback have to be callable by the server child and/or the slave context.

To distinguish the server child and slave the following functions are used:

Macro Definition Documentation

◆ MqConfigSetBgError

#define MqConfigSetBgError ( ...)
Value:
#define MK_RT_CALL
MQ_EXTERN void MqConfigSetBgError_RT(MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::BgError

Definition at line 88 of file msgque_overload_mq.h.

◆ MqConfigSetBgError_NULL

#define MqConfigSetBgError_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 87 of file msgque_overload_mq.h.

◆ MqConfigSetEvent

#define MqConfigSetEvent ( ...)
Value:
MQ_EXTERN void MqConfigSetEvent_RT(MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::Event

Definition at line 90 of file msgque_overload_mq.h.

◆ MqConfigSetEvent_NULL

#define MqConfigSetEvent_NULL ( ...)
Value:

Definition at line 89 of file msgque_overload_mq.h.

◆ MqConfigSetServerCleanup

#define MqConfigSetServerCleanup ( ...)
Value:
MQ_EXTERN void MqConfigSetServerCleanup_RT(MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::ServerCleanup

Definition at line 92 of file msgque_overload_mq.h.

◆ MqConfigSetServerCleanup_NULL

#define MqConfigSetServerCleanup_NULL ( ...)
Value:

Definition at line 91 of file msgque_overload_mq.h.

◆ MqConfigSetServerSetup

#define MqConfigSetServerSetup ( ...)
Value:
MQ_EXTERN void MqConfigSetServerSetup_RT(MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the MqSetupS::ServerSetup

Definition at line 94 of file msgque_overload_mq.h.

◆ MqConfigSetServerSetup_NULL

#define MqConfigSetServerSetup_NULL ( ...)
Value:

Definition at line 93 of file msgque_overload_mq.h.

◆ MqInterfaceDoc

#define MqInterfaceDoc ( mkrt,
ctx,
fCall,
callback,
fFree,
fCopy )

placeholder for interface docomentation

This function register a callback and is used to configure the application for a specific task.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]fCallfunction called with callback as argument to work on an specific task.
[in]callbackargument for fCall, for a target-language this is the target-language-callback-hdl.
[in]fFreecleanup the callback, called at the destruction of ctx.
[in]fCopycopy-constructor of the callback, used if the ctx is used to initialize an other newctx.

Definition at line 2307 of file LibMqMsgque_mq.h.

Function Documentation

◆ MqConfigSetBgError_RT()

MQ_EXTERN void MqConfigSetBgError_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MqTokenF fCall,
MK_CBP callback,
MqDataFreeF fFree,
MqDataCopyF fCopy )

set the MqSetupS::BgError

define the background-error-interface

A background error is an error without a link to an application-context and happen if an MqSendEND call fails or if an other asynchronous task fails. if the interface is not defined the error is printed to stderr and the application continue to work. if the interface is defined the context is set to error and the callback is called to process this error. Inside the callback the error is available using ErrorGetNum and ErrorGetText and can be cleared using ErrorReset.

IBgError : callback signature
1. The *service-ctx* is the *context* for which the service was defined.
callback-args := service-ctx:MqContextC[in]
[static] def callback ( callback-args )
[instance] class YYY:
def callback ( self, callback-args )
[class] class ZZZ:
@staticmethod
def callback ( callback-args )
read more at: Callback signature

This function register a callback and is used to configure the application for a specific task.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]fCallfunction called with callback as argument to work on an specific task.
[in]callbackargument for fCall, for a target-language this is the target-language-callback-hdl.
[in]fFreecleanup the callback, called at the destruction of ctx.
[in]fCopycopy-constructor of the callback, used if the ctx is used to initialize an other newctx.

◆ MqConfigSetEvent_RT()

MQ_EXTERN void MqConfigSetEvent_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MqTokenF fCall,
MK_CBP callback,
MqDataFreeF fFree,
MqDataCopyF fCopy )

set the MqSetupS::Event

Create a link to the calling tool event-handling queue …

Event-Handling is used to process tasks in the background to give the tool-user the feeling of a non-blocking application. For example Tcl using the event-handling to update the Tk user-interface while the application is waiting for data. The event handling function is called on idle-time and is designed for a very short function execution time. Do only one action per function call. This function will be called with a ~10000 usec interval to guarantee a parallel like execution.

Attention
1. The Event-Handler is used to start background processing during idel-time.
2. If MqSetupS::ignoreExit is set… and the process/thread is already on shutdown… the process/thread will continue to work as long as background tasks are available.
3. The process will only exit if all Event-Handler return ErrorSetCONTINUE to signal that no other background tasks are available.
example: example/LANG/Filter4.EXT
IEvent : callback signature
1. The *service-ctx* is the *context* for which the service was defined.
callback-args := service-ctx:MqContextC[in]
[static] def callback ( callback-args )
[instance] class YYY:
def callback ( self, callback-args )
[class] class ZZZ:
@staticmethod
def callback ( callback-args )
read more at: Callback signature

This function register a callback and is used to configure the application for a specific task.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]fCallfunction called with callback as argument to work on an specific task.
[in]callbackargument for fCall, for a target-language this is the target-language-callback-hdl.
[in]fFreecleanup the callback, called at the destruction of ctx.
[in]fCopycopy-constructor of the callback, used if the ctx is used to initialize an other newctx.
Attention

◆ MqConfigSetServerCleanup_RT()

MQ_EXTERN void MqConfigSetServerCleanup_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MqTokenF fCall,
MK_CBP callback,
MqDataFreeF fFree,
MqDataCopyF fCopy )

set the MqSetupS::ServerCleanup

define the server-cleanup-interface (callback) used on cleanup …

This interface is used to cleanup an old server-context-link, like a destructor, and is called at the beginning of MqLinkDelete to free context-specific variables. As side-effect this interface set MqSetupS::isServer to True.

IServerCleanup : callback signature
1. The *service-ctx* is the *context* for which the service was defined.
callback-args := service-ctx:MqContextC[in]
[static] def callback ( callback-args )
[instance] class YYY:
def callback ( self, callback-args )
[class] class ZZZ:
@staticmethod
def callback ( callback-args )
read more at: Callback signature

This function register a callback and is used to configure the application for a specific task.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]fCallfunction called with callback as argument to work on an specific task.
[in]callbackargument for fCall, for a target-language this is the target-language-callback-hdl.
[in]fFreecleanup the callback, called at the destruction of ctx.
[in]fCopycopy-constructor of the callback, used if the ctx is used to initialize an other newctx.

◆ MqConfigSetServerSetup_RT()

MQ_EXTERN void MqConfigSetServerSetup_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MqTokenF fCall,
MK_CBP callback,
MqDataFreeF fFree,
MqDataCopyF fCopy )

set the MqSetupS::ServerSetup

define the server-cleanup-interface (callback) used on cleanup …

This interface is used to cleanup an old server-context-link, like a destructor, and is called at the beginning of MqLinkDelete to free context-specific variables. As side-effect this interface set MqSetupS::isServer to True.

IServerCleanup : callback signature
1. The *service-ctx* is the *context* for which the service was defined.
callback-args := service-ctx:MqContextC[in]
[static] def callback ( callback-args )
[instance] class YYY:
def callback ( self, callback-args )
[class] class ZZZ:
@staticmethod
def callback ( callback-args )
read more at: Callback signature

This function register a callback and is used to configure the application for a specific task.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]fCallfunction called with callback as argument to work on an specific task.
[in]callbackargument for fCall, for a target-language this is the target-language-callback-hdl.
[in]fFreecleanup the callback, called at the destruction of ctx.
[in]fCopycopy-constructor of the callback, used if the ctx is used to initialize an other newctx.