Loading…

方法名称: show_active_alerts_method

方法ID: 0x4378

方法标签: Device Status

方法描述:


  • {
  • float qa, qb, qc, qd, qe; int q, q0, q1, q2, q3; char S[3];
  • int i, actCount, failFlag, maintFlag;
  • unsigned int dev_stat, dev_spec_0, dev_spec_1, dev_spec_2, dev_spec_3, dev_spec_4, dev_spec_5;
  • char status[3];
  • long ids[8];
  • _set_device_status(0xFF,0);
  • _set_xmtr_device_status(0xFF,0);
  • _set_all_resp_code(1);
  • _set_resp_code((8),0);
  • failFlag = 0;
  • maintFlag = 0;
  • send(48,S);
  • dev_stat = (_ivar_value(151) & 0x04);
  • dev_spec_0 = (_ivar_value(4139) & 0xFF );
  • dev_spec_1 = (_ivar_value(4140) & 0xCE );
  • dev_spec_2 = (_ivar_value(4141) & 0xFE );
  • dev_spec_3 = (_ivar_value(4142) & 0xFB );
  • dev_spec_4 = (_ivar_value(4143) & 0xFF );
  • dev_spec_5 = (_ivar_value(4144) & 0x0C );
  • if((dev_stat == 0) && (dev_spec_0 == 0) && (dev_spec_1 == 0) && (dev_spec_2 == 0) && (dev_spec_3 == 0) && (dev_spec_4 == 0) && (dev_spec_5 == 0))
  • {
  • send_trans(129, 0,S);
  • if(_ivar_value(16427) == 1)
  • {
  • ACKNOWLEDGE("|en|Device Status: GOOD");
  • }
  • else
  • {
  • ACKNOWLEDGE("|en|Device Status: MAINTENANCE\n\nInstrument is Out of Service.");
  • maintFlag = 1;
  • }
  • }
  • else
  • {
  • if((dev_stat & 0x80) || (dev_spec_0 & 0xF9) || (dev_spec_1 & 0x04) || (dev_spec_2 & 0xC2))
  • {
  • failFlag = 1;


请登录以获得完整内容