User manual CRESTRON SIMPL PLUS LANGUAGE REF
Lastmanuals offers a socially driven service of sharing, storing and searching manuals related to use of hardware and software : user guide, owner's manual, quick start guide, technical datasheets... DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!
If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Lastmanuals provides you a fast and easy access to the user manual CRESTRON SIMPL PLUS LANGUAGE REF. We hope that this CRESTRON SIMPL PLUS LANGUAGE REF user guide will be useful to you.
Lastmanuals help download the user guide CRESTRON SIMPL PLUS LANGUAGE REF.
Manual abstract: user guide CRESTRON SIMPL PLUS LANGUAGE REF
Detailed instructions for use are in the User's Guide.
[. . . ] Crestron SIMPL+® Software Language Reference Guide
This document was prepared and written by the Technical Documentation department at:
Crestron Electronics, Inc. 15 Volvo Drive Rockleigh, NJ 07647 1-888-CRESTRON
All brand names, product names and trademarks are the property of their respective owners. ©2003 Crestron Electronics, Inc.
Crestron SIMPL+®
Software
Contents
SIMPL+ Language Reference Guide
Introduction . 7 Converting from an X-Generation to a 2-Series Target . [. . . ] struct - Structure variable that will receive data read from file nTotalBytesRead - optional argument. INTEGER variable that will contain the total number of bytes read from the file into the structure.
Return Value:
None.
Language Reference Guide - DOC. 5797G
SIMPL+®
179
Software
Example:
(Refer to "File Functions Overview"on page 116) SIGNED_INTEGER
{ STRING Name[50]; STRING Address[100]; STRING PhoneNumber[20]; }; PhoneBookEntry OneEntry; StartFileOperations();
Crestron SIMPL+ ®
nFileHandle, nTotalBytesRead;
STRUCTURE PhoneBookEntry
nFileHandle = FileOpen ( "MyFile. txt", _O_RDONLY ); if (nFileHandle >= 0) { ReadStructure( nFileHandle, PhoneBookEntry, nTotalBytesRead ); if( nTotalBytesRead < 0 ) PRINT ( "Error reading structure. nTotalBytesRead ); else PRINT ( "Read structure from file correctly. Total bytes read = %d\n", nTotalBytesRead ); } EndFileOperations(); Error code = %d\n",
Version:
SIMPL+ Version 3. 00. 07 or higher (Pro 2 only)
Control System:
2-Series Only
180
SIMPL+®
Language Reference Guide - DOC. 5797G
Crestron SIMPL+® RemoveDirectory
Name:
RemoveDirectory
Software
Syntax:
SIGNED_INTEGER RemoveDirectory(STRING DirName)
Description:
Removes the directory with the specified name. The path name can be a relative link or absolute, refer to page page 14. Requires StartFileOperations(), refer to page page 183.
Parameters:
DIRNAME string containing the name of the desired directory.
Return Value:
Returns 0 if successful and 1 if an error occurred.
Example:
(Refer to "File Functions Overview"on page 116) IF( RemoveDirectory("NewDirect") < 0)
PRINT("Error occurred deleting directory\n");
Version:
SIMPL+ Version 3. 00. 02 or higher (Pro 2 only)
Control System:
2-Series Only
Language Reference Guide - DOC. 5797G
SIMPL+®
181
Software SetCurrentDirectory
Name:
SetCurrentDirectory
Crestron SIMPL+ ®
Syntax:
SIGNED_INTEGER SetCurrentDirectory(STRING DirName)
Description:
Changes the working directory to the specified name. Refer to "Relative Path Names" on page 14.
Parameters:
DIRNAME string containing the name of the desired directory.
Return Value:
Returns 0 if successful and 1 if an error occurred.
Example:
(Refer to "File Functions Overview"on page 116) IF( SetCurrentDirectory("NewDirect") < 0)
PRINT("Error occurred creating directory\n"); PRINT("Directory is now: %s\n", GetCurrentDirectory());
Version:
SIMPL+ Version 3. 00. 02 or higher (Pro 2 only)
Control System:
2-Series Only
182
SIMPL+®
Language Reference Guide - DOC. 5797G
Crestron SIMPL+® StartFileOperations
Name:
StartFileOperations
Software
Syntax:
SIGNED_INTEGER StartFileOperations()
Description:
Signifies to the operating system that the current thread is starting its file operations.
Parameters:
None.
Return Value:
Returns 0 if successful and 1 if an error occurred.
Example:
(Refer to "File Functions Overview"on page 116) IF ( StartFileOperations() < 0 )
PRINT ( "Error in starting file ops\n" ); // various file operations IF ( EndFileOperations() < 0 ) PRINT ( "Error Occurred in ending file ops\n" );
NOTE: StartFileOperations is required prior to any operation accessing a file. EndFileOperations is required after finishing all file operations and prior to terminating the thread of execution (e. g. , one of the PUSH commands).
Version:
SIMPL+ Version 3. 00. 02 or higher (Pro 2 only)
Control System:
2-Series Only
Language Reference Guide - DOC. 5797G
SIMPL+®
183
Software WaitForNewDisk
Name:
WaitForNewDisk
Crestron SIMPL+ ®
Syntax:
SIGNED_INTEGER WaitForNewDisk()
Description:
Waits for a compact flash card to be inserted into the control system. Refer to "CheckForDisk" on page 119.
Parameters:
None.
Return Value:
Returns 0 when a new compact flash card is installed into the control system, <0 if an error occurs.
Example:
(Refer to "File Functions Overview"on page 116) while(1)
{ if ( WaitForNewDisk() < 0 ) break; // perform operations on the new disk. }
Version:
SIMPL+ Version 3. 00. 02 or higher (Pro 2 only)
Control System:
2-Series Only
184
SIMPL+®
Language Reference Guide - DOC. 5797G
Crestron SIMPL+® WriteInteger
Name:
WriteInteger
Software
Syntax:
SIGNED_INTEGER WriteInteger ( INTEGER file_handle, INTEGER i )
Description:
Writes an integer from a file starting at the current file position. Two bytes are written, most significant byte first. Refer to the section entitled "Reading and Writing Data to a File" on page 118 for a discussion of when to use this function and when to use the related functions: FileWrite, WriteInteger, WriteString, WriteStructure, WriteSignedInteger, WriteLongInteger, WriteLongSignedInteger, WriteIntegerArray, WriteSignedIntegerArray, WriteLongIntegerArray, WriteLongSignedIntegerArray, WriteStringArray. NOTE: Input and Output variables of any kind are not allowed in the file reading and writing functions, just internal variables. Use ReadInteger to read this.
Parameters:
FILE_HANDLE specifies the file handle of the previously opened file (from FileOpen). I is the integer whose value is written.
Return Value:
Number of bytes written to the file. If the return value is negative, it is an error code.
Language Reference Guide - DOC. [. . . ] Authorized returns must be shipped freight prepaid to CRESTRON, Cresskill, N. J. , or its authorized subsidiaries, with RMA number clearly marked on the outside of all cartons. Shipments arriving freight collect or without an RMA number shall be subject to refusal. CRESTRON reserves the right in its sole and absolute discretion to charge a 15% restocking fee, plus shipping costs, on any products returned with an RMA. Return freight charges following repair of items under warranty shall be paid by CRESTRON, shipping by standard ground carrier. [. . . ]
DISCLAIMER TO DOWNLOAD THE USER GUIDE CRESTRON SIMPL PLUS LANGUAGE REF Lastmanuals offers a socially driven service of sharing, storing and searching manuals related to use of hardware and software : user guide, owner's manual, quick start guide, technical datasheets... In any way can't Lastmanuals be held responsible if the document you are looking for is not available, incomplete, in a different language than yours, or if the model or language do not match the description. Lastmanuals, for instance, does not offer a translation service. Click on "Download the user manual" at the end of this Contract if you accept its terms, the downloading of the manual CRESTRON SIMPL PLUS LANGUAGE REF will begin.