theLink 10.0
Loading...
Searching...
No Matches
MqContextC_ReadApi_CS_API

MqContextC - extract data from an incoming read-data-packageMore...

+ Collaboration diagram for MqContextC_ReadApi_CS_API:

Topics

 MqContextC_ReadApi_Atom_CS_API
 MqContextC - read a single-data-item outof a read-data-package
 
 MqContextC_ReadApi_Block_CS_API
 MqContextC - read a block-of-data outof a read-data-package
 
 MqContextC_ReadApi_Misc_CS_API
 MqContextC - various functions to work on a read-data-package
 
object csmqmsgque.MqContextC.ReadNEXT ()
  C#: object ctx.ReadNEXT() C-API
get the next argument as native object …
 
List< object > csmqmsgque.MqContextC.ReadLIST ()
  C#: List<object> ctx.ReadLIST() C-API
get all arguments as native list …
 

Detailed Description

MqContextC - extract data from an incoming read-data-package

A data-package is read in two different scenarios:

Reading data is a passive-task and the opposite of sending data, which is an active-task. Passive means that the reading process is triggered by an incoming-data-package and not by the software workflow or by the user.
There is a read function and some help functions for each basic type defined in MkBufferC .

Read-Safe
Each service-call has a private read-data-package. This means that during a service-call that is in progress, another service-call can be served without damaging the read-data-package of the current service-call.
Type-Safe
A data-item in a read-data-package is type safe, this mean that every read of a data-item have to match the data-type of the previous write. One exception is available, the cast from and to the string data-type (TYPE=C) is allowed.

Example from server.cs read-safety: Make a nested service-call

    private void CSV1 () {
      // read the input-data from the CSV1-service-call
      // client → server
      var inI = ReadI32() + 1;

      // call the CSV2-service at the client, wait 10sec for timeout
      // server → client → server
      var retI = ((int)Send("Wt", 10, "CSV2:I@I", inI)) + 1;

      // answer the CSV1-service-call with the result from the CSV2-service-call
      // server → client
      Send("R", "I", retI);
    }

Function Documentation

◆ ReadLIST()

List< object > csmqmsgque.MqContextC.ReadLIST ( )
inline

C#: List<object> ctx.ReadLIST() C-API
get all arguments as native list …

Definition at line 204 of file MqContextC.cs.

204 {
205 return ReadALL().ToList();
206 }
List< object > ToList()
MkBufferListC ReadALL(MkBufferListC val_inout=null)
C#: MkBufferListC ctx.ReadALL(MkBufferListC val_inout = null) → C-API get a temporary MkBufferL...

◆ ReadNEXT()

object csmqmsgque.MqContextC.ReadNEXT ( )
inline

C#: object ctx.ReadNEXT() C-API
get the next argument as native object …

Definition at line 199 of file MqContextC.cs.

199 {
200 return ReadBUF().ToObject();
201 }
MkBufferC ReadBUF()
C#: MkBufferC ctx.ReadBUF() → C-API get a temporary MkBufferC from the read-data-package …