public final class ClientAssociation
extends java.lang.Object
ClientAssociation
is obtained using ClientSap
. An association object can be
used to execute the IEC 61850 ACSI services. Note that not all ACSI services have a corresponding
function in this API. For example all GetDirectory and GetDefinition services are covered by
retrieveModel()
. The control services can be executed by using getDataValues and
setDataValues on the control objects in the data model.Modifier and Type | Method | Description |
---|---|---|
void |
cancelUrcbReservation(Urcb urcb) |
|
void |
close() |
Will close the connection simply by closing the TCP socket.
|
void |
createDataSet(DataSet dataSet) |
The client should create the data set first and add it to either the non-persistent list or to
the model.
|
void |
deleteDataSet(DataSet dataSet) |
|
void |
deleteFile(java.lang.String filename) |
Delete a file from the server
|
void |
disableReporting(Rcb rcb) |
|
void |
disconnect() |
Will send a disconnect request first and then close the TCP socket.
|
void |
enableReporting(Rcb rcb) |
|
void |
getAllDataValues() |
Will update all data inside the model except for control variables (those that have FC=CO).
|
java.util.List<ServiceError> |
getDataSetValues(DataSet dataSet) |
The implementation of the GetDataSetValues ACSI service.
|
void |
getDataValues(FcModelNode modelNode) |
The implementation of the GetDataValues ACSI service.
|
void |
getFile(java.lang.String filename,
GetFileListener listener) |
Read a file from the server
|
java.util.List<FileInformation> |
getFileDirectory(java.lang.String directoryName) |
Read the file directory of the server
|
void |
getRcbValues(Rcb rcb) |
|
int |
getResponseTimeout() |
Gets the response timeout.
|
boolean |
isOpen() |
|
void |
operate(FcModelNode controlDataObject) |
Executes the Operate ACSI Service on the given controllable Data Object (DO).
|
void |
reserveBrcb(Brcb brcb,
short resvTime) |
|
void |
reserveUrcb(Urcb urcb) |
|
ServerModel |
retrieveModel() |
Triggers all GetDirectory and GetDefinition ACSI services needed to get the complete server
model.
|
boolean |
select(FcModelNode controlDataObject) |
Performs the Select ACSI Service of the control model on the given controllable Data Object
(DO).
|
java.util.List<ServiceError> |
setDataSetValues(DataSet dataSet) |
|
void |
setDataValues(FcModelNode modelNode) |
The implementation of the SetDataValues ACSI service.
|
java.util.List<ServiceError> |
setRcbValues(Rcb rcb,
boolean setRptId,
boolean setDatSet,
boolean setOptFlds,
boolean setBufTm,
boolean setTrgOps,
boolean setIntgPd,
boolean setPurgeBuf,
boolean setEntryId) |
Sets the selected values of the given report control block.
|
void |
setResponseTimeout(int timeout) |
Sets the response timeout.
|
void |
setServerModel(ServerModel model) |
Set the server model instead of retrieving it from the server device.
|
void |
startGi(Rcb rcb) |
|
void |
updateDataSets() |
This function will get the definition of all persistent DataSets from the server and update the
DataSets in the ServerModel that was returned by
retrieveModel or set using
setServerModel . |
public int getResponseTimeout()
public void setResponseTimeout(int timeout)
timeout
- the response timeout in milliseconds.public void setServerModel(ServerModel model)
model
- the server modelpublic ServerModel retrieveModel() throws ServiceError, java.io.IOException
ServiceError
- if a ServiceError occurs while calling any of the ASCI services.java.io.IOException
- if a fatal association error occurs. The association object will be closed
and can no longer be used after this exception is thrown.public void getDataValues(FcModelNode modelNode) throws ServiceError, java.io.IOException
ServiceError
will be thrown.modelNode
- the functionally constrained model node that is to be read.ServiceError
- if a ServiceError is returned by the server.java.io.IOException
- if a fatal association error occurs. The association object will be closed
and can no longer be used after this exception is thrown.public java.util.List<FileInformation> getFileDirectory(java.lang.String directoryName) throws ServiceError, java.io.IOException
directoryName
- name of a directory or empty string for the root directoryServiceError
- if a ServiceError is returned by the server or parsing of response failed.java.io.IOException
- if a fatal association error occurs. The association object will be closed
and can no longer be used after this exception is thrown.public void deleteFile(java.lang.String filename) throws ServiceError, java.io.IOException
filename
- name of the file to deleteServiceError
- if a ServiceError is returned by the serverjava.io.IOException
- if a fatal association error occurs. The association object will be closed
and can no longer be used after this exception is thrown.public void getFile(java.lang.String filename, GetFileListener listener) throws ServiceError, java.io.IOException
filename
- name of the file to deletelistener
- callback handler to receive fall dataServiceError
- if a ServiceError is returned by the serverjava.io.IOException
- if a fatal association error occurs. The association object will be closed
and can no longer be used after this exception is thrown.public void getAllDataValues() throws ServiceError, java.io.IOException
ServiceError
- if a ServiceError is returned by the server.java.io.IOException
- if a fatal association error occurs. The association object will be closed
and can no longer be used after this exception is thrown.public void setDataValues(FcModelNode modelNode) throws ServiceError, java.io.IOException
ServiceError
will be thrown. In this case it is not possible to find out which of
several Basic Data Attributes could not be written.modelNode
- the functionally constrained model node that is to be written.ServiceError
- if a ServiceError is returned by the server.java.io.IOException
- if a fatal association error occurs. The association object will be closed
and can no longer be used after this exception is thrown.public void updateDataSets() throws ServiceError, java.io.IOException
retrieveModel
or set using
setServerModel
. It will delete DataSets that have been deleted since the last update and add
any new DataSetsServiceError
- if a ServiceError is returned by the server.java.io.IOException
- if a fatal association error occurs. The association object will be closed
and can no longer be used after this exception is thrown.public void createDataSet(DataSet dataSet) throws ServiceError, java.io.IOException
dataSet
- the data set to be created on the server sideServiceError
- if a ServiceError is returned by the server.java.io.IOException
- if a fatal IO error occurs. The association object will be closed and can
no longer be used after this exception is thrown.public void deleteDataSet(DataSet dataSet) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public java.util.List<ServiceError> getDataSetValues(DataSet dataSet) throws java.io.IOException
null
if reading was successful and a ServiceError if reading of this member failed.dataSet
- the DataSet that is to be read.java.io.IOException
- if a fatal IO error occurs. The association object will be closed and can
no longer be used after this exception is thrown.public java.util.List<ServiceError> setDataSetValues(DataSet dataSet) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public void getRcbValues(Rcb rcb) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public void reserveUrcb(Urcb urcb) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public void reserveBrcb(Brcb brcb, short resvTime) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public void cancelUrcbReservation(Urcb urcb) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public void enableReporting(Rcb rcb) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public void disableReporting(Rcb rcb) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public void startGi(Rcb rcb) throws ServiceError, java.io.IOException
ServiceError
java.io.IOException
public java.util.List<ServiceError> setRcbValues(Rcb rcb, boolean setRptId, boolean setDatSet, boolean setOptFlds, boolean setBufTm, boolean setTrgOps, boolean setIntgPd, boolean setPurgeBuf, boolean setEntryId) throws java.io.IOException
The data set reference as it is set in an RCB must contain a dollar sign instead of a dot to separate the logical node from the data set name, e.g.: 'LDevice1/LNode$DataSetName'. Therefore his method will check the reference for a dot and if necessary convert it to a '$' sign before sending the request to the server.
The parameters PurgeBuf, EntryId are only applicable if the given rcb is of type BRCB.
rcb
- the report control blocksetRptId
- whether to set the report IDsetDatSet
- whether to set the data setsetOptFlds
- whether to set the optional fieldssetBufTm
- whether to set the buffer timesetTrgOps
- whether to set the trigger optionssetIntgPd
- whether to set the integrity periodsetPurgeBuf
- whether to set purge buffersetEntryId
- whether to set the entry IDjava.io.IOException
- if a fatal IO error occurs. The association object will be closed and can
no longer be used after this exception is thrown.public boolean select(FcModelNode controlDataObject) throws ServiceError, java.io.IOException
The selection is canceled in one of the following events:
controlDataObject
- needs to be a controllable Data Object that contains a Data Attribute
named "SBO".ServiceError
- if a ServiceError is returned by the server.java.io.IOException
- if a fatal IO error occurs. The association object will be closed and can
no longer be used after this exception is thrown.public void operate(FcModelNode controlDataObject) throws ServiceError, java.io.IOException
controlDataObject
- needs to be a controllable Data Object that contains a Data Attribute
named "Oper".ServiceError
- if a ServiceError is returned by the serverjava.io.IOException
- if a fatal IO error occurs. The association object will be closed and can
no longer be used after this exception is thrown.public boolean isOpen()
public void close()
public void disconnect()