WRITEC_f Block
This block writes the data in binary `C' file. It has one control port and one input port. Generally file is saved in the same directory where *.xcos file is saved but user can change the name and path of the writing file. Before using this block, user must have writing permissions.
Input Size : It is size of input column vector. A scalar that determines the how many columns of data values are used to form a record. This description must be read with the data output format description. Suppose, we have define integer datatype data format and input size is 2 then total 8 bytes shall be used to write a record of data in binary form. The data received at input port of WRITEC_f block must be of same size as defined in the Input Size option.
Output File Name : It is a file name or path file name where data would be written. Its value is string of characters.
Output Format : A character string defining the data format to use. Strings ``l", ``i", ``s", ``ul", ``ui", ``us", ``d", ``f", ``c", ``uc" are used respectively to write int32, int16, int8, uint32, uint16, uint8, double, float, char or unsigned char data type.
Buffer Size : It is similar to the number of bytes read by fread function of C language.
Swap Mode : If swap mode=1 then file is supposed to be coded in ``little endian IEEE format" and data are swapped if necessary to match the IEEE format of the processor. If Swap mode=0 then automatic bytes swap is disabled.
In this figure, we have explained that the character type data with size two is saved in binary format. First byte is for one of the two data elements of a record and second byte is for other of the two data elements of a record. The number of bytes required depends on the type of data and size of data. A character data type requires one byte memory space and if record size is two then two bytes are required to save a record. Note that, index origin has been implemented in different programming languages differently. The equivalent decimal number in each memory byte represents the binary value saved in that memory cell.