Interface GenDriverAPI4Contacts
-
public interface GenDriverAPI4ContactsDefines the interface of a digital contacts interface driver.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanconnect()Connects to the contacts interface.voiddisconnect()Disconnects from the contacts interface.booleanisConnected()Tells if the contacts interface is connected.boolean[]readContacts(java.lang.String functionalProfileName, java.lang.String dataPointName)Reads the state of the digital contacts according to a specific functional profile and data point.voidwriteContacts(java.lang.String functionalProfileName, java.lang.String dataPointName, boolean[] values)Writes the state of the digital contacts according to a specific functional profile and data point.
-
-
-
Method Detail
-
connect
boolean connect() throws GenDriverExceptionConnects to the contacts interface.- Returns:
- true if connected, false otherwise
- Throws:
GenDriverException- when connection failed
-
disconnect
void disconnect() throws GenDriverExceptionDisconnects from the contacts interface.- Throws:
GenDriverException- when an error occurred
-
isConnected
boolean isConnected()
Tells if the contacts interface is connected.- Returns:
- true if connected, false otherwise
-
readContacts
boolean[] readContacts(java.lang.String functionalProfileName, java.lang.String dataPointName) throws GenDriverExceptionReads the state of the digital contacts according to a specific functional profile and data point. The number of contacts returned is determined by the driver instance.- Parameters:
functionalProfileName- the functional profile namedataPointName- the data point name- Returns:
- an array of boolean
- Throws:
GenDriverException- when an error occurred
-
writeContacts
void writeContacts(java.lang.String functionalProfileName, java.lang.String dataPointName, boolean[] values) throws GenDriverExceptionWrites the state of the digital contacts according to a specific functional profile and data point. If the given number of values is less than the driver instance's, only the first n contacts are written.- Parameters:
functionalProfileName- the functional profile namedataPointName- the data point namevalues- an array of boolean containing the states to write- Throws:
GenDriverException- when an error occurred
-
-