Echelon Neuron C User Manual
Page 7

Neuron C Programmer’s Guide
vii
Table of Contents
Typographic Conventions for Syntax...........................................................iv
Comparing Neuron C Version 2 to Version 1 ........................................ 2
Neuron C Integer Constants................................................................... 4
Neuron C Variable Types ................................................................. 5
Neuron C Storage Classes ................................................................ 6
Variable Initialization ...................................................................... 7
Neuron C Declarations ..................................................................... 7
Network Variables, SNVTs, and UNVTs............................................... 8
Configuration Properties......................................................................... 9
Functional Blocks and Functional Profiles.......................................... 10
Data-Driven Compared with Command-Driven Protocols........... 11
Event-Driven Scheduling or Polled Scheduling .................................. 11
Low-Level Messaging ............................................................................ 11
Neuron-Hosted and Host-Based Compilation............................................ 12
Differences between Neuron C and ANSI C............................................... 13
Chapter 2. Focusing on a Single Device .......................................................... 15
What Happens on a Single Device? ............................................................ 16
Types of Events Used in When Clauses............................................... 18
Event Processing............................................................................. 20
Reset Event ..................................................................................... 21
User-Defined Events ............................................................................. 22
Scheduling of When Clauses................................................................. 22
Priority When Clauses .......................................................................... 23
The timer_expires Event....................................................................... 26
Declaring I/O Objects in Neuron C....................................................... 29
Example 1: Thermostat Interface........................................................ 31
Example 2: Simple Light Dimmer Interface....................................... 33
Example 3: Seven-Segment LED Display Interface........................... 35
Input Clock Frequency and Timer Accuracy.............................................. 36