Echelon Neuron C User Manual

Page 9

Advertising
background image

Neuron C Programmer’s Guide

ix

Instantiation of Configuration Properties.................................................. 88

Device Property Lists ............................................................................ 89

Network Variable Property Lists ......................................................... 90

Accessing Property Values from a Program............................................... 91

Advanced Configuration Property Features .............................................. 92

Configuration Properties Applying to Arrays...................................... 92

Initialization of Configuration Properties at Instantiation................ 95

Sharing of Configuration Properties .................................................... 96

Configuration Property Sharing Rules ................................................ 97

Type-Inheriting Configuration Properties........................................... 98

Type-Inheriting CPs for NVs of Changeable Type........................ 99

Chapter 5. Using Functional Blocks to Implement a Device Interface.........101

Overview ..................................................................................................... 102

Functional Block Declarations .................................................................. 104

Functional Block Property Lists......................................................... 107

Shared Functional Block Properties .................................................. 108

Scope Rules................................................................................................. 109

Accessing Members and Properties of an FB from a Program................ 110

Accessing Members and Properties of an FB from a Network Tool ....... 112

The Director Function................................................................................ 113

Sharing of Configuration Properties.........................................................115

Chapter 6. How Devices Communicate Using Application Messages...........117

Introduction to Application Messages ......................................................118

Layers of Neuron Software........................................................................ 119

Implicit Messages: Network Variables .................................................... 119

Application Messages................................................................................. 120

Constructing a Message.............................................................................120

The msg_out Object Definition ........................................................... 121

Message Tags ................................................................................ 122

Message Codes .............................................................................. 123

Block Transfers of Data ...................................................................... 124

Sending a Message.....................................................................................125

Receiving a Message ..................................................................................126

The msg_arrives Event ....................................................................... 126

The msg_receive( ) Function ............................................................... 127

Format of an Incoming Message......................................................... 127

Importance of a Default When Clause ............................................... 128

Application Message Examples................................................................. 129

Lamp Program ..................................................................................... 129

Switch Program ................................................................................... 129

Connecting Message Tags................................................................... 130

Explicit Addressing.................................................................................... 130

Sending a Message with the Acknowledged Service ............................... 131

Message Completion Events ............................................................... 131

Processing Completion Events for Messages .............................. 133

Preemption Mode and Messages............................................................... 134

Asynchronous and Direct Event Processing............................................. 135

Using the Request/Response Mechanism................................................. 136

Constructing a Response.....................................................................137

Sending a Response............................................................................. 138

Receiving a Response ..........................................................................138

The resp_arrives Event................................................................. 138

Advertising