manufacturer of I/O-rich SBCs, operator interfaces, handheld instruments, and development tools for embedded control low cost single board computers, embedded controllers, and operator interfaces for scientific instruments & industrial control development tools for embedded control order our low cost I/O-rich embedded control products embedded controller manufacturer profile single board computers & embedded controllers development tools & starter kits for your embedded design operator interfaces with touchscreens and graphical user interface plug-in expansion modules for digital & analog I/O C language & Forth language integrated development tools, IDE single board and embedded computer accessories embedded controller enclosures, bezels, environmental gaskets

The C Programmer’s Guide to the Mosaic Handheld

Table of Contents

PART 1 GETTING STARTED

Introduction. How to Use This Manual

Chapter 1: Getting to Know Your Handheld Instrument

Chapter 2: Powering Your Handheld

PART 2 PROGRAMMING THE MOSAIC HANDHELD

Chapter 3: Your First Program

Chapter 4: The IDE: Writing, Compiling, Downloading and Debugging Programs

Chapter 5: Making Effective Use of Memory

Chapter 6: Real Time Programming

Chapter 7: Failure and Run-Time Error Recovery

Chapter 8: Programming the Graphical User Interface

PART 3 COMMUNICATIONS, MEASUREMENT, AND CONTROL

Chapter 9: Digital and Timer-Controlled I/O

Chapter 10: Data Acquisition

Chapter 11: Serial Communications

Chapter 12: The Battery-Backed Real Time Clock

Chapter 13: Customizing the Handheld's I/O

PART 4: REFERENCE DATA

Appendix A: GUI Function Reference

Appendix B: Handheld Schematics

Glossary

<< Previous |

A     B     C     DF    G     H     I     K     LM    N     P     R     S    T    UVWXY   

UNSET

UNSET

Type

Constant

Return Value

Long

Description

The name of a value of the PEN_TYPE property of the GUI_PEN object.  When the PEN_TYPE property of the GUI_PEN object is UNSET, the Draw method erases a point or a line from a screen.

Usage

Set_Property(GUI_PEN, PEN_TYPE, UNSET);

GUI_PEN PEN_TYPE UNSET Set_Property

Library

library.c

library.4th

See Also

SET

void Un_Load ( uint screen_reference, uint object_reference, uint x, uint y )

Un_Load ( u1 \ u2 \ u3 \ u4 -- | u1 = screen reference, u2 = object reference, u3 = x coordinate, u4 = y coordinate )

Type

Function

Input Parameters

screen_reference        A 16 bit variable that refers to the screen object that the object specified by object_reference will be unloaded from.

object_reference         A 16 bit variable that refers to the object that will be unloaded from the screen.

x_coordinate              A 16 bit number that specifies the location of the left edge of the object in the horizontal direction relative to the left edge of the screen.  The x-coordinate must be the same coordinate used with the Load method.

y_coordinate              A 16 bit number that specifies the location of the top of the object in the vertical direction relative to the top edge of the screen.  The y-coordinate must be the same coordinate used with the Load method.

Description

A method that unloads an object from a screen and erases the image of the object from the screen.  The x and y coordinates must be the same x and y coordinates that were used to load the object into the screen.  Errors include: INVALID_SCREEN, INVALID_OBJECT, X_OUT_OF_RANGE, and Y_OUT_OF_RANGE.

Usage

Un_Load(GUI_SCREEN0, graphicStop, 0, 0);

GUI_SCREEN0 graphicStop @ 0 0 Un_Load

Library

library.c

library.4th

See Also

Load

VERTICAL_SNAP_TO_GRID

VERTICAL_SNAP_TO_GRID

Type

Constant

Return Value

Integer

Description

The name of a property of the GUI Toolkit that aligns objects loaded onto a screen onto an 8 pixel vertical grid.  Possible contents of this property are the booleans GUI_TRUE and GUI_FALSE. VERTICAL_SNAP_TO_GRID is initialized to GUI_FALSE by Initialize_GUI.

Usage

Set_Property(GUI_TOOLKIT, VERTICAL_SNAP_TO_GRID, GUI_FALSE);

GUI_TOOLKIT VERTICAL_SNAP_TO_GRID GUI_FALSE Set_Property

Library

library.c

library.4th

See Also

HORIZONTAL_SNAP_TO_GRID

VISIBLE

VISIBLE

Type

Constant

Return Value

Integer

Description

The name of a screen property that indicates if the screen is shown on the display.  Only one screen can be visible at a time. Possible contents of this property are the booleans GUI_TRUE and GUI_FALSE. GUI_SCREEN0 is the visible screen after Initialize_GUI is called.

Usage

Set_Property(GUI_SCREEN1, VISIBLE, GUI_TRUE);

GUI_SCREEN1 VISIBLE GUI_TRUE Set_Property

Library

library.c

library.4th

WIDTH_IN_PIXELS

WIDTH_IN_PIXELS

Type

Constant

Return Value

Integer

Description

The name of a property that contains the width in pixels of an object.

Usage

longWidth = Get_Property(GUI_DISPLAY, WIDTH_IN_PIXELS);

GUI_DISPLAY WIDTH_IN_PIXELS Get_Property displayWidth 2!

Library

library.c

library.4th

See Also

HEIGHT_IN_PIXELS

WIDTH_OUT_OF_RANGE

WIDTH_OUT_OF_RANGE

Type

Constant

Return Value

Integer

Description

The name of an error that indicates the width passed to Set_Property when changing the width of a plot, creates a plot wider than the screen.  If the error occurs, Set_Property recovers from the error by setting the width of the plot equal to the width of the screen.  An unchecked error occurs if a plot that has already been loaded into a screen is resized beyond the width of the screen.

Usage

Set_Property(plotVoltage, WIDTH_IN_PIXELS, (ulong) 400);

If(Read_Error() == WIDTH_OUT_OF_RANGE)

{

  printf(“Width of plot is greater than width of screen.\n”);

  Clear_Error();

}

plotVoltage @ WIDTH_IN_PIXELS 400 u>d Set_Property

Read_Error WIDTH_OUT_OF_RANGE =

if

  cr .” Width of plot is greater than width of screen.”

  Clear_Error

endif

Library

library.c

library.4th

X_OUT_OF_RANGE

X_OUT_OF_RANGE

Type

Constant

Return Value

Integer

Description

The name of an error that indicates that the x-coordinate passed to Draw is greater than the width of the screen or the x-coordinate passed to Load or Un_Load plus the width of the object is greater than the width of the screen.  If the error occurs, the method recovers from the error by setting the x-coordinate to the largest possible value.  For the Draw method, the x-coordinate is set to 127.  For the Load and Un_Load methods, the x-coordinate is set to 127 minus the width of the object.

Usage

Draw( 400, 15 );

If(Read_Error() == X_OUT_OF_RANGE)

{

  printf(“X is greater than the width of the screen.\n”);

  Clear_Error();

}

400 15 Draw

Read_Error X_OUT_OF_RANGE =

if

  cr .” X is greater than the width of the screen.”

  Clear_Error

endif

 

Library

library.c

library.4th

Y_OUT_OF_RANGE

Y_OUT_OF_RANGE

Type

Constant

Return Value

Integer

Description

The name of an error that indicates that the y-coordinate passed to Draw is greater than the height of the screen or the y-coordinate passed to Load or Un_Load plus the height of the object is greater than the height of the screen.  If the error occurs, the method recovers from the error by setting the y-coordinate to the largest possible value.  For the Draw method, the y-coordinate is set to 127.  For the Load and Un_Load methods, the y-coordinate is set to 127 minus the height of the object.

Usage

Draw( 40, 300 );

If(Read_Error() == Y_OUT_OF_RANGE)

{

  printf(“Y is greater than the height of the screen.\n”);

  Clear_Error();

}

40 300 Draw

Read_Error Y_OUT_OF_RANGE =

if

  cr .” Y is greater than the height of the screen.”

  Clear_Error

endif

Library

library.c

library.4th

 

<< Previous |


Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2006 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation