CvsClient Methods
The CvsClient object contains the following methods:
Methods ending in Ex represent extended messaging functionality, for example, getting and storing the Long Point Id in the entry record, and getting and storing extended value fields, e.g., TimeStampType, UserStatus, and ValueType fields.
A description for each variant object can be found in CxCvsLib Helper Objects.
AlphaGet
Syntax
AlphaGet(Request As AlphaGetReq, Response As AlphaGetResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
AlphaGetRtREx
Syntax
AlphaGetRtREx (Request As AlphaGetRtRExReq, Response As AlphaGetRtRExResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
Connect
The Connect method connects the object to a service.
Syntax
Connect(DomainSiteService As String)
Parameters
| Parameter | Required | Description |
|---|---|---|
|
DomainSiteService |
Yes |
The [Domain]Site.Service to which to connect. The domain is optional. The service must be a valid one. |
Remarks
Returns 0 if successful and a non-zero value if the connection failed.
Example
The following example connects the Client object to the CYGDEMO.<SVC> on domain 5410:
Sub TheView_EventInitialize()
'Connect to a UIS
Dim This : Set This = TheView
CvsClient.Connect("[5410]CYGDEMO.UIS")
End Sub
Disconnect
The Disconnect method disconnects from the connected service.
Syntax
Disconnect() As Integer
Remarks
The Disconnect method returns 0 if successful and a non-zero value if the disconnect failed.
Example
The following example disconnects the Client object from the connected service, and pops a message box if it is unsuccessful:
Sub Svc.Disconnect()
<SvcClient>.Disconnect()
MsgBox "Service has disconnected."
If <SvcClient>.Disconnect <> 0
Then
MsgBox "Failed to disconnect."
End If
End Sub
The following example disconnects from the CVS when the button is clicked.
Sub btnButton_EventClick()
Dim This : Set This = btnButton
Dim iTest
iTest = CvsClient.Disconnect()
If iTest <> 0 Then
MsgBox "Error in disconnecting"
End If
End Sub
GetConsoleData
The GetConsoleData method returns the console text and display attributes as two 25x80 arrays of unsigned characters.
Syntax
GetConsoleData(ByRef pText, ByRef pAttr) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
pText |
Yes |
A two-dimensional 25x80 array of console text attributes returned by this method. |
|
pAttr |
Yes |
A two-dimensional 25x80 array of console display attributes returned by this method. |
Remarks
This method returns 0 if successful.
Example
The following example writes the console text and display attributes to a CSV file.
Sub
Dim aryText, aryAttr, nRet
nRet = <NameofServiceClientObject>.GetConsoleData(aryText, aryAttr)
' Write text attributes to CSV file
Dim i, j, strMsg
For i = 0 To UBound(aryText, 1)
For j = 0 To UBound(aryText, 2)
strMsg = strMsg + CStr(aryText(i, j)) + ","
Next
strMsg = strMsg + vbCr
Next
dim fso, file
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile("c:\console_text_attrs.csv", 2, True)
file.WriteLine(strMsg)
file.Close
strMsg = ""
' Write display attributes to CSV file
For i = 0 To UBound(aryAttr, 1)
For j = 0 To UBound(aryAttr, 2)
strMsg = strMsg + CStr(aryAttr(i, j)) + ","
Next
strMsg = strMsg + vbCr
Next
Set file = fso.OpenTextFile("c:\console_disp_attrs.csv", 2, True)
file.WriteLine(strMsg)
file.Close
MsgBox nRet
End Sub
GetFacilityList
The GetFacilityList method returns a list of facility IDs in a CVS.
Syntax
GetFacilityList(ByRef FacilityList) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
FacilityList |
Yes |
Output. The array of facilities received. |
GetNamedRec
Syntax
GetNamedRec(Request As GetNamedRecReq, Response As GetNamedRecResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetNamedRtREx
Syntax
GetNamedRtREx(Request As GetNamedRtRExReq, Response As GetNamedRtRExResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetNamedSRtREx
Syntax
GetNamedSRtREx(Request As GetNamedSRtRExReq, Response As GetNamedSRtRExResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetPointList
The GetPointList method returns a list of Short Point IDs.
Syntax
GetPointList(Descriptor As String, ByRef PointList) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Descriptor |
Yes |
Indicates the descriptor(s) to retrieve for the point. |
|
PointList |
Yes |
Output. The array of Short Point IDs returned. |
GetRec
Syntax
GetRec(Request As GetRecReq, Response As GetRecResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetReferences
The GetReferences method refreshes the list of services referenced by the connected service.
Syntax
GetReferences() As Integer
Return Values
This method returns all references for the connected service.
Example
The following example refreshes the connected services:
Sub GetReferences()
<NameofServiceClientObject>.GetReferences
MsgBox "Services references retrieved"
End Sub
The following example refreshes the referenced services.
Sub GetReferences()
'Create and initialize the CVS Client
Dim CvsClient
Set CvsClient = CreateObject("CxCvs.CvsClient")
CvsClient.Connect("CYGDEMO.UIS")
uisClient.GetReferences()
End Sub
GetRefs
Syntax
GetRefs(Request As GetRefsReq, Response As GetRefsResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetRtREx
Syntax
GetRtREx(Request As GetRtRExReq, Response As GetRtRExResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetShortNamedRec
Syntax
GetShortNamedRec(Request As GetShortNamedRecReq, Response As GetShortNamedRecResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetShortRec
Syntax
GetShortRec(Request As GetShortRecReq, Response As GetShortRecResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetSNamedRtREx
Syntax
GetSNamedRtREx(Request As GetSNamedRtRExReq, Response As GetSNamedRtRExResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
GetSRtREx
Syntax
GetSRtREx(Request As GetSRtRExReq, Response As GetSRtRExResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
MatchName
Syntax
MatchName(Request As MatchNameReq, Response As MatchNameResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
MatchNamedRtREx
Syntax
MatchNamedRtREx(Request As MatchNamedRtRExReq, Response As MatchNamedRtRExResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
ResolvePoints
The ResolvePoints method resolves a list of facility UDCs or Long Point IDs.
Syntax
ResolvePoints(TagList, ByRef PointList) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
TagList |
Yes |
An array of Long Point IDs or facility UDCs (in "FACILITY.UDC" format) to convert to Short Point IDs. |
|
PointList |
Yes |
Output. The array of Short Point IDs returned. |
SetRecord
Syntax
SetRecord(Request As SetRecordReq, Response As SetRecordResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |
SetRtREx
Syntax
SetRtREx(Request As SetRtRExReq, Response As SetRtRExResp) As Integer
Parameters
| Parameter | Required | Description | Variant |
|---|---|---|---|
|
Request |
Yes |
The request object that contains the parameters for this method. |
|
|
Response |
Yes |
The response object that contains the output of this method. |


