Defines a connection between the local client and the remote server's targeted end point
More...
|
int | Attach (string devName, string devProperty, TDataType dout, TDataType din, UInt16 access, Int32 accessRate, TLinkCallback cb, UInt32 mode, UInt32 cbId, IntPtr cbRef) |
| Initiates an asynchronous link based exclusively on the calling parameters, irrespective of those assigned to this TLink object. More...
|
|
int | Attach (TLinkCallback cb) |
| Initiates an asynchronous link. More...
|
|
int | Attach (UInt32 mode, TLinkCallback cb) |
| Initiates an asynchronous link. More...
|
|
int | Attach (UInt32 mode, TLinkCallback cb, Int32 accessRate) |
| Initiates an asynchronous link. More...
|
|
int | Close () |
| Closes a TLink. More...
|
|
int | Execute () |
| Executes a synchronous link. More...
|
|
int | Execute (string devName, string devProperty, TDataType dout, TDataType din, Int16 access, UInt32 timeout) |
| Executes a synchronous link based exclusively on the calling parameters, irrespective of those assigned to this TLink object. More...
|
|
int | Execute (UInt16 mode, UInt32 timeout) |
| Executes a synchronous link. More...
|
|
int | Execute (UInt32 timeout) |
| Executes a synchronous link. More...
|
|
UInt32 | GetAccessMode () |
| The assigned access mode (e.g. CM_SINGLE, CM_TIMER, CM_DATACHANGE). More...
|
|
Int32 | GetAccessRate () |
| The assigned access rate (or timeout parameter if a synchronous call is underway). More...
|
|
int | GetCompletionDataSize () |
| The size (array length) of the returned data More...
|
|
double | GetCompletionDataStamp () |
| The user-supplied data stamp of the returned data More...
|
|
double | GetCompletionDataTimeStamp () |
| The timestamp of the returned data More...
|
|
double | GetCompletionSystemStamp () |
| The system stamp assigned to the returned data More...
|
|
String | GetDeviceName () |
| Returns the device (module) name addressed in this link. More...
|
|
TDataType | GetInputDataType () |
| Returns the input TDataType object. More...
|
|
Int32 | GetLinkId () |
| Gets the associated link ID for this TLink instance; More...
|
|
TDataType | GetOutputDataType () |
| Returns the output TDataType object. More...
|
|
String | GetProperty () |
| Returns the device property addressed in this link. More...
|
|
Int32 | GetStatus () |
| The current link status as an integer value. More...
|
|
string | GetStatusString () |
| The current link status as a string More...
|
|
int | SetNotificationTolerance (float toleranceAbsolute, float tolerancePercent) |
|
int | SetNotificationTolerance (float toleranceAbsolute, float tolerancePercent, Int32 flags) |
|
int | SetNotificationTolerance (float toleranceAbsolute, float tolerancePercent, Int32 offset, Int32 length, Int32 flags) |
|
void | SetQueueDepth (int queueLength) |
| Sets the client-side receive queue depth More...
|
|
| TLink (string devName, string devProperty, TDataType dout, TDataType din, UInt16 access) |
| Establishes a link endpoint to the targeted server. More...
|
|
delegate void | TLinkCallback (TLink lnk) |
| A callback delegate to be called when the associated TLink needs to notify the caller that a data or status update has occured. More...
|
|
Defines a connection between the local client and the remote server's targeted end point
TLink is a TINE Link object which defines a connection between the local client and the remote server's targeted end point. Data may be exchanged either synchronously (via the Execute() method) or asynchronously (via the Attach() method). Simple commands which do not involve data can likewise be issued synchronously.
int tine.TLink.SetNotificationTolerance |
( |
float |
toleranceAbsolute, |
|
|
float |
tolerancePercent |
|
) |
| |
|
inline |
Allows the caller to apply a tolerance pertaining to link notification.
When a TINE client subscribes to data using CM_DATACHANGE mode, the data is sent from server to client when the data change without regard to any applied tolerance (zero tolerance). The client application may nonetheless wish to be notified only when the data have changed outside a given tolerance. This can be achieved by calling this routine. The same applies to CM_TIMER mode, where the data are sent server-to-client according to the schedule. In the latter case, all data comparisons are made entirely at the client side. Note that if this feature is desired in CM_TIMER mode, the CM_NODUPLICATES switch must be applied to the mode parameter in the call to AttachLink() or AttachLinkEx(). This switch will be appended automatically if SetSuppressHeartbeatNotification(TRUE) is called.
- Parameters
-
toleranceAbsolute | if non-zero is a tolerance in the data units of the in-coming data. It is checked against irrespective of the current data values. |
tolerancePercent | if non-zero is a tolerance expressed as a percent, and refers to the previous data set. |
If both an absolute tolerance and a percent tolerance are used, the absolute value of both contributions are added together to define the total tolerance which should be checked against.
- Returns
- 0 upon success
References tine.TLink.SetNotificationTolerance().
int tine.TLink.SetNotificationTolerance |
( |
float |
toleranceAbsolute, |
|
|
float |
tolerancePercent, |
|
|
Int32 |
flags |
|
) |
| |
|
inline |
Allows the caller to apply a tolerance pertaining to link notification.
When a TINE client subscribes to data using CM_DATACHANGE mode, the data is sent from server to client when the data change without regard to any applied tolerance (zero tolerance). The client application may nonetheless wish to be notified only when the data have changed outside a given tolerance. This can be achieved by calling this routine. The same applies to CM_TIMER mode, where the data are sent server-to-client according to the schedule. In the latter case, all data comparisons are made entirely at the client side. Note that if this feature is desired in CM_TIMER mode, the CM_NODUPLICATES switch must be applied to the mode parameter in the call to AttachLink() or AttachLinkEx(). This switch will be appended automatically if SetSuppressHeartbeatNotification(TRUE) is called.
- Parameters
-
toleranceAbsolute | if non-zero is a tolerance in the data units of the in-coming data. It is checked against irrespective of the current data values. |
tolerancePercent | if non-zero is a tolerance expressed as a percent, and refers to the previous data set. |
flags | is one of DTF_SUPPRESS or DTF_NOTIFY and specifies the desired form of the the 'out of tolerance' notification (DEFAULT: DTF_SUPPRESS). If DTF_SUPPRESS is specified, then callbacks will be suppressed unless there is an error or the most recent data set is out of tolerance.
If DTF_NOTIFY is specified, then callbacks will not be suppressed. However, if the most recent data set is out of tolerance, then an otherwise successful callback completion code will be flagged as CE_SENDDATA + out_of_tolerance. The caller can then make use of this form of 'out of tolerance' signal to suit his needs. |
If both an absolute tolerance and a percent tolerance are used, the absolute value of both contributions are added together to define the total tolerance which should be checked against.
- Returns
- 0 upon success
References tine.TLink.SetNotificationTolerance().
int tine.TLink.SetNotificationTolerance |
( |
float |
toleranceAbsolute, |
|
|
float |
tolerancePercent, |
|
|
Int32 |
offset, |
|
|
Int32 |
length, |
|
|
Int32 |
flags |
|
) |
| |
|
inline |
Allows the caller to apply a tolerance pertaining to link notification.
When a TINE client subscribes to data using CM_DATACHANGE mode, the data is sent from server to client when the data change without regard to any applied tolerance (zero tolerance). The client application may nonetheless wish to be notified only when the data have changed outside a given tolerance. This can be achieved by calling this routine. The same applies to CM_TIMER mode, where the data are sent server-to-client according to the schedule. In the latter case, all data comparisons are made entirely at the client side. Note that if this feature is desired in CM_TIMER mode, the CM_NODUPLICATES switch must be applied to the mode parameter in the call to AttachLink() or AttachLinkEx(). This switch will be appended automatically if SetSuppressHeartbeatNotification(TRUE) is called.
- Parameters
-
toleranceAbsolute | if non-zero is a tolerance in the data units of the in-coming data. It is checked against irrespective of the current data values. |
tolerancePercent | if non-zero is a tolerance expressed as a percent, and refers to the previous data set. |
offset | specifies the array offset to be used in data comparison (DEFAULT: 0). If the given offset is less then 0 or greater than the length of the acquired data array (i.e. > 1 if a single value is acquired) it will be automatically set to 0. |
length | specifes the length of the data array (beginning at the given offset) to be used in data comparison (DEFAULT: length of the acquire data array, or 1 if a single value is acquired). If the given value exceeds the array bounds, then it will be adjusted. |
flags | is one of DTF_SUPPRESS or DTF_NOTIFY and specifies the desired form of the the 'out of tolerance' notification (DEFAULT: DTF_SUPPRESS). If DTF_SUPPRESS is specified, then callbacks will be suppressed unless there is an error or the most recent data set is out of tolerance.
If DTF_NOTIFY is specified, then callbacks will not be suppressed. However, if the most recent data set is out of tolerance, then an otherwise successful callback completion code will be flagged as CE_SENDDATA + out_of_tolerance. The caller can then make use of this form of 'out of tolerance' signal to suit his needs. |
If both an absolute tolerance and a percent tolerance are used, the absolute value of both contributions are added together to define the total tolerance which should be checked against.
- Returns
- 0 upon success
Referenced by tine.TLink.SetNotificationTolerance().