(cwrite name type value conf sec locked seconds nanoseconds [flags quality])
The name of the point. This is a string.
The type of point. One of
0 = string
1 = float (8-byte double)
2 = integer (32-bit integer)
A string representation of the value for the point. It will be interpreted into the type specified by the type parameter.
A confidence factor in the range of 0 to 100. This is not used by the DataHub, so is available to programs that produce graduated confidence, such as expert systems.
A security level for this point. This is rarely used. If a point's security level is set to a non-zero value then attempts to write to that point must claim a security level equal to or greater than the security level of the point. This uses a "good citizen" model - the writer can claim any security it wants, and is assumed to be honest - so there is no strong security here. It is intended for systems that want to avoid accidental changes to values. Security level can be from 0 to 32767.
An indication that the point is locked, and cannot be changed. Can be 0 or 1. Attempts to write to a locked point will fail.
The UNIX epoch - seconds since Jan. 1, 1970, as produced by the time() function.
The number of nanoseconds inside this second. Cannot exceed 1,000,000,000.
User level code should always send a 0 for this value.
A quality indicator consistent with the OPC DA specification. This is not a bit field. It can be one of:
PT_QUALITY_BAD | 0 |
PT_QUALITY_UNCERTAIN | 0x40 |
PT_QUALITY_GOOD | 0xc0 |
PT_QUALITY_CONFIG_ERROR | 0x04 |
PT_QUALITY_NOT_CONNECTED | 0x08 |
PT_QUALITY_DEVICE_FAILURE | 0x0c |
PT_QUALITY_SENSOR_FAILURE | 0x10 |
PT_QUALITY_LAST_KNOWN | 0x14 |
PT_QUALITY_COMM_FAILURE | 0x18 |
PT_QUALITY_OUT_OF_SERVICE | 0x1c |
PT_QUALITY_WAITING_FOR_INITIAL_DATA | 0x20 |
PT_QUALITY_LAST_USABLE | 0x44 |
PT_QUALITY_SENSOR_CAL | 0x50 |
PT_QUALITY_EGU_EXCEEDED | 0x54 |
PT_QUALITY_SUB_NORMAL | 0x58 |
PT_QUALITY_LOCAL_OVERRIDE | 0xd8 |
All strings can be surrounded by double-quotes if the string contains spaces or special characters. The backslash character (\) escapes double quotes and backslashes within the string. Newline, carriage return, form feed and tab are represented with \n, \r, \f, \t respectively. Strings must not contain newline characters.
This command lets you manually write information to a point. If the point does not exist, the point is automatically created and the value is written. This command is identical to the write command, except that write will produce an error if the point does not exist.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.