HSLFilLib
https://github.com/theonetruenerd/VenusPackages/blob/main/HSLFilLib.pkg
This library allows interaction with and manipulation of files present on the host computer. It adds the following functions:
FilGetCommTimeouts()
- FilEof(variable filObj)
This function checks whether the current position in the specified file is the final line
- Params filObj:
The opened file to be checked
- Returns:
Boolean as to whether the position is the end of the file or not
- Return type:
Boolean
- FilFindFile(variable filName)
This function starts searching the specified path for a file. This function is obsolete, and
FilSearchPath()
should be used instead.- Params filName:
The directory or path and file name to be searched for. Can contain wildcard characters such as * or ?
- Returns:
If successful, the path name of the first file found that matches the input
- Return type:
Variable
- FilFindNextFile()
Continues the search from
FilFindFile()
to the next file.- Returns:
If successful, the path name of the next file found that matches the input from the most recent FilFindFile command
- Return type:
Variable
- FilFormatBarcodeFile(variable dataSource, variable dataTarget)
This function takes the barcode ASCII text file written during LoadCarrier and converts it into a strongly formatted barcode file. This strongly formatted file can be an ASCII text file, a Microsoft Excel file, or a Microsoft Access file. Will contain the following columns:
ID (record ID, integer)
Specifier (string, P = position, C = carrier)
Position (position, integer)
Barcode (barcode, string)
Timestamp (timestamp, YYYY-MM-DD hh:mm:ss, string)
- Params dataSource:
The name of the barcode ASCII file generated during the load carrier step
- Params dataTarget:
The name of the barcode ASCII text file, Microsoft Excel file or Microsoft Access file generated by the function. The name must include a table name for a Microsoft Excel file or a Microsoft Access Database.
- Returns:
Boolean showing if the function was successful or not
- Return type:
Boolean
- FilGetBinPath()
This function retrieves the vector binary path
- Returns:
The vectory binary path (usually C:Program Files (x86)HamiltonBin)
- Return type:
Variable
- FilGetCommState(file port)
This function retrieves the configuration information for the specified communication resource. The entries of the structure that retrieves the configuration information must be accessible in the global scope.
- Params port:
The communication resource opened during the file-Open operation
- Type:
Port
- Returns:
Boolean showing if the function was successful or not
- Return type:
Boolean
- GetCommTimeouts(file port)
This function retrieves the time-out parameters for all read and write operations for the specified communication resource. The entries of the structure that contains the configuration information must be accessible in the global scope.
- Params port:
The communication resource opened during the file-Open operation
- Returns:
Boolean showing if the function was successful or not
- Return type:
Boolean
- FilGetConfigPath()
This function retrieves the vector configuration path
- Returns:
The vector configuration path (usually C:Program Files (x86)HamiltonConfig)
- Return type:
Variable
- FilGetLabwarePath()
This function retrieves the vector labware path
- Returns:
The vector labware path (usually C:Program Files (x86)HamiltonLabware)
- Return type:
Variable
- FilGetLibraryPath()
This function retrieves the vector library path
- Returns:
The vector library path (usually C:Program Files (x86)HamiltonLibrary)
- Return type:
Variable
- FilGetLogFilesPath()
This function retrieves the vector log files path
- Returns:
The vector log files path (usually C:Program Files (x86)HamiltonLogFiles)
- Return type:
Variable
- FilGetMethodsPath()
This function retrieves the vector methods path
- Returns:
The vector methods path (usually C:Program Files (x86)HamiltonMethods)
- Return type:
Variable
- FilGetSystemPath()
This function retrieves the vector system path
- Returns:
The vector system path (usually C:Program Files (x86)HamiltonSystem)
- Return type:
Variable
- FilIsNull(variable value)
This function returns a non-zero if the variable is a null value (SQL style Null).
- Params value:
The variable being checked
- Returns:
A boolean determining if the variable is SQL style Null or not
- Return type:
Boolean
- FilReadString(file fileObj)
This function reads the next record from the input file as string-valued data. Row data, but no schema data, is saved to the string. After you call FilReadString, the next unread record becomes the current record, or Eof is set to hslTrue if there are no more records.
- Params fileObj:
The file being looked at
- Returns:
The contents of the line being looked at as string-valued data, or the specific run-time error
- Return type:
String
- FilRemoveFields(file fileObj)
This function removes all fields from a record definition
- Params fileObj:
The file containing the record which is having its fields removed
- Returns:
None
- Return type:
N/A
- FilSearchPath(variable fileName)
This function searches for the specified file, and outputs the path and filename of the file if found, or an empty string if not found. Will search the current directory, the methods directory, the library directory, and any directories in the PATH environment variable.
- Params fileName:
The file name to be searched for
- Returns:
The path name of the first file found, or an empty string if no files were found
- Return type:
Variable
- FilSetCommState(file port, variable cfgFile)
This function configures a communication resource according to the specifications in a structure that contains the configuration information. The structure that contains the configuration information must be structured as shown below. Each entry in the structure is optional and overwrites the default value in parentheses.
- Params port:
The communication resource opened during the file-Open operation
- Params cfgFile:
The name of the file containing the configuration information. If this parameter is empty, the entries in the structure that contains the configuration information must be accessible in the global scope.
- Returns:
Boolean showing whether the function succeeded or not
- Return type:
Boolean
- FilSetCommTimeouts(file port, variable cfgFile)
This function sets the time-out parameters for all read and write operations on a specified communication resource. The structure that contains the time-out information is as shown below. Each entry in the structure is optional and overwrites the default value in parentheses.
- Params port:
The communication resource opened during the file-Open operation
- Params cfgFile:
The name of the file that contains the time-out information. If this parameter is empty, the entries in the structure that contains the time-out information must be accessible in the global scope.
- Returns:
Boolean showing whether the function succeeded or not
- Return type:
Boolean
- FilUpdateRecord(file fileObj)
Updates the current record of the file object with the values of the variable objects specified in the record definition. The current record remains current after you call the FilUpdateRecord function. The provider must support UPDATE.
- Params fileObj:
The file object being updated
- Returns:
Boolean showing whether the function succeeded or not
- Return type:
Boolean
- FilWriteString(file fileObj, variable stringObj)
Writes a string to the end of the file data source. After you call the FilWriteString function, the new record becomes the current record.
- Params fileObj:
The file which is being written in
- Params stringObj:
The string to be written
- Returns:
Boolean showing whether the function succeeded or not
- Return type:
Boolean