FACT++  1.0
void ConnectionDimWeather::Update ( const Lid l1,
const Lid l2 
)
inlinevirtual

Reimplemented from ConnectionLid.

Definition at line 424 of file lidctrl.cc.

References __attribute__, ConnectionLid::Lid::current, data, ConnectionLid::Lid::position, DimService::setQuality(), ConnectionLid::Lid::status, and DimDescribedService::Update().

425  {
426  struct DimData
427  {
428  int16_t status[2];
429  float current[2];
430  float position[2];
431 
432  DimData() { status[0] = status[1] = -1; }
433 
434  } __attribute__((__packed__));
435 
436  DimData data;
437 
438  if (l1.status=="Unknown")
439  data.status[0] = 3;
440  if (l1.status=="Power Problem")
441  data.status[0] = 2;
442  if (l1.status=="Open")
443  data.status[0] = 1;
444  if (l1.status=="Closed")
445  data.status[0] = 0;
446 
447  if (l2.status=="Unknown")
448  data.status[1] = 3;
449  if (l2.status=="Power Problem")
450  data.status[1] = 2;
451  if (l2.status=="Open")
452  data.status[1] = 1;
453  if (l2.status=="Closed")
454  data.status[1] = 0;
455 
456  data.current[0] = l1.current;
457  data.current[1] = l2.current;
458 
459  data.position[0] = l1.position;
460  data.position[1] = l2.position;
461 
463  fDim.Update(data);
464  }
void setQuality(int quality)
Definition: discpp.cxx:1256
int GetState() const
Definition: gpsctrl.cc:312
Definition: DimData.h:3
typedef __attribute__
float data[4 *1440]
DimDescribedService fDim
Definition: gpsctrl.cc:333

+ Here is the call graph for this function: