Types and Enums
CSVCore_typ
Name | Type | Description |
---|---|---|
cfg | CSVCoreCfg_typ | Configurations for csvCore |
out | CSVCoreOut_typ | Outputs for csvCore |
predef | CSVPredef_typ | Default predef |
internal | CSVCoreInternal_typ | Configurations for myStructure |
csvCore.cfg
Name | Type | Description |
---|---|---|
delim | USINT | Character used to deliminate between cells, defaults to ‘,’ |
comment | STRING[5] | Character or Characters used to for comments |
headerRow | UDINT | Index of row containing header. 0 Indicates no header is present |
quoteCharacter | USINT | Quote character to be used for escaping strings: " or ' |
quoteUnescaping | BOOL | Unescape quoted strings. FALSE will leave them quoted and escaped for application to handle |
forceEscaping | BOOL | Forces strings written using build functionality to be escaped |
ignoreEmptyRows | BOOL | Ingore empty rows while parsing. If this is false empty rows will be returned when calling readNextRow fns |
csvCore.out
Name | Type | Description |
---|---|---|
headerRow | UDINT | Row parsed for header |
rowNumber | UDINT | Current row number |
pRow | UDINT | Pointer to start of last row |
rowLen | UDINT | Length of last row |
CSVPredef_typ
Name | Type | Description |
---|---|---|
numColumns | USINT | Number of columns to be handled by this predef |
pColumns | UDINT | Pointer to array of column indices (INT) |
pTypes | UDINT | Pointer to array of types (CSV_CORE_TYPE_enum) |
pStatus | UDINT | Pointer to array of status variables for calls to populate (CSV_CORE_ERR_enum) |
Errors
Name | Value | Description |
---|---|---|
CSV_CORE_ERR_OK | 0 | No Error |
CSV_CORE_ERR_NO_NEWLINE | 5000 | No Newline at end of line or cell |
CSV_CORE_ERR_NEWLINE | 5001 | Newline found at end of cell |
CSV_CORE_ERR_END_OF_LINE | 5002 | No next cell. End of line reached |
CSV_CORE_ERR_END_OF_DATA | 5003 | No next cell or line. End of data reached |
CSV_CORE_ERR_BUFFER_FULL | 5004 | Buffer is full |
CSV_CORE_ERR_HEADER_INDEX | 5005 | Header row is invalid |
CSV_CORE_ERR_NUM_COLUMNS | 5006 | Number of columns is invalid. Must be greater than 0 |
CSV_CORE_ERR_INVALID_INPUT | 5007 | Invalid input to function |
CSV_CORE_ERR_INTERNAL | 5008 | Internal error. Didn’t see that coming |
CSV_CORE_ERR_COLUMN_NOT_FOUND | 5009 | Column not found in row |
CSV_CORE_ERR_INVALID_VALUE | 5010 | Invalid value for specified type |
CSV_CORE_ERR_INVALID_TYPE | 5011 | Invalid type specified |
CSV_CORE_ERR_UNSUPPORTED_TYPE | 5012 | Type not supported |
CSV_CORE_ERR_NOT_IMPLEMENTED | 5013 | Functionality not implemented. Conctact Loupe for support |
Types
Name | Description |
---|---|
CSV_CORE_TYPE_STRUCT | Not Supported |
CSV_CORE_TYPE_BOOL | Boolean value. Supports parsing text (true, false), number, else defaults to TRUE |
CSV_CORE_TYPE_SINT | |
CSV_CORE_TYPE_INT | |
CSV_CORE_TYPE_DINT | |
CSV_CORE_TYPE_USINT | |
CSV_CORE_TYPE_UDINT | |
CSV_CORE_TYPE_REAL | |
CSV_CORE_TYPE_STRING | |
CSV_CORE_TYPE_ULINT | Not Supported |
CSV_CORE_TYPE_DATE_AND_TIME | |
CSV_CORE_TYPE_TIME | |
CSV_CORE_TYPE_DATE | |
CSV_CORE_TYPE_LREAL | LREALs are supported but only supports precision of a REAL |
CSV_CORE_TYPE_ARRAY_OF_STRUCT | Not Supported |
CSV_CORE_TYPE_TIME_OF_DAY | Not Supported |
CSV_CORE_TYPE_BYTE | Not Supported |
CSV_CORE_TYPE_WORD | Not Supported |
CSV_CORE_TYPE_DWORD | Not Supported |
CSV_CORE_TYPE_LWORD | Not Supported |
CSV_CORE_TYPE_WSTRING | Not Supported |
CSV_CORE_TYPE_LINT | Not Supported |
CSV_CORE_TYPE_STRINGN |