Crestron SIMPL+ Specifications Page 44

  • Download
  • Add to my manuals
  • Print
  • Page
    / 60
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 43
Software Crestron SIMPL+
flash card within the control system. The function will return an error code and the
program can act accordingly.
Other programs might prompt the end-user to insert a compact flash card. The
function, WaitForNewDisk, will halt the program and resume when a compact flash
card is detected within the control system.
The following is an example of a program that needs to read data from a compact
flash card upon startup:
FUNCTION ReadMyCompactFlashCard()
{
// call functions to read the compact flash card
//
// Note that this function will exist within the same
// thread as the calling function (Function Main).
// Because of this, the functions, StartFileOperations
// and EndFileOperations should not be used here.
}
Function Main()
{
StartFileOperations();
if (CheckForDisk() = 1)
Call ReadMyCompactFlashCard();
else if ( WaitForNewDisk() = 0 )
Call ReadMyCompactFlashCard();
EndFileOperations();
}
If the program is dependent upon data that read in from the compact flash card, it is
imperative for the program to validate the existence of the card. Otherwise, the
program will not have the necessary data needed to execute properly. The above
function will first check if the compact flash card is already inserted into the control
system upon system startup. If so, it will call the user-defined function,
ReadMyCompactFlashCard, to perform any file read operations on the compact
flash card. If the compact flash card was not found in the control system, the
program will wait for the card to be inserted before continuing. Once inserted, the
same function, ReadMyCompactFlashCard, is called.
Reading and Writing Data
Once the existence of the compact flash card is verified, the reading and writing of
data can be performed. Data can be read or written either with individual elements
(i.e., a single integer or string), or with entire structures of data.
Because each datatype (i.e.: INTEGER, STRING, LONG_INTEGER) uses a
different amount of storage in memory, there are different functions to read and write
each of these types. The return value of each of these functions is the actual number
of bytes read or written to the file. The reason why different functions have to be
called instead of having just one function is for the following reason. Data elements
are written to a file by inserting one element after another. The file does not contain
any information as to what that data is or how it is to be extracted out. It is up to the
program that will ultimately read that file to know exactly what is contained within
the file and how to extract the data back out of it.
The following example demonstrates this:
40 SIMPL+
Programming Guide – DOC. 5789A
Page view 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 59 60

Comments to this Manuals

No comments

Motorola Express Xtra Express Xtra FLX Pager podręczniki

Instrukcje obsługi i podręczniki użytkownika dla Nie Motorola Express Xtra Express Xtra FLX Pager.
Dostarczamy 2 pdf podręczników Motorola Express Xtra Express Xtra FLX Pager do pobrania za darmo według typów dokumentów: Podręcznik Użytkownika






Więcej produktów i instrukcji dla Nie Motorola

Modele Rodzaj dokumentu
Express LUNA FLX Instrukcja Użytkownika   USER`S GUIDE INTR ODUCTION INTR ODUCTION, 12 strony
MPC8260 Instrukcja Użytkownika   HIP4 Supplement to the MPC 8260 PowerQUICC II, 20 strony
DCS 1800 Clam RAE Instrukcja Użytkownika   DCS 1800 Clam RAE, 14 strony
M68000 Podręcznik Użytkownika   Motorola M68000 User`s guide, 256 strony
MPC8260 Instrukcja Użytkownika   MCM69C433 - Freescale Semiconductor [en] [fr] , 16 strony
H9 Podręcznik Użytkownika   Motorola H9 User`s guide, 62 strony
DCT5100 Podręcznik Użytkownika   Motorola DCT5100 User guide, 38 strony
E680 - Smartphone - GSM Instrukcja Użytkownika   OpenEZX Linux Smartphone Hacking [en] , 16 strony
LX4 plus Instrukcja Użytkownika   Reparaturpreisliste Oelmann bzw. Motorola, 2 strony
DSP56602 Instrukcja Użytkownika   SECTION 2 SIGNAL/CONNECTION DESCRIPTION, 26 strony
LS750 Instrukcja Użytkownika   LS750 - Spok, 12 strony
MC17A Instrukcja Użytkownika    MC17/MC17A/MC17T - Motorola Solutions, 24 strony
Ultra Express 6881023B75-A(X) Podręcznik Użytkownika   Motorola Ultra Express 6881023B75-A(X) User`s guide, 4 strony
Memo Express II FLX Instrukcja Użytkownika   Memo Express II - Contact Wireless, 30 strony
68HC12B32 Instrukcja Użytkownika   UF 68HC12 Development Kit Manual, 24 strony
Talkabout T900 Podręcznik Użytkownika   Motorola Talkabout T900 User`s guide, 16 strony
CS4070 Instrukcja Użytkownika   Symbol CS4070 [de] [es] [fr] [it] [nl] , 2 strony
AP-650 Series Instrukcja Użytkownika   WiNG 5.X How-To Guide, 44 strony
MSAT-G2 Instrukcja Użytkownika   MSATG2 Go Kit - KR Nida Communications, 3 strony
MCU MC9S12DP256 Instrukcja Użytkownika   Lab #1 Notes, 6 strony