Sending data is an active task. Active mean, that the sending have to be triggered by the software-workflow.
Sending data is a sequence of commands to prepare a data-package and one command to send this package.
MqSendSTART (ctx); MqSendI (ctx, myInteger); MqSendC (ctx, "myString"); MqErrorCheck (MqSendEND (ctx, "IDNT", NULL));
MqSendSTART (ctx); MqSendI (ctx, myInteger); MqSendC (ctx, "myString"); MqErrorCheck (MqSendRETURN (ctx));
ctx.SendSTART();
ctx.SendI(myInteger);
ctx.sendC(myString);
ctx.SendEND("IDNT");
ctx.SendSTART(); ctx.SendI(myInteger); ctx.sendC(myString); ctx.SendRETURN();
ctx.SendSTART()
ctx.SendI(myInteger)
ctx.sendC(myString)
ctx.SendEND("IDNT")
ctx.SendSTART() ctx.SendI(myInteger) ctx.sendC(myString) ctx.SendRETURN()
$ctx SendSTART $ctx SendI myInteger $ctx sendC myString $ctx SendEND IDNT
$ctx SendSTART $ctx SendI myInteger $ctx sendC myString $ctx SendRETURN
$ctx->SendSTART $ctx->SendI myInteger $ctx->sendC myString $ctx->SendEND IDNT
$ctx->SendSTART $ctx->SendI myInteger $ctx->sendC myString $ctx->SendRETURN
| command | description | C | C++ | C# | java | python | tcl | perl | VB.NET |
|---|---|---|---|---|---|---|---|---|---|
| MqSendEND | Do a service-call without return data | YES | YES | YES | YES | YES | YES | YES | YES |
| MqSendEND_AND_WAIT | Do a synchronous service-call with return data | YES | YES | YES | YES | YES | YES | YES | YES |
| MqSendEND_AND_CALLBACK | Do a asynchronous service-call with return data | YES | YES | YES | YES | YES | YES | YES | YES |
To send a data-package is one task, to send it to the right receiver is an other one. The right receiver is identified with the token parameter argument. This parameter have to be a 4 character string. You'll probably ask "why 4?" the answer is that this string have should be "human" readable and easy to "compare". As solution this string is mapped to a 4 byte integer used to find the proper key/value entry in the service-hash-table on the server. (in short: to search an integer is much faster as to search a string)
To setup a passive task two requirements are necessary:
MqErrorCheck (MqServiceCreate (ctx, "ECUL", Ot_ECUL, NULL, NULL)) ;
MqErrorCheck (MqSendEND_AND_CALLBACK(ctx, "ECUL", RET_ECUL, NULL, NULL));
ctx.ServiceCreate("ECUL", CallbackF(&MyClass::CNFG)); or ctx.ServiceCreate("ECUL", static_cast<IService*>(MyObject));
ctx.SendEND_AND_CALLBACK("ECUL", CallbackF(&MyClass::RET_ECUL())); or ctx.SendEND_AND_CALLBACK("ECUL", static_cast<IService*>(MyObject));
ctx.ServiceCreate("ECUL", new Ot_ECUL()); or ctx.ServiceCreate("ECUL", Ot_ECUL_delegeate));
ctx.SendEND_AND_CALLBACK("ECUL", new RET_ECUL()); or ctx.SendEND_AND_CALLBACK("ECUL", RET_ECUL_delegate);
ctx.ServiceCreate("ECUL", new Ot_ECUL());
ctx.SendEND_AND_CALLBACK("ECUL", new RET_ECUL());
ctx.ServiceCreate("ECUL", Ot_ECUL)
ctx.SendEND_AND_CALLBACK("ECUL", RET_ECUL)
$ctx ServiceCreate ECUL Ot_ECUL
$ctx SendEndAndCallback ECUL RET_ECUL
$ctx->ServiceCreate("ECUL", Ot_ECUL);
$ctx->SendEND_AND_CALLBACK("ECUL", \&RET_ECUL);
ctx.ServiceCreate("ECUL", AddressOf Ot_ECUL)
ctx.SendEND_AND_CALLBACK("ECUL", AddressOf RET_ECUL)
MqErrorCheck (MqProcessEvent (msgque, 10, MQ_WAIT | MQ_WAIT_FOREVER));
ctx.ProcessEvent(10, MQ_WAIT_FOREVER);
ctx.ProcessEvent(10, MqS.WAIT.FOREVER);
ctx.ProcessEvent(10, MqS.WAIT.FOREVER);
ctx.ProcessEvent(timeout=10, wait="FOREVER")
$ctx ProcessEvent -timeout 10 -wait FOREVER
$ctx->ProcessEvent({timeout => 10, wait => "FOREVER"});
ctx.ProcessEvent(10, MqS.WAIT.FOREVER)
MqErrorCheck (MqReadI (ctx, &myInteger)); MqErrorCheck (MqReadC (ctx, &myString));
myInteger = ctx.ReadI(); myString = ctx.ReadC();
myInteger = ctx.ReadI() myString = ctx.ReadC()
myInteger = $ctx->ReadI(); myString = $ctx->ReadC();
MqReadI is not compatible with the next available type in the data-package.
1.5.8