Built-in objects, Msg_in object, Msg_out object – Echelon Neuron C User Manual

Page 218

Advertising
background image

198

Built-In Variables, Objects, Symbols, and Semaphore

Built-In Objects

The following sections list the Neuron C built-in objects alphabetically, providing

relevant syntax information and a detailed description of each function.

msg_in

Object

The msg_in object contains an incoming application or foreign-frame message.

The type is a structure predefined in Neuron C as shown below:

typedef enum {ACKD, UNACKD_RPT,

UNACKD, REQUEST} service_type;


struct {

int

code;

int

len;

int

data[MAXDATA];

boolean authenticated;

service_type

service;

msg_in_addr addr;

boolean duplicate;

unsigned rcvtx;

} msg_in;

The various fields of the msg_in object are:
code

Message code for the incoming message.

len

Length of message data in bytes.

data Message

data.

authenticated

TRUE if authenticated, message has passed challenge.

service

Service type for the incoming message.

addr

Source address of this message, and address through

which the message was received. See <msg_addr.h>
include file.

duplicate

Message is a duplicate request. See

Idempotent Versus

Non-Idempotent Requests

in the

Neuron C Programmer's

Guide

.

rcvtx

The index into the receive transaction database for this

message.

See

Format of an Incoming Message

in Chapter 6,

How Devices Communicate

Using Application Messages,

of the

Neuron C Programmer's Guide

for more

information about this structure.

msg_out

Object

The msg_out object contains an outgoing application or foreign frame message.

The type is a structure predefined in the Neuron C as shown below:

typedef enum {FALSE, TRUE} boolean;
typedef enum {ACKD, UNACKD_RPT,

UNACKD, REQUEST} service_type;

Advertising