This function adds buffers for measurement values to a dynamic data transfer channel. One buffer must be provided per measurement channel, which is used in the dynamic measurement.
Definition
MSC_STATUS
MSC_AttachSubChannelBuffer(
MSC_HANDLE Handle,
unsigned char OpCode,
unsigned char SubChannel,
unsigned long BufferSize,
void* Buffer
);
Parameter
Handle
Device-Handle, which has been returned by a previous call of the function MSC_OpenDevice.
Opcode
The opcode of the dynamic measurement (opcRDM1 or opcRDM2).
SubChannel
Number of the measurement channel. The number of the first measurement channel is 0. It must be smaller than "NumberOfSubChannels" in the function MSC_SetupExtendedDynamicChannel.
BufferSize
Size of the measurement buffer. Each measurement value requires 4 bytes.
If for example 1.000 measurement values per channel shall be sampled, a buffer size of 4.000 bytes is required.
Buffer
Pointer to the buffer for the measurement values. Its size must be at least "BufferSize".
Return value
If successful, MSC_STATUS_SUCCESS will be returned. In case of an error, an error code will be returned.
Comments
The memory for the buffer must be allocated by the application. It must be permanent, until it is detached using the function MSC_DetachSubChannelBuffers.
This function must be called once per measurement channel used for the dynamic measurement.
The opcode is the same, as it has been used for MSC_SetupExtendedDynamicChannel.
See also
MSC_SetupExtendedDynamicChannel