libmqmsgque 9.0
Loading...
Searching...
No Matches
Functions
MqContextC_ConfigApi_Get_C_API

various function to 'get' configuration-data from a MqContextCMore...

+ Collaboration diagram for MqContextC_ConfigApi_Get_C_API:

Functions

MQ_EXTERN MK_INT MqConfigGetBuffersizeP (MQ_CTXN const ctx)
 Non-inline replacement for MqConfigGetBuffersize
 
MQ_EXTERN enum MqIdentE MqConfigGetIdentFromP (MQ_CTX const ctx)
 Non-inline replacement for MqConfigGetIdentFrom
 
MQ_EXTERN MQ_SOCK_HDL MqConfigGetIoPipeP (MQ_CTX const ctx)
 Non-inline replacement for MqConfigGetIoPipe
 
MQ_EXTERN MK_STRN MqConfigGetIoUdsP (MQ_CTXN const ctx)
 Non-inline replacement for MqConfigGetIoUds
 
MQ_EXTERN MK_BOOL MqConfigGetIsParentP (MQ_CTX const ctx)
 Non-inline replacement for MqConfigGetIsParent
 
MQ_EXTERN MK_BOOL MqConfigGetIsServerP (MQ_CTX const ctx)
 Non-inline replacement for MqConfigGetIsServer
 
MQ_EXTERN MK_BOOL MqConfigGetIsStringP (MQ_CTX const ctx)
 Non-inline replacement for MqConfigGetIsString
 
MQ_EXTERN MK_STRN MqConfigGetNameP (MQ_CTXN const ctx)
 Non-inline replacement for MqConfigGetName
 
MQ_EXTERN MK_INT MqConfigGetPkgsizeP (MQ_CTXN const ctx)
 Non-inline replacement for MqConfigGetPkgsize
 
MQ_EXTERN MK_STRN MqConfigGetPostfixP (MQ_CTXN const ctx)
 Non-inline replacement for MqConfigGetPostfix
 
MQ_EXTERN MK_STRN MqConfigGetPrefixP (MQ_CTXN const ctx)
 Non-inline replacement for MqConfigGetPrefix
 
MQ_EXTERN enum MqStartE MqConfigGetStartAsP (MQ_CTX const ctx)
 Non-inline replacement for MqConfigGetStartAs
 
MQ_EXTERN enum MqStatusIsEF MqConfigGetStatusIsP (MQ_CTX const ctx)
 Non-inline replacement for MqConfigGetStatusIs
 
MQ_EXTERN MK_STRN MqConfigGetStorageP (MQ_CTXN const ctx)
 Non-inline replacement for MqConfigGetStorage
 
MQ_EXTERN MK_TIME_T MqConfigGetTimeoutP (MQ_CTXN const ctx)
 Non-inline replacement for MqConfigGetTimeout
 
MK_ATTR_HDL bool MqConfigGetIsServer (MQ_CTX const ctx)
 does the context object is a server ?
 
MK_ATTR_HDL enum MqIdentE MqConfigGetIdentFrom (MQ_CTX const ctx)
 get the MqConfigS::identFrom
 
MK_ATTR_HDL bool MqConfigGetIsParent (MQ_CTX const ctx)
 does the context object is a parent ? An objext is a parent id the MqConfigS::parent attribute is NULL
 
MK_ATTR_HDL bool MqConfigGetIsString (MQ_CTX const ctx)
 does the context object is using the string-mode ?
 
MK_ATTR_HDL MK_STRN MqConfigGetName (MQ_CTXN const ctx)
 get the name of the context object
 
MK_ATTR_HDL MK_STRN MqConfigGetPrefix (MQ_CTXN const ctx)
 get the MqConfigS::prefix
 
MK_ATTR_HDL MK_STRN MqConfigGetPostfix (MQ_CTXN const ctx)
 get the MqConfigS::postfix
 
MK_ATTR_HDL MK_STRN MqConfigGetStorage (MQ_CTXN const ctx)
 get the storage of the context object
 
MK_ATTR_HDL MK_INT MqConfigGetBuffersize (MQ_CTXN const ctx)
 get the minimum of the read/send buffersize of the socket
 
MK_ATTR_HDL MK_INT MqConfigGetPkgsize (MQ_CTXN const ctx)
 get the maximun size of a BDY package
 
MK_ATTR_HDL MK_TIME_T MqConfigGetTimeout (MQ_CTXN const ctx)
 get the timeout value of the context object
 
MK_ATTR_HDL MK_STRN MqConfigGetIoUds (MQ_CTXN const ctx)
 return the MqIoUdsConfigS
 
MQ_EXTERN enum MkErrorE MqConfigGetIoTcp (MQ_CTX const ctx, MK_STRN *host_out, MK_STRN *port_out, MK_STRN *myhost_out, MK_STRN *myport_out) MK_ATTR_HDL
 get the configuration-data of the tcp-client-server-link
 
MQ_EXTERN enum MkErrorE MqConfigGetIoTcpL (MQ_CTX const ctx, MK_BFL *vals_out) MK_ATTR_HDL
 get the configuration-data of the tcp-client-server-link as MkBufferListC
 
MK_ATTR_HDL MQ_SOCK_HDL MqConfigGetIoPipe (MQ_CTX const ctx)
 return the MqIoPipeConfigS
 
MK_ATTR_HDL enum MqStartE MqConfigGetStartAs (MQ_CTX const ctx)
 return the MqConfigS::startAs value
 
MK_ATTR_HDL enum MqStatusIsEF MqConfigGetStatusIs (MQ_CTX const ctx)
 return the MqContextS::statusIs value
 
MQ_EXTERN config_tMqConfigGetConfigFile (MQ_CTX const ctx) MK_ATTR_HDL
 get the config-file handle used for libconfig API funtions
 
MQ_EXTERN config_setting_tMqConfigGetConfigRoot (MQ_CTX const ctx) MK_ATTR_HDL
 get the config-root handle used for libconfig API funtions
 
MQ_EXTERN enum MkErrorE MqConfigSetConfigFile_RT (MK_RT const 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)   (ctx->setup.isServer == true)
 extract boolean information from context
 
#define MQ_IS_SERVER_PARENT(ctx)   (MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))
 
#define MQ_IS_CLIENT(ctx)   (ctx->setup.isServer == false)
 
#define MQ_IS_CLIENT_PARENT(ctx)   (MQ_IS_CLIENT(ctx) && MQ_IS_PARENT(ctx))
 
#define MQ_IS_CHILD(ctx)   ((ctx)->config.parent != NULL)
 
#define MQ_IS_PARENT(ctx)   ((ctx)->config.parent == NULL)
 
#define MQ_IS_SLAVE(ctx)   ((ctx)->config.master != NULL)
 
#define MQ_IS_MASTER(ctx)   ((ctx)->config.master == NULL)
 
#define MQ_IS_LOOPBACK(ctx)   ((ctx)->config.io.com == MQ_IO_LOOP)
 
#define MQ_GET_PARENT(ctx)   (MQ_IS_CHILD(ctx) ? ctx->link.ctxIdP : ctx)
 
#define MQ_GET_MASTER(ctx)   (MQ_IS_SLAVE(ctx) ? ctx->config.master : ctx)
 

Overload

#define MqConfigGetIoTcpL_E(...)   MkErrorCheck(MqConfigGetIoTcpL(__VA_ARGS__))
 
#define MqConfigGetIoTcpL_C(...)   if (MkErrorCheckI(MqConfigGetIoTcpL(__VA_ARGS__)))
 
#define MqConfigGetIoTcpL_e(...)   MK_EMBEDDED(MK_BFL,MqConfigGetIoTcpL,__VA_ARGS__)
 
#define MqConfigSetConfigFile(...)   MqConfigSetConfigFile_RT(MK_RT_CALL __VA_ARGS__)
 
#define MqConfigSetConfigFile_E(...)   MkErrorCheck(MqConfigSetConfigFile(__VA_ARGS__))
 
#define MqConfigSetConfigFile_C(...)   if (MkErrorCheckI(MqConfigSetConfigFile(__VA_ARGS__)))
 
#define MqConfigGetIoTcp_E(...)   MkErrorCheck(MqConfigGetIoTcp(__VA_ARGS__))
 
#define MqConfigGetIoTcp_C(...)   if (MkErrorCheckI(MqConfigGetIoTcp(__VA_ARGS__)))
 

Detailed Description

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

Macro Definition Documentation

◆ MQ_GET_MASTER

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

Definition at line 2350 of file msgque_mq.h.

◆ MQ_GET_PARENT

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

Definition at line 2349 of file msgque_mq.h.

◆ MQ_IS_CHILD

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

Definition at line 2343 of file msgque_mq.h.

◆ MQ_IS_CLIENT

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

Definition at line 2341 of file msgque_mq.h.

◆ MQ_IS_CLIENT_PARENT

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

Definition at line 2342 of file msgque_mq.h.

◆ MQ_IS_LOOPBACK

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

Definition at line 2347 of file msgque_mq.h.

◆ MQ_IS_MASTER

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

Definition at line 2346 of file msgque_mq.h.

◆ MQ_IS_PARENT

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

Definition at line 2344 of file msgque_mq.h.

◆ MQ_IS_SERVER

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

extract boolean information from context

Definition at line 2339 of file msgque_mq.h.

◆ MQ_IS_SERVER_PARENT

#define MQ_IS_SERVER_PARENT (   ctx)    (MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))

Definition at line 2340 of file msgque_mq.h.

◆ MQ_IS_SLAVE

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

Definition at line 2345 of file msgque_mq.h.

◆ MqConfigGetIoTcp_C

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

Definition at line 168 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcp_E

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

Definition at line 167 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcpL_C

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

Definition at line 156 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcpL_E

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

Definition at line 155 of file msgque_overload_mq.h.

◆ MqConfigGetIoTcpL_e

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

Definition at line 157 of file msgque_overload_mq.h.

◆ MqConfigSetConfigFile

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

Definition at line 161 of file msgque_overload_mq.h.

◆ MqConfigSetConfigFile_C

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

Definition at line 163 of file msgque_overload_mq.h.

◆ MqConfigSetConfigFile_E

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

Definition at line 162 of file msgque_overload_mq.h.

Function Documentation

◆ MqConfigGetBuffersize()

MK_ATTR_HDL MK_INT MqConfigGetBuffersize ( MQ_CTXN const  ctx)
inline

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 7739 of file msgque_mq.h.

◆ MqConfigGetBuffersizeP()

MQ_EXTERN MK_INT MqConfigGetBuffersizeP ( MQ_CTXN const  ctx)

Non-inline replacement for MqConfigGetBuffersize

◆ MqConfigGetConfigFile()

MQ_EXTERN config_t * 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 MqConfigS::cfg value or NULL if no config-file is available.

◆ MqConfigGetConfigRoot()

MQ_EXTERN config_setting_t * MqConfigGetConfigRoot ( MQ_CTX const  ctx)

get the config-root handle used for libconfig API funtions

The root ist the place in the config-file which belongs to the ClassIdentGet application name.

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

◆ MqConfigGetIdentFrom()

MK_ATTR_HDL enum MqIdentE MqConfigGetIdentFrom ( MQ_CTX const  ctx)
inline

get the MqConfigS::identFrom

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

Definition at line 7659 of file msgque_mq.h.

◆ MqConfigGetIdentFromP()

MQ_EXTERN enum MqIdentE MqConfigGetIdentFromP ( MQ_CTX const  ctx)

Non-inline replacement for MqConfigGetIdentFrom

◆ MqConfigGetIoPipe()

MK_ATTR_HDL MQ_SOCK_HDL MqConfigGetIoPipe ( MQ_CTX const  ctx)
inline

return the MqIoPipeConfigS

Parameters
[in]ctxthe MqContextS instance to work on

Definition at line 7838 of file msgque_mq.h.

◆ MqConfigGetIoPipeP()

MQ_EXTERN MQ_SOCK_HDL MqConfigGetIoPipeP ( MQ_CTX const  ctx)

Non-inline replacement for MqConfigGetIoPipe

◆ MqConfigGetIoTcp()

MQ_EXTERN enum MkErrorE 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
Returns
set the MkErrorC to the status MK_OK, MK_CONTINUE or MK_ERROR
Attention
  • if the config-value is not defined… the out-value will be set to NULL
  • if the the out-value is NULL… nothing will be done

◆ MqConfigGetIoTcpL()

MQ_EXTERN enum MkErrorE MqConfigGetIoTcpL ( 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]ctxthe MqContextS instance to work on
[out]vals_outthe contain host, port, myhost and myport data
Returns
set the MkErrorC to the status MK_OK, MK_CONTINUE or MK_ERROR
Attention
the vals_out is owned by libmqmsgque ... do not free !

◆ MqConfigGetIoUds()

MK_ATTR_HDL MK_STRN MqConfigGetIoUds ( MQ_CTXN const  ctx)
inline

return the MqIoUdsConfigS

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

Definition at line 7773 of file msgque_mq.h.

◆ MqConfigGetIoUdsP()

MQ_EXTERN MK_STRN MqConfigGetIoUdsP ( MQ_CTXN const  ctx)

Non-inline replacement for MqConfigGetIoUds

◆ MqConfigGetIsParent()

MK_ATTR_HDL bool MqConfigGetIsParent ( MQ_CTX const  ctx)
inline

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

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

Definition at line 7670 of file msgque_mq.h.

◆ MqConfigGetIsParentP()

MQ_EXTERN MK_BOOL MqConfigGetIsParentP ( MQ_CTX const  ctx)

Non-inline replacement for MqConfigGetIsParent

◆ MqConfigGetIsServer()

MK_ATTR_HDL bool MqConfigGetIsServer ( MQ_CTX const  ctx)
inline

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 7649 of file msgque_mq.h.

◆ MqConfigGetIsServerP()

MQ_EXTERN MK_BOOL MqConfigGetIsServerP ( MQ_CTX const  ctx)

Non-inline replacement for MqConfigGetIsServer

◆ MqConfigGetIsString()

MK_ATTR_HDL bool MqConfigGetIsString ( MQ_CTX const  ctx)
inline

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 7680 of file msgque_mq.h.

◆ MqConfigGetIsStringP()

MQ_EXTERN MK_BOOL MqConfigGetIsStringP ( MQ_CTX const  ctx)

Non-inline replacement for MqConfigGetIsString

◆ MqConfigGetName()

MK_ATTR_HDL MK_STRN MqConfigGetName ( MQ_CTXN const  ctx)
inline

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 libmqmsgque -> do not free !!

Definition at line 7692 of file msgque_mq.h.

◆ MqConfigGetNameP()

MQ_EXTERN MK_STRN MqConfigGetNameP ( MQ_CTXN const  ctx)

Non-inline replacement for MqConfigGetName

◆ MqConfigGetPkgsize()

MK_ATTR_HDL MK_INT MqConfigGetPkgsize ( MQ_CTXN const  ctx)
inline

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 7750 of file msgque_mq.h.

◆ MqConfigGetPkgsizeP()

MQ_EXTERN MK_INT MqConfigGetPkgsizeP ( MQ_CTXN const  ctx)

Non-inline replacement for MqConfigGetPkgsize

◆ MqConfigGetPostfix()

MK_ATTR_HDL MK_STRN MqConfigGetPostfix ( MQ_CTXN const  ctx)
inline

get the MqConfigS::postfix

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

Definition at line 7716 of file msgque_mq.h.

◆ MqConfigGetPostfixP()

MQ_EXTERN MK_STRN MqConfigGetPostfixP ( MQ_CTXN const  ctx)

Non-inline replacement for MqConfigGetPostfix

◆ MqConfigGetPrefix()

MK_ATTR_HDL MK_STRN MqConfigGetPrefix ( MQ_CTXN const  ctx)
inline

get the MqConfigS::prefix

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

Definition at line 7704 of file msgque_mq.h.

◆ MqConfigGetPrefixP()

MQ_EXTERN MK_STRN MqConfigGetPrefixP ( MQ_CTXN const  ctx)

Non-inline replacement for MqConfigGetPrefix

◆ MqConfigGetStartAs()

MK_ATTR_HDL enum MqStartE MqConfigGetStartAs ( MQ_CTX const  ctx)
inline

return the MqConfigS::startAs value

Definition at line 7846 of file msgque_mq.h.

◆ MqConfigGetStartAsP()

MQ_EXTERN enum MqStartE MqConfigGetStartAsP ( MQ_CTX const  ctx)

Non-inline replacement for MqConfigGetStartAs

◆ MqConfigGetStatusIs()

MK_ATTR_HDL enum MqStatusIsEF MqConfigGetStatusIs ( MQ_CTX const  ctx)
inline

return the MqContextS::statusIs value

Definition at line 7854 of file msgque_mq.h.

◆ MqConfigGetStatusIsP()

MQ_EXTERN enum MqStatusIsEF MqConfigGetStatusIsP ( MQ_CTX const  ctx)

Non-inline replacement for MqConfigGetStatusIs

◆ MqConfigGetStorage()

MK_ATTR_HDL MK_STRN MqConfigGetStorage ( MQ_CTXN const  ctx)
inline

get the storage of the context object

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

Definition at line 7728 of file msgque_mq.h.

◆ MqConfigGetStorageP()

MQ_EXTERN MK_STRN MqConfigGetStorageP ( MQ_CTXN const  ctx)

Non-inline replacement for MqConfigGetStorage

◆ MqConfigGetTimeout()

MK_ATTR_HDL MK_TIME_T MqConfigGetTimeout ( MQ_CTXN const  ctx)
inline

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 7761 of file msgque_mq.h.

◆ MqConfigGetTimeoutP()

MQ_EXTERN MK_TIME_T MqConfigGetTimeoutP ( MQ_CTXN const  ctx)

Non-inline replacement for MqConfigGetTimeout

◆ MqConfigSetConfigFile_RT()

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

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

Read more at 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
Returns
set the MkErrorC to the status MK_OK, MK_CONTINUE or MK_ERROR