theLink 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
MqContextC_ConfigApi_Get_C_API

MqContextC - various function to 'get' the configuration-data from a contextMore...

+ Collaboration diagram for MqContextC_ConfigApi_Get_C_API:

Functions

static bool libmqmsgque::MqConfigGetIsServer (MQ_CTX const ctx)
 does the context object is a server ?
 
static enum MqIdentE libmqmsgque::MqConfigGetIdentFrom (MQ_CTX const ctx)
 get the libmqmsgque::MqConfigS::identFrom
 
static bool libmqmsgque::MqConfigGetIsParent (MQ_CTX const ctx)
 does the context object is a parent ? An objext is a parent id the libmqmsgque::MqConfigS::parent attribute is MK_NULL
 
static bool libmqmsgque::MqConfigGetIsString (MQ_CTX const ctx)
 does the context object is using the string-mode ?
 
static MK_STRN libmqmsgque::MqConfigGetName (MQ_CTXN const ctx)
 get the name of the context object
 
static MK_STRN libmqmsgque::MqConfigGetPrefix (MQ_CTXN const ctx)
 get the libmqmsgque::MqConfigS::dispPrefix
 
static MK_STRN libmqmsgque::MqConfigGetPostfix (MQ_CTXN const ctx)
 get the libmqmsgque::MqConfigS::dispPostfix
 
static MK_STRN libmqmsgque::MqConfigGetStorage (MQ_CTXN const ctx)
 get the storage of the context object
 
static MK_I32 libmqmsgque::MqConfigGetBuffersize (MQ_CTXN const ctx)
 get the minimum of the read/send buffersize of the socket
 
static MK_I32 libmqmsgque::MqConfigGetPkgsize (MQ_CTXN const ctx)
 get the maximun size of a BDY package
 
static MK_TIME_T libmqmsgque::MqConfigGetTimeout (MQ_CTXN const ctx)
 get the timeout value of the context object
 
static MK_STRN libmqmsgque::MqConfigGetIoUds (MQ_CTXN const ctx)
 return the libmqmsgque::MqIoUdsConfigS
 
enum MkErrorE libmqmsgque::MqConfigGetIoTcp (MQ_CTX const ctx, MK_STRN *host_out, MK_STRN *port_out, MK_STRN *myhost_out, MK_STRN *myport_out)
 get the configuration-data of the tcp-client-server-link
 
enum MkErrorE libmqmsgque::MqConfigGetIoTcpL_RT (MK_RT mkrt, MQ_CTX const ctx, MK_BFL *vals_out)
 get the configuration-data of the tcp-client-server-link as MkBufferListC
 
static MQ_SOCK_HDL libmqmsgque::MqConfigGetIoPipe (MQ_CTX const ctx)
 return the libmqmsgque::MqIoPipeConfigS
 
static enum MqStartE libmqmsgque::MqConfigGetStartAs (MQ_CTX const ctx)
 return the libmqmsgque::MqConfigS::startAs value
 
static enum MqStatusIsEF libmqmsgque::MqConfigGetStatusIs (MQ_CTX const ctx)
 return the libmqmsgque::MqContextS::statusIs value
 
config_tlibmqmsgque::MqConfigGetConfigFile (MQ_CTX const ctx)
 get the config-file handle used for libconfig API funtions
 
config_setting_tlibmqmsgque::MqConfigGetConfigRoot (MQ_CTX const ctx)
 get the config-root handle used for libconfig API funtions
 
enum MkErrorE libmqmsgque::MqConfigSetConfigFile_RT (MK_RT mkrt, MQ_CTX const ctx, MK_STRN const filename)
 set the config-file and parse for well-known config-items
 
#define MQ_IS_SERVER(ctx)
 extract boolean information from context
 
#define MQ_IS_SERVER_PARENT(ctx)
 
#define MQ_IS_CLIENT(ctx)
 
#define MQ_IS_CLIENT_PARENT(ctx)
 
#define MQ_IS_CHILD(ctx)
 
#define MQ_IS_PARENT(ctx)
 
#define MQ_IS_SLAVE(ctx)
 
#define MQ_IS_MASTER(ctx)
 
#define MQ_IS_LOOPBACK(ctx)
 
#define MQ_GET_PARENT(ctx)
 
#define MQ_GET_MASTER(ctx)
 

MqContextC - MqContextC_ConfigApi_Get_C_API - overload

#define MqConfigGetIoTcpL_NULL(...)
 
#define MqConfigGetIoTcpL(...)
 
#define MqConfigGetIoTcpL_E(...)
 
#define MqConfigGetIoTcpL_C(...)
 
#define MqConfigGetIoTcpL_e(...)
 
#define MqConfigSetConfigFile_NULL(...)
 
#define MqConfigSetConfigFile(...)
 
#define MqConfigSetConfigFile_E(...)
 
#define MqConfigSetConfigFile_C(...)
 
#define MqConfigGetIoTcp_E(...)
 
#define MqConfigGetIoTcp_C(...)
 

Detailed Description

MqContextC - various function to 'get' the configuration-data from a context

Macro Definition Documentation

◆ MQ_GET_MASTER

#define MQ_GET_MASTER ( ctx)
Value:
(MQ_IS_SLAVE(ctx) ? ctx->config.master : ctx)
#define MQ_IS_SLAVE(ctx)

Definition at line 2440 of file LibMqMsgque_mq.h.

◆ MQ_GET_PARENT

#define MQ_GET_PARENT ( ctx)
Value:
(MQ_IS_CHILD(ctx) ? ctx->link.ctxIdP : ctx)
#define MQ_IS_CHILD(ctx)

Definition at line 2439 of file LibMqMsgque_mq.h.

◆ MQ_IS_CHILD

#define MQ_IS_CHILD ( ctx)
Value:
((ctx)->config.parent != NULL)

Definition at line 2433 of file LibMqMsgque_mq.h.

◆ MQ_IS_CLIENT

#define MQ_IS_CLIENT ( ctx)
Value:
(ctx->setup.isServer == false)

Definition at line 2431 of file LibMqMsgque_mq.h.

◆ MQ_IS_CLIENT_PARENT

#define MQ_IS_CLIENT_PARENT ( ctx)
Value:
(MQ_IS_CLIENT(ctx) && MQ_IS_PARENT(ctx))
#define MQ_IS_PARENT(ctx)
#define MQ_IS_CLIENT(ctx)

Definition at line 2432 of file LibMqMsgque_mq.h.

◆ MQ_IS_LOOPBACK

#define MQ_IS_LOOPBACK ( ctx)
Value:
((ctx)->config.io.com == MQ_IO_LOOP)

Definition at line 2437 of file LibMqMsgque_mq.h.

◆ MQ_IS_MASTER

#define MQ_IS_MASTER ( ctx)
Value:
((ctx)->config.master == NULL)

Definition at line 2436 of file LibMqMsgque_mq.h.

◆ MQ_IS_PARENT

#define MQ_IS_PARENT ( ctx)
Value:
((ctx)->config.parent == NULL)

Definition at line 2434 of file LibMqMsgque_mq.h.

◆ MQ_IS_SERVER

#define MQ_IS_SERVER ( ctx)
Value:
(ctx->setup.isServer == true)

extract boolean information from context

Definition at line 2429 of file LibMqMsgque_mq.h.

◆ MQ_IS_SERVER_PARENT

#define MQ_IS_SERVER_PARENT ( ctx)
Value:
(MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))
#define MQ_IS_SERVER(ctx)
extract boolean information from context

Definition at line 2430 of file LibMqMsgque_mq.h.

◆ MQ_IS_SLAVE

#define MQ_IS_SLAVE ( ctx)
Value:
((ctx)->config.master != NULL)

Definition at line 2435 of file LibMqMsgque_mq.h.

◆ MqConfigGetIoTcp_C

#define MqConfigGetIoTcp_C ( ...)
Value:
if (MkErrorCheckI(MqConfigGetIoTcp(__VA_ARGS__)))

Definition at line 79 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcp_E

#define MqConfigGetIoTcp_E ( ...)
Value:
MkErrorCheck(MqConfigGetIoTcp(__VA_ARGS__))

Definition at line 78 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcpL

#define MqConfigGetIoTcpL ( ...)
Value:
MqConfigGetIoTcpL_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 66 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcpL_C

#define MqConfigGetIoTcpL_C ( ...)
Value:
if (MkErrorCheckI(MqConfigGetIoTcpL(__VA_ARGS__)))
#define MqConfigGetIoTcpL(...)

Definition at line 68 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcpL_E

#define MqConfigGetIoTcpL_E ( ...)
Value:
MkErrorCheck(MqConfigGetIoTcpL(__VA_ARGS__))

Definition at line 67 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcpL_e

#define MqConfigGetIoTcpL_e ( ...)
Value:
MK_EMBEDDED(MK_BFL,MqConfigGetIoTcpL,__VA_ARGS__)

Definition at line 69 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcpL_NULL

#define MqConfigGetIoTcpL_NULL ( ...)
Value:
MqConfigGetIoTcpL_RT(MK_RT_CALL_NULL __VA_ARGS__)
#define MK_RT_CALL_NULL

Definition at line 65 of file msgque_overload_mq.h.

◆ MqConfigSetConfigFile

#define MqConfigSetConfigFile ( ...)
Value:
MqConfigSetConfigFile_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 73 of file msgque_overload_mq.h.

◆ MqConfigSetConfigFile_C

#define MqConfigSetConfigFile_C ( ...)
Value:
if (MkErrorCheckI(MqConfigSetConfigFile(__VA_ARGS__)))
#define MqConfigSetConfigFile(...)

Definition at line 75 of file msgque_overload_mq.h.

◆ MqConfigSetConfigFile_E

#define MqConfigSetConfigFile_E ( ...)
Value:
MkErrorCheck(MqConfigSetConfigFile(__VA_ARGS__))

Definition at line 74 of file msgque_overload_mq.h.

◆ MqConfigSetConfigFile_NULL

#define MqConfigSetConfigFile_NULL ( ...)
Value:
MqConfigSetConfigFile_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 72 of file msgque_overload_mq.h.

Function Documentation

◆ MqConfigGetBuffersize()

static MK_I32 libmqmsgque::MqConfigGetBuffersize ( MQ_CTXN const ctx)
inlinestatic

get the minimum of the read/send buffersize of the socket

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the context.config.buffersize(R/S) value

Definition at line 8405 of file LibMqMsgque_mq.h.

8407 {
8408 MK_INSTANCE_HDL(ctx);
8409 return (ctx)->config.io.buffersize;
8410}
#define MK_INSTANCE_HDL(x)
+ Here is the caller graph for this function:

◆ MqConfigGetConfigFile()

config_t * libmqmsgque::MqConfigGetConfigFile ( MQ_CTX const ctx)

get the config-file handle used for libconfig API funtions

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the libmqmsgque::MqConfigS::cfg value or MK_NULL if no config-file is available.

◆ MqConfigGetConfigRoot()

config_setting_t * libmqmsgque::MqConfigGetConfigRoot ( MQ_CTX const ctx)

get the config-root handle used for libconfig API funtions

The root is the place in the config-file which belongs to the MqClassIdentGet application name.

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the libmqmsgque::MqConfigS::rootH value or MK_NULL if no config-root is available.

◆ MqConfigGetIdentFrom()

static enum MqIdentE libmqmsgque::MqConfigGetIdentFrom ( MQ_CTX const ctx)
inlinestatic

get the libmqmsgque::MqConfigS::identFrom

Parameters
[in]ctxthe MqContextS instance to work on
Returns
prefix or factory

Definition at line 8318 of file LibMqMsgque_mq.h.

8320 {
8321 MK_INSTANCE_HDL(ctx);
8322 return ctx->config.identFrom;
8323}
+ Here is the caller graph for this function:

◆ MqConfigGetIoPipe()

static MQ_SOCK_HDL libmqmsgque::MqConfigGetIoPipe ( MQ_CTX const ctx)
inlinestatic

return the libmqmsgque::MqIoPipeConfigS

Parameters
[in]ctxthe MqContextS instance to work on

Definition at line 8510 of file LibMqMsgque_mq.h.

8512 {
8513 MK_INSTANCE_HDL(ctx);
8514 return ctx->config.io.pipe.hdl;
8515}
+ Here is the caller graph for this function:

◆ MqConfigGetIoTcp()

enum MkErrorE libmqmsgque::MqConfigGetIoTcp ( MQ_CTX const ctx,
MK_STRN * host_out,
MK_STRN * port_out,
MK_STRN * myhost_out,
MK_STRN * myport_out )

get the configuration-data of the tcp-client-server-link

Parameters
[in]ctxthe MqContextS instance to work on
[out]host_outclient: name of the remote interface (default: localhost)
server: name of the local interface (default: listen on all interfaces)
[out]port_outclient: name of the remote port
server: name of the local port
[out]myhost_outclient: name of the local interface
[out]myport_outclient: name of the local port
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Attention
  • if the config-value is not defined… the out-value will be set to MK_NULL
  • if the the out-value is MK_NULL … nothing will be done
+ Here is the caller graph for this function:

◆ MqConfigGetIoTcpL_RT()

enum MkErrorE libmqmsgque::MqConfigGetIoTcpL_RT ( MK_RT mkrt,
MQ_CTX const ctx,
MK_BFL * vals_out )

get the configuration-data of the tcp-client-server-link as MkBufferListC

host
clientname of the remote interface (default: localhost)
servername of the local interface (default: listen on all interfaces
port
clientname of the remote port
servername of the local port
myhostname of the local interface
myportname of the local port
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
[out]vals_outthe contain host, port, myhost and myport data
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Attention
the vals_out is owned by ccmqmsgque ... do not free !
+ Here is the caller graph for this function:

◆ MqConfigGetIoUds()

static MK_STRN libmqmsgque::MqConfigGetIoUds ( MQ_CTXN const ctx)
inlinestatic

return the libmqmsgque::MqIoUdsConfigS

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the context.config.io.uds.file value

Definition at line 8442 of file LibMqMsgque_mq.h.

8444 {
8445 MK_INSTANCE_HDL(ctx);
8446 return MkSysStringGetNoNULL(ctx->config.io.uds.file);
8447}
+ Here is the caller graph for this function:

◆ MqConfigGetIsParent()

static bool libmqmsgque::MqConfigGetIsParent ( MQ_CTX const ctx)
inlinestatic

does the context object is a parent ? An objext is a parent id the libmqmsgque::MqConfigS::parent attribute is MK_NULL

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the (ctx->config.parent == NULL) value

Definition at line 8330 of file LibMqMsgque_mq.h.

8332 {
8333 MK_INSTANCE_HDL(ctx);
8334 return MQ_IS_PARENT(ctx);
8335}
+ Here is the caller graph for this function:

◆ MqConfigGetIsServer()

static bool libmqmsgque::MqConfigGetIsServer ( MQ_CTX const ctx)
inlinestatic

does the context object is a server ?

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the (ctx->setup.isServer == true) value

Definition at line 8307 of file LibMqMsgque_mq.h.

8309 {
8310 MK_INSTANCE_HDL(ctx);
8311 return MQ_IS_SERVER(ctx);
8312}
+ Here is the caller graph for this function:

◆ MqConfigGetIsString()

static bool libmqmsgque::MqConfigGetIsString ( MQ_CTX const ctx)
inlinestatic

does the context object is using the string-mode ?

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the (ctx->config.native == 'S') value

Definition at line 8341 of file LibMqMsgque_mq.h.

8343 {
8344 MK_INSTANCE_HDL(ctx);
8345 return (ctx->config.native == MK_NATIVE_IS_STRING);
8346}
+ Here is the caller graph for this function:

◆ MqConfigGetName()

static MK_STRN libmqmsgque::MqConfigGetName ( MQ_CTXN const ctx)
inlinestatic

get the name of the context object

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the context.config.name value
Attention
the string is owned by ccmqmsgque -> do not free !!

Definition at line 8354 of file LibMqMsgque_mq.h.

8356 {
8357 MK_INSTANCE_HDL(ctx);
8358 return MkSysStringGetNoNULL((ctx)->config.dispName);
8359}
+ Here is the caller graph for this function:

◆ MqConfigGetPkgsize()

static MK_I32 libmqmsgque::MqConfigGetPkgsize ( MQ_CTXN const ctx)
inlinestatic

get the maximun size of a BDY package

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the context.config.pkgsize(R/S) value

Definition at line 8417 of file LibMqMsgque_mq.h.

8419 {
8420 MK_INSTANCE_HDL(ctx);
8421 return (ctx)->config.io.pkgsize;
8422}
+ Here is the caller graph for this function:

◆ MqConfigGetPostfix()

static MK_STRN libmqmsgque::MqConfigGetPostfix ( MQ_CTXN const ctx)
inlinestatic

get the libmqmsgque::MqConfigS::dispPostfix

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the value requested
Attention
the string is owned by ccmqmsgque -> do not free !!

Definition at line 8380 of file LibMqMsgque_mq.h.

8382 {
8383 MK_INSTANCE_HDL(ctx);
8384 return MkSysStringGetNoNULL((ctx)->config.dispPostfix);
8385}
+ Here is the caller graph for this function:

◆ MqConfigGetPrefix()

static MK_STRN libmqmsgque::MqConfigGetPrefix ( MQ_CTXN const ctx)
inlinestatic

get the libmqmsgque::MqConfigS::dispPrefix

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the value requested
Attention
the string is owned by ccmqmsgque -> do not free !!

Definition at line 8367 of file LibMqMsgque_mq.h.

8369 {
8370 MK_INSTANCE_HDL(ctx);
8371 return MkSysStringGetNoNULL((ctx)->config.dispPrefix);
8372}
+ Here is the caller graph for this function:

◆ MqConfigGetStartAs()

static enum MqStartE libmqmsgque::MqConfigGetStartAs ( MQ_CTX const ctx)
inlinestatic

return the libmqmsgque::MqConfigS::startAs value

Definition at line 8519 of file LibMqMsgque_mq.h.

8521 {
8522 MK_INSTANCE_HDL(ctx);
8523 return ctx->config.startAs;
8524}
+ Here is the caller graph for this function:

◆ MqConfigGetStatusIs()

static enum MqStatusIsEF libmqmsgque::MqConfigGetStatusIs ( MQ_CTX const ctx)
inlinestatic

return the libmqmsgque::MqContextS::statusIs value

Definition at line 8528 of file LibMqMsgque_mq.h.

8530 {
8531 MK_INSTANCE_HDL(ctx);
8532 return ctx->statusIs;
8533}
+ Here is the caller graph for this function:

◆ MqConfigGetStorage()

static MK_STRN libmqmsgque::MqConfigGetStorage ( MQ_CTXN const ctx)
inlinestatic

get the storage of the context object

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the context.config.storageFile value
Attention
the string is owned by ccmqmsgque -> do not free !!

Definition at line 8393 of file LibMqMsgque_mq.h.

8395 {
8396 MK_INSTANCE_HDL(ctx);
8397 return MkSysStringGetNoNULL((ctx)->config.storageFile);
8398}
+ Here is the caller graph for this function:

◆ MqConfigGetTimeout()

static MK_TIME_T libmqmsgque::MqConfigGetTimeout ( MQ_CTXN const ctx)
inlinestatic

get the timeout value of the context object

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the context.config.timeout value

Definition at line 8429 of file LibMqMsgque_mq.h.

8431 {
8432 MK_INSTANCE_HDL(ctx);
8433 return (ctx)->config.io.timeout;
8434}
+ Here is the caller graph for this function:

◆ MqConfigSetConfigFile_RT()

enum MkErrorE libmqmsgque::MqConfigSetConfigFile_RT ( MK_RT mkrt,
MQ_CTX const ctx,
MK_STRN const filename )

set the config-file and parse for well-known config-items

Read more at libmqmsgque::MqConfigS::cfg

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]filenamename of the config-file for input
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)