end-user configuration data, also available as command-line options More...
#include <LibMqMsgque_mq.h>
Data Fields | ||
enum MkNativeIsE | native | |
define if data is string or little or big endian … | ||
enum MqStartE | startAs | |
create a new application-context as thread, spawn or fork … A new application-context is created if: | ||
MK_STRB | dispname [MqConfigS_dispname_size] | |
set the display-name of the context … The display-name is used as: | ||
MK_STRB | prefix [MqConfigS_prefix_size] | |
set the server-part (1) of the application-identifer MqConfigS::dispname … | ||
MK_STRB | postfix [MqConfigS_postfix_size] | |
set the client-part (2) of the application-identifer MqConfigS::dispname … | ||
MQ_CTX | parent | |
CHILD: a pointer to the parent object or None . | ||
MQ_CTX | master | |
SLAVE: a pointer to the master object or None . | ||
MK_NUM | master_id | |
SLAVE: the ID in the master SLAVES array or O . | ||
struct MqIoConfigS | io | |
Global configuration data belonging to "io". | ||
MK_STRB | storage [MqConfigS_storage_size] | |
struct { | ||
bool dispnameLOCK:1 | ||
protect name More... | ||
bool storageLOCK:1 | ||
protect storage More... | ||
bool prefixLOCK:1 | ||
protect prefix More... | ||
bool postfixLOCK:1 | ||
protect postfix More... | ||
} | bits | |
boolean bit-fields | ||
enum MqIdentE | identFrom | |
select how to identify the application from remote … | ||
config_t * | cfg | |
add libconfig configuration file … | ||
config_setting_t * | rootH | |
libconfig data root | ||
config_setting_t * | filterH | |
libconfig data root | ||
end-user configuration data, also available as command-line options
Definition at line 1691 of file LibMqMsgque_mq.h.
struct { ... } MqConfigS::bits |
boolean bit-fields
config_t* MqConfigS::cfg |
add libconfig configuration file …
A config-file is used to add configuration-values to a libmqmsgque-application using a structured text-file.
A service-callback and "programming" is not supported. To "programm and modify" something use a scripting language like tcl or python.
libconfig is used to parse a config-file using the application … --config fileName …
option.
The following restrictions apply to the --config
option.
--config
option is parsed groupname : { ... }
( ":" or "=" is allowed ) MyClient … --XXX … --config YYY … --ZZZ …
MyClient
: XXX < YYY < ZZZ MyClient --AAA … --config BBB --CCC … @ Filter3 --name otto --DDD … @ MyServer --EEE …
application | groupname | option-parsing-order |
---|---|---|
MyClient | MyClient | AAA < BBB < CCC |
Filter3 | otto | DDD < BBB |
MyServer | MyServer | EEE < BBB |
--name
or --prefix
option from DDD
or EEE
change the group read from the config-file --config
option--config
option overwrite the options from the config-file groupname : { … filter : [ … ] }
) config-file-option define the server to start in a pipe and have to be an array of strings starting with the application-executable OR the factory-identifer 1. Example from MyClient.config
→ filter-pipeline with last server start in debug mode
2. Example from libconfig.test
→ filter-pipeline with last server connect by tcp/ip
Definition at line 1899 of file LibMqMsgque_mq.h.
MK_STRB MqConfigS::dispname[MqConfigS_dispname_size] |
set the display-name of the context … The display-name is used as:
C> (dispname) [2009-01-12:16-22-27] [4-0-sIoCheckArg]: option: io->com = PIPE
The dispname is initialized with:
ctx.ConfigSetName(data:string)
, ctx.ConfigSetPrefix(data:string)
, ctx.ConfigSetPostfix(data:string)
function prefix | postfix | dispname |
---|---|---|
client | -1-1 | client-1-1 |
ctx.ConfigSetName(data:string)
or --name stringDefinition at line 1746 of file LibMqMsgque_mq.h.
bool MqConfigS::dispnameLOCK |
protect name
Definition at line 1803 of file LibMqMsgque_mq.h.
config_setting_t* MqConfigS::filterH |
libconfig data root
Definition at line 1905 of file LibMqMsgque_mq.h.
enum MqIdentE MqConfigS::identFrom |
select how to identify the application from remote …
An application has TWO possible names:
The --ident-from prefix|factory value decide which on is used.
The application-identification is defined by MqConfigS::identFrom :
MqFactoryS::originalIdent | if ident == MQ_IDENT_FACTORY |
MqConfigS::prefix | if ident == MQ_IDENT_PREFIX (default) |
The MqFactoryS::originalIdent is the official name of the MqFactoryC and is defined by the application-programmer with MqFactoryAdd or MqFactoryDup2.
The MqConfigS::prefix is the official name of the MqContextC that startet first, usually the server-name, and is set by the application-user with --prefix string at startup or with the MqConfigSetPrefix at setup.
When the server starts, the MqClassIdentGet value is send from the server to the client and the client initializes the MqLinkS::targetIdent with this value. This value identifes the server from remote and is used by the MqContextC ROUTE API to select which server receive the routing-package.
The client usually get the factory and the idenfication from the: MqFactoryInitial.
Example: Change the factory-identifier of MqFactoryInitial to the value "TestClient" with:
C# | MqFactoryC.Get("initial").Dup2("TestClient").Initial() |
TCL | [[tclmsgque::MqFactoryC Get "initial"] Dup2 "TestClient"] Initial |
Definition at line 1847 of file LibMqMsgque_mq.h.
struct MqIoConfigS MqConfigS::io |
Global configuration data belonging to "io".
Definition at line 1790 of file LibMqMsgque_mq.h.
MQ_CTX MqConfigS::master |
SLAVE: a pointer to the master object or None
.
Definition at line 1784 of file LibMqMsgque_mq.h.
MK_NUM MqConfigS::master_id |
SLAVE: the ID in the master SLAVES array or O
.
Definition at line 1787 of file LibMqMsgque_mq.h.
enum MkNativeIsE MqConfigS::native |
define if data is string or little or big endian …
Definition at line 1694 of file LibMqMsgque_mq.h.
MQ_CTX MqConfigS::parent |
CHILD: a pointer to the parent object or None
.
Definition at line 1781 of file LibMqMsgque_mq.h.
MK_STRB MqConfigS::postfix[MqConfigS_postfix_size] |
set the client-part (2) of the application-identifer MqConfigS::dispname …
The postfix is used for:
The postfix is initialize with:
ctx.ConfigSetPostfix(data:string)
functionDefinition at line 1778 of file LibMqMsgque_mq.h.
bool MqConfigS::postfixLOCK |
protect postfix
Definition at line 1806 of file LibMqMsgque_mq.h.
MK_STRB MqConfigS::prefix[MqConfigS_prefix_size] |
set the server-part (1) of the application-identifer MqConfigS::dispname …
The prefix is used for:
The prefix is initialize with:
ctx.ConfigSetPrefix(data:string)
or the ctx.ConfigSetName(data:string)
functionDefinition at line 1763 of file LibMqMsgque_mq.h.
bool MqConfigS::prefixLOCK |
protect prefix
Definition at line 1805 of file LibMqMsgque_mq.h.
config_setting_t* MqConfigS::rootH |
libconfig data root
Definition at line 1902 of file LibMqMsgque_mq.h.
enum MqStartE MqConfigS::startAs |
create a new application-context as thread, spawn or fork … A new application-context is created if:
The allowed integer values for MqConfigS::startAs are:
(default: do not create a new application-context)
Definition at line 1716 of file LibMqMsgque_mq.h.
MK_STRB MqConfigS::storage[MqConfigS_storage_size] |
Definition at line 1800 of file LibMqMsgque_mq.h.
bool MqConfigS::storageLOCK |
protect storage
Definition at line 1804 of file LibMqMsgque_mq.h.