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 libmqmsgque::MqConfigSetServerSetup_RT (MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
 set the libmqmsgque::MqSetupS::ServerSetup
 
MQ_EXTERN void libmqmsgque::MqConfigSetServerCleanup_RT (MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
 set the libmqmsgque::MqSetupS::ServerCleanup
 
MQ_EXTERN void libmqmsgque::MqConfigSetBgError_RT (MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
 set the libmqmsgque::MqSetupS::BgError
 
MQ_EXTERN void libmqmsgque::MqConfigSetEvent_RT (MK_RT const mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
 set the libmqmsgque::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:
MqConfigSetBgError_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 88 of file msgque_overload_mq.h.

◆ MqConfigSetBgError_NULL

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

Definition at line 87 of file msgque_overload_mq.h.

◆ MqConfigSetEvent

#define MqConfigSetEvent ( ...)
Value:
MqConfigSetEvent_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 90 of file msgque_overload_mq.h.

◆ MqConfigSetEvent_NULL

#define MqConfigSetEvent_NULL ( ...)
Value:
MqConfigSetEvent_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 89 of file msgque_overload_mq.h.

◆ MqConfigSetServerCleanup

#define MqConfigSetServerCleanup ( ...)
Value:
MqConfigSetServerCleanup_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 92 of file msgque_overload_mq.h.

◆ MqConfigSetServerCleanup_NULL

#define MqConfigSetServerCleanup_NULL ( ...)
Value:
MqConfigSetServerCleanup_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 91 of file msgque_overload_mq.h.

◆ MqConfigSetServerSetup

#define MqConfigSetServerSetup ( ...)
Value:
MqConfigSetServerSetup_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 94 of file msgque_overload_mq.h.

◆ MqConfigSetServerSetup_NULL

#define MqConfigSetServerSetup_NULL ( ...)
Value:
MqConfigSetServerSetup_RT(MK_RT_CALL_NULL __VA_ARGS__)

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 libmqmsgque::MqConfigSetBgError_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MqTokenF fCall,
MK_CBP callback,
MqDataFreeF fFree,
MqDataCopyF fCopy )

set the libmqmsgque::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
public:
virtual void BgError () = 0;
};
implements the ccmqmsgque API object: ConfigSetBgError
void ConfigSetBgError(MqBgErrorICB callback=NULL)
C++: ctx.ConfigSetBgError(MqBgErrorICB MqBgErrorCCB MqBgErrorIF* callback = NULL) → C-API set t...
IBgError MqBgErrorIF

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.
+ Here is the caller graph for this function:

◆ MqConfigSetEvent_RT()

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

set the libmqmsgque::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 libmqmsgque::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
public:
virtual void Event () = 0;
};
implements the ccmqmsgque API object: ConfigSetEvent
void ConfigSetEvent(MqEventICB callback=NULL)
C++: ctx.ConfigSetEvent(MqEventICB MqEventCCB MqEventIF* callback = NULL) → C-API set the libmq...

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
+ Here is the caller graph for this function:

◆ MqConfigSetServerCleanup_RT()

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

set the libmqmsgque::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 libmqmsgque::MqSetupS::isServer to true.

IServerCleanup : callback signature
public:
virtual void ServerCleanup () = 0;
};
implements the ccmqmsgque API object: ConfigSetServerCleanup
void ConfigSetServerCleanup(MqServerCleanupICB callback=NULL)
C++: ctx.ConfigSetServerCleanup(MqServerCleanupICB MqServerCleanupCCB MqServerCleanupIF* callback = ...
IServerCleanup MqServerCleanupIF

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.
+ Here is the caller graph for this function:

◆ MqConfigSetServerSetup_RT()

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

set the libmqmsgque::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 libmqmsgque::MqSetupS::isServer to true.

IServerCleanup : 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.
+ Here is the caller graph for this function: