Shared memory fixed-point callouts in autocode/c – National Instruments AutoCode NI MATRIX User Manual

Page 154

Advertising
background image

Chapter 5

Generated Code Architecture

AutoCode Reference

5-46

ni.com

SLONG

stands for signed long.

ULONG

stands for unsigned long.

The naming convention of the callouts uses the terms listed above and
associates from right to left. The following is an example of a callout.

UPDATE_MBUFSBYTE_WITH_LOCSBYTE(x, y)

The value of the local variable

x

of type

signed byte

is assigned to a

shared memory variable

y

of type

signed byte

. All of these callouts

assume that the data type of

x

and

y

are identical except when noted.

Shared Memory Fixed-Point Callouts in AutoCode/C

AutoCode/C generates the callout when needed. You must provide the
implementation of the callouts. You can choose to use macros or procedure
calls and whether or not the implementation is generated from within the
template. You can update shared memory as follows.

From Local Memory

UPDATE_MBUFSBYTE_WITH_LOCSBYTE(x, y)

UPDATE_MBUFUBYTE_WITH_LOCUBYTE(x, y)

UPDATE_MBUFSSHORT_WITH_LOCSSHORT(x, y)

UPDATE_MBUFUSHORT_WITH_LOCUSHORT(x, y)

UPDATE_MBUFSLONG_WITH_LOCSLONG(x, y)

UPDATE_MBUFULONG_WITH_LOCULONG(x, y)

From Shared Memory

UPDATE_MBUFSBYTE_WITH_MBUFSBYTE(x, y)

UPDATE_MBUFUBYTE_WITH_MBUFUBYTE(x, y)

UPDATE_MBUFSSHORT_WITH_MBUFSSHORT(x, y)

UPDATE_MBUFUSHORT_WITH_MBUFUSHORT(x, y)

UPDATE_MBUFSLONG_WITH_MBUFSLONG(x, y)

UPDATE_MBUFULONG_WITH_MBUFULONG(x, y)

From Shared Memory (mixed data types)

UPDATE_MBUFSBYTE_WITH_MBUFF(x, y,

convert_macro_name)

UPDATE_MBUFF_WITH_MBUFSBYTE(x, y,

convert_macro_name)

UPDATE_MBUFUBYTE_WITH_MBUFF(x, y,

convert_macro_name)

UPDATE_MBUFF_WITH_MBUFUBYTE(x, y,

convert_macro_name)

UPDATE_MBUFSSHORT_WITH_MBUFF(x, y,

convert_macro_name)

UPDATE_MBUFF_WITH_MBUFSSHORT(x, y,

convert_macro_name)

UPDATE_MBUFUSHORT_WITH_MBUFF(x, y,

convert_macro_name)

Advertising