Communication Driver Design
VTScada was created using an object-oriented, layered approach to software design, and it is highly recommended that VTScada communication drivers follow suit. One advantage to this approach is modularity, because components may be added or removed without affecting critical components. Layers are designed to build on the functions and services of the lower layers. The communication driver software should be self-contained, and have only a few well-defined entry points. This makes it less reliant on other code so that changes to one part will have a limited effect on other parts of VTScada.
The error state of Communication drivers can be represented on a page by a Status Color Indicator Widget. For the widget to use the error colors defined in an associated Style Settings tag, the driver must contain a flag named ValueIsErrorStatus, set to TRUE. If this flag does not exist, or is not set TRUE, then the widget will use the colors defined for state 0 and state 1 in the Style Settings tag.
By default, zero is defined as "no error" and all other values as "error". You can expand the range of "no error" values by using the following two parameters:
ValueIsErrorAbove as a numeric. This is the value above which the tag will be treated as being in error. Defaults to 0.
ValueIsErrorBelow as a numeric. This is the value below which the tag will be treated as being in error. Defaults to 0.
Error Messages
If you are writing a driver that will become part of VTScada you will need to supply a list of known error codes and matching messages. When adding those to the language file, en.csv, they must all follow a common naming format, as follows. The number may be decimal or hexadecimal as used by the driver. Do not include the words "driver" or "label".
NameErrMsgNum
Examples from en.csv:
ABErrMsg0x200,Communication Failure - Retry Limit Exceeded,6CIPENIPErrMsg0x0001,Connection failure,6GE90SerialErrMsg01,Privilege Level Insufficient,6