Show/Hide Toolbars

Irinos Measurement System

Navigation: MscDll Reference Guide > API (programming interface) > Static transfer channels

MSC_SetupStaticChannel

Scroll Prev Top Next More

This function initializes a static data transfer channel. It is used to exchange data between the MscDll and the Irinos-System automatically and continuously.

 

Definition


MSC_STATUS
MSC_SetupStaticChannel(
    MSC_HANDLE Handle,
    unsigned char OpCode,
    unsigned long SndBufferSize,
    void* SndBuffer,
    unsigned long RcvBufferSize
);

 

Parameter


Handle

Device-Handle, which has been returned by a previous call of the function MSC_OpenDevice.

Opcode

Opcode for the static channel:
opcRS for reading static measurement values.
opcRHS for reading the hardware status.
opcBIO for exchanging Bit I/O data.

SndBufferSize

Size of the data, which shall be sent.

SndBuffer

Buffer with data, which shall be sent. Minimum size is „SndBufferSize“.

RcvBufferSize

Maximum size of the receive data.

 

Return value


If successful, MSC_STATUS_SUCCESS will be returned. In case of an error, an error code will be returned.

 

Comments


The MscDll uses an internal buffer for the receive data. It is overwritten if new data is received. The application has no access to this internal buffer. It needs to be read using the function MSC_ReadStatic.

The opcode is either opcRS, opcRHS or opcBIO.

The send buffer is not used for opcRS. Nevertheless, it must always be defined having a minimum size of 1 byte.

If data in the send buffer is changes, the MscDll must be informed via the function MSC_RefreshChannel.

 

See also


MSC_OpenDevice

MSC_Start

MSC_ReadStatic

MSC_RefreshChannel