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 | Next >>

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

PEN_TYPE

PEN_TYPE

Type

Constant

Return Value

Integer

Description

The name of a pen property that determines whether the current shape (either a POINT or a LINE) is drawn or erased. Possible contents of this property include SET and UNSET. PEN_TYPE is initialized to SET by Initialize_GUI.

Usage

Set_Property(GUI_PEN, PEN_TYPE, SET);

GUI_PEN PEN_TYPE SET Set_Property

Library

library.c

library.4th

PLOT

PLOT

Type

Constant

Return Value

Integer

Description

The name of an object type used to create a new plot object.  New plot objects have a width of 120 pixels, a height of 120 pixels, and a buffer size for its data of 240 bytes.  Plot objects can be resized using the Set_Property method along with the WIDTH_IN_PIXELS, HEIGHT_IN_PIXELS, or BUFFER_SIZE properties.  Data is added to a plot buffer using the Add_Data method.  The data is rendered onto a screen from the buffer when Refresh is called.

Usage

plotVoltage = New_Object( PLOT );

PLOT New_Object plotVoltage !

Library

library.c

library.4th

POINT

POINT

POINT

Type

Constant

Return Value

Long

Description

The name of a value of the SHAPE property of the GUI_PEN object.  When the SHAPE property of the GUI_PEN object is set to POINT, the Draw method draws a point or single pixel at the specified x and y location.

Usage

Set_Property(GUI_PEN, SHAPE, POINT);

GUI_PEN SHAPE POINT Set_Property

Library

library.c

library.4th

See Also

LINE

PRESS_EVENT

PRESS_EVENT

Type

Constant

Return Value

Long

Description

The name of a value of a keypad property KEY_EVENT and PRIOR_KEY_EVENT that indicates a user has just pressed a key on the keypad.

Usage

If(Get_Property(GUI_KEYPAD0, KEY_EVENT)==PRESS_EVENT)

{

  printf(“The last event was a press event.\n”);

}

GUI_KEYPAD0 KEY_EVENT Get_Property PRESS_EVENT d=

if

  cr .” The last event was a press event.”

endif

Library

library.c

library.4th

See Also

HOLD_EVENT, RELEASE_EVENT

PRESS_EVENT_PROCEDURE

PRESS_EVENT_PROCEDURE

Type

Constant

Return Value

Integer

Description

The name of an action key property that contains the xcfa (extended code field address) of a user defined press event procedure. The press event procedure is called each time the action key is pressed.  Press event procedures can not take or return any parameters, but they can modify variables.  The PRESS_EVENT_PROCEDURE property is uninitialized when an action key is instantiated.

Usage

Set_Property( actionkeyStop, PRESS_EVENT_PROCEDURE, (long) stop_process_ptr )

actionkeyStop @ PRESS_EVENT_PROCEDURE cfa.for Stop_Process Set_Property

Library

library.c

library.4th

See Also

HOLD_EVENT_PROCEDURE, RELEASE_EVENT_PROCEDURE

PRESS_NUMBER

PRESS_NUMBER

Type

Constant

Return Value

Integer

Description

The name of a read only keypad property that contains the number of times the current data entry key has been pressed.  The PRESS_NUMBER, along with the SHIFT_STATE (SHIFT_UP, SHIFT_DOWN, or SHIFT_NEUTRAL) and KEY_POSITION (0 to 15 or 20 to 34) determines the KEY_CODE of an overloaded data entry key.

Usage

pressnum = Get_Property(GUI_KEYPAD0, PRESS_NUMBER);

GUI_KEYPAD0 PRESS_NUMBER Get_Property pressnum 2!

Library

library.c

library.4th

See Also

KEY_CODE, KEY_POSITION, PRIOR_KEY_CODE, SHIFT_STATE

PRIOR_KEY_CODE

PRIOR_KEY_CDOE

Type

Constant

Return Value

Integer

Description

The name of a read only keypad property that contains the key code from the previously pressed data entry key.  The key code is based on the SHIFT_STATE (SHIFT_UP, SHIFT_DOWN, or SHIFT_NEUTRAL), KEY_POSITION (0 to 15 or 20 to 34), and PRESS_NUMBER for an overloaded data entry key.  Valid key codes are from 1 to 255.  The key code is a reference to a glyph of a font that is rendered into a textbox and shown on the display.  For examle, key code 65 refers to the glyph of an upper case A where as key code 247 refers to the glyph of a divide sign in the default font.

Usage

oldkeycode = Get_Property(GUI_KEYPAD0, PRIOR_KEY_CODE);

GUI_KEYPAD0 PRIOR_KEY_CODE Get_Property oldkeycode 2!

Library

library.c

library.4th

See Also

KEY_CODE, KEY_POSITION, PRESS_NUMBER, SHIFT_STATE

PRIOR_KEY_EVENT

PRIOR_KEY_EVENT

Type

Constant

Return Value

Integer

Description

The name of a read only keypad property that contains the previous keypad event.  Valid keypad events are PRESS_EVENT, HOLD_EVENT, RELEASE_EVENT, and NO_EVENT.

Usage

oldevent = Get_Property(GUI_KEYPAD0, PRIOR_KEY_EVENT);

GUI_KEYPAD0 PRIOR_KEY_EVENT Get_Property oldevent 2!

Library

library.c

library.4th

See Also

KEY_EVENT, PRESS_EVENT, HOLD_EVENT, RELEASE_EVENT, NO_EVENT

PRIOR_KEY_POS

PRIOR_KEY_POS

Type

Constant

Return Value

Integer

Description

The name of a read only keypad property that contains the position of the previously pressed key.  Valid key positions are from 0 to 15 and 20 to 34 which correspond to the phyical location of the keys on the keypad as shown in the table for Insert_Key.

Usage

oldpos = Get_Property(GUI_KEYPAD0, PRIOR_KEY_POS);

GUI_KEYPAD0 PRIOR_KEY_POS Get_Property oldpos 2!

Library

library.c

library.4th

See Also

Insert_Key, KEY_POSITION

PRIOR_KEY_TYPE

PRIOR_KEY_TYPE

Type

Constant

Return Value

Integer

Description

The name of a read only keypad property that contains the type of the previously pressed key.  Valid key types are ACTION_KEY, DATA_ENTRY_KEY, SHIFT_KEY, and NO_KEY.

Usage

oldkeytype = Get_Property(GUI_KEYPAD0, PRIOR_KEY_TYPE);

GUI_KEYPAD0 PRIOR_KEY_TYPE Get_Property oldkeytype 2!

Library

library.c

library.4th

See Also

ACTION_KEY, DATA_ENTRY_KEY, SHIFT_KEY, NO_KEY, KEY_TYPE

<< Previous | Next >>


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