Reading messages from simulator
|
|
---|---|
Hi, I need some help with TANGO (running on Virtual Box v3 downloaded from TANGO site) reading messages (temperature) dumped by a simulator (written in C) onto a port. I am using a device server and device class (MyTemperatureSensor written in C++ as given in the virtual box document) to read the values (within the Temperature attribute) and log it. (note - there is no client currently) Question - Should the reading of values from simulator (from the port where it dumps) happen in MyTemperatureSensor::read_attr_hardware OR MyTemperatureSensor::read_Temperature? I think so it should be MyTemperatureSensor::read_attr_hardware. Am I right? (I referred to the TANGO manual - 8.1.6) |
|
|
---|---|
Dear Rasesh In a device server, when a client wants to read several attributes, a call to read_attr_hardware() is made once, then each individual read_attributexx() are executed Therefore in your case, there is 2 possibility. If you reading from the simulator gives you only the value for your single attribute, then it is better to call it in read_Temperature() In the contrary, if your simulator, returns several values representing several attributes (temperature, pressures or other) then, you should execute it in read_attr_hardware() to set your internal variables. I hope it is clear
Cheers
Jean-Michel |