Message tags – Echelon Neuron C User Manual
Page 196
176
Network Variable, Configuration Property, and Message Tag Declarations
};
void f(void)
{
...
if (nvoValue::cpMaxSendT.seconds > 0) {
...
}
}
The particular family member is identified by a qualifier that precedes it. This
qualifier is called the
context
. The context is followed by two consecutive colon
characters, and then the name of the property. Because there cannot be two or
more properties with the same configuration property type that apply to the same
network variable, each property is unique within a particular context. The
context therefore uniquely identifies the property.
For example, a network variable array, nva, with 10 elements, could be declared
with a property list referencing a CP family named xyz. There would then be 10
different members of the xyz CP family, all with the same name. However,
adding the context, such as nva[4]::xyz, or nva[j]::xyz, uniquely identifies the
family member.
Because the same CP family could also be used as a device property, there is a
special context defined for the device. The device’s context is two consecutive
colon characters without a preceding context identifier.
If accessing a CP family or network variable CP where each member is an array,
you can add an array index expression to the end of the context/property
reference expression, just as you would add an array index expression to any
other array in C.
Using the example above with xyz being a name of a configuration property
array, the expression nva[4]::xyz evaluates to the entire configuration property
array (the expression returns the address of the array’s first element), whereas
nva[4]::xyz[2] returns the third element of the configuration property array that
applies to the fifth element of the nva network variable array.
Finally, even though a configuration network variable can be uniquely accessed
through its variable identifier, it can also be accessed through the context
expression, just like the CP family members.
When accessing a member of a configuration property family that implements a
device property, the context expression is an empty string. For example, ::cpXyz
refers to a device property cpXyz.
For more information about accessing configuration properties, including
examples, see
Configuration Properties
in the
Neuron C Programmer’s Guide
.
Message Tags
A
message tag
is a connection point for application messages. Incoming
application messages are always received on a common message tag called
msg_in, but you must declare one or more message tags if
outgoing
explicit
messages are used. The incoming tag and each outgoing tag or tags can be
assigned a unique network address by a network tool.