To start with, here is a simple RDA client application which reads from device TST.DEV1 the value of the AQN4 property and prints it out.
#include <iostream> #include <rda/RDAService.h> int main(int argc, char** argv) { try { rdaRDAService* rda = rdaRDAService::init(); rdaDeviceHandle* device = rda->getDeviceHandle("TST.DEV1"); rdaData* value = device->get("AQN4"); std::cout << "value = " << value->extractDouble("value") << std::endl; delete value; } catch(const rdaException& ex) { std::cout << "Error: " << ex << std::endl; } return 0; }
Some more client programming examples are available here look at them first before digging into the detailed API documentation. You can use this makefile to compile and link the examples on Linux systems in the AB controls environment.
rdaRDAService | Manages communications with remote devices and serves as a factory for rdaDeviceHandle objects |
rdaDeviceHandle | Allows to invoke device access methods on a remote device |
rdaReplyHandler | Defines a callback interface for receiving results of subscriptions and asynchronous device calls |
rdaSubscription | Provides a simple and easy to use API for creating and managing subscriptions on device property values |