Data formatting, Formatspec property, See data – Echelon LNS User Manual
Page 255
LNS Programmer's Guide
241
If a configuration property is implemented using a configuration network variable, the
monitoring performance for that configuration property would be similar to the
monitoring of an input network variable.
When you write an application to monitor configuration property values, you should take
the configuration property access method into account, as the time required to access the
configuration properties on your network will impact the overall performance of your
application. And although you need to consider these implications, you should remember
that LNS supports all methods to access a configuration property transparently.
Regardless of whether a configuration property is implemented as a configuration
network variable or as a configuration property in files, or whether the device
implements an FTP server with or without random access, your LNS application will
maintain the configuration property using the same techniques described in this section.
Data Formatting
When displaying the values of
NvMonitorPoint
,
MsgMonitorPoint
, and
DataPoint
objects with your monitor and control application, you should generally use the
FormattedValue
property. The
FormattedValue
property is a variant type that can
contain a wide variety of formatted types. This section describes the factors that affect
what data will be stored in the FormattedValue property, and how your application will
display the data stored in the
FormattedValue
property.
FormatSpec Property
The
NvMonitorPoint
and
DataPoint
objects both contain a
FormatSpec
property.
This property contains a
FormatSpec
object. Similarly, MsgMonitorPoint objects
contain an InputFormatSpec and an OutputFormatSpec property, each of which
contains a FormatSpec object (one for incoming messages, the other for outgoing
messages). Each FormatSpec object specifies a base type from the device resource files.
The base type determines the type of data that is stored in the monitor point or data
point.
All applications can use the Standard Network Variable Types (SNVTs) and Standard
Configuration Property Types (SCPTs) contained in the
Standard.TYP
file, which is
available on the LonMark website at
SNVTs and SCPTs include most standard data types that are used in control networks
(temperature, heat, luminosity, pressure, etc). Manufacturers may also create User
Network Variable Types (UNVTs) and User Configuration Property Types (UCPTs),
which define data types that are specific to a device or devices created by the
manufacturer. The standard resource files are automatically installed with every version
of LNS, and you can obtain updates to the standard device resource files online at
of the installation of device-specific plug-in software. When in doubt, contact your device
manufacturer for details.
As described in the Device Interfaces section in Chapter 6 of this document, each set of
resource files must be associated with a particular program ID, a range of program IDs,
or with all program IDs to associate it with a network variable, configuration property, or
LonMarkObject
on a device. The type of association is called the scope of the resource
file, and the scope is specified using a scope selector. The scope selector for a resource file
specifies what part or parts of a device’s program ID should be used when selecting the