How to use the UaoClientForOpcUaSca librairy
How to download
In your quasar project: git submodule init
https://gitlab.cern.ch/atlas-dcs-opcua-servers/UaoClientForOpcUaSca.git
After that you have to modify your cmake settings by adding the submodule :set(CUSTOM_SERVER_MODULES UaoClientForOpcUaSca )
How to use (in each method)
First create the session with the endpoints connection of the server
UaClientSdk::UaSession* session= ClientSessionFactory::connect(_Endpoints connection_);
Test the creation of the session
if (!session){
return OpcUa_BadCommunicationError;
}
Create a client with the Id of the node
UaoClientForOpcUaSca::I2cSlave registerId(session,UaNodeId(_nodeId_,2));
Several client exist
- I2CSlave
- AnalogInput
- DigitalIO
- Jtag
- Spi
- etc....
After that you can write/read
registerId.writeValue(bs);
registerId.readValue(bs);
-- Main.etfortin - 2018-11-29