Loading…

Method Name: method_read_eventlogbook_LIGHT

Method ID: 0x47D7

Method Label: Read events

Method Help:


  • {
  • int nState;
  • int count_retries;
  • int nTransaction;
  • int nMasterLength;
  • int nMaxLoops;
  • long nFilter;
  • long nBCT;
  • long i;
  • long j;
  • long nCurrent;
  • long jMaxLoops;
  • unsigned int byte0;
  • unsigned int byte1;
  • unsigned int byte2;
  • unsigned int byte3;
  • unsigned int byte4;
  • unsigned int dwData;
  • long varid[2];
  • int tabnState[2];
  • long select;
  • unsigned int compareDW[29];
  • unsigned int compareVal;
  • int configChangedType;
  • _iassign(17330,0);
  • _iassign(18711,0);
  • save_values();
  • nState = 0;
  • _iassign(17794,0);
  • varid[0] = 17794;
  • save_values();
  • _set_all_resp_code(0);
  • _set_device_status(0xFF,0);
  • i = 0;
  • send_command_trans(143,10);
  • nBCT = _ivar_value(17634);
  • if (nBCT == 0 || nBCT == 107)
  • {
  • compareDW[0] = 0x3a7d6d3d;
  • compareDW[1] = 0x513e2d2d;
  • compareDW[2] = 0x717a2f6a;
  • compareDW[3] = 0x43755f46;
  • compareDW[4] = 0x41247658;
  • compareDW[5] = 0x6b3d3734;
  • compareDW[6] = 0x76737076;
  • compareDW[7] = 0x6137416f;
  • compareDW[8] = 0x435b515d;
  • compareDW[9] = 0x2b50534a;
  • compareDW[10] = 0x26766a33;
  • compareDW[11] = 0x626f235e;
  • compareDW[12] = 0x61aa7347;
  • compareDW[13] = 0x6e735477;
  • compareDW[14] = 0x264c4c34;
  • compareDW[15] = 0x3462787d;
  • compareDW[16] = 0x3a7d6d3d;
  • compareDW[17] = 0x513e2d2d;
  • compareDW[18] = 0x717a2f6a;
  • compareDW[19] = 0x43755f46;
  • compareDW[20] = 0x41247658;
  • compareDW[21] = 0x6b3d3734;
  • compareDW[22] = 0x76737076;
  • compareDW[23] = 0x6137416f;
  • compareDW[24] = 0x435b515d;
  • compareDW[25] = 0x2b50534a;
  • compareDW[26] = 0x26766a33;
  • _iassign(17634,107);
  • send_command_trans(143,0);
  • for (i = 0; i < 25; i++)
  • {
  • compareVal = _ivar_value(resolve_array_ref(17731,i));
  • if (compareDW[i] != compareVal)
  • {
  • break;
  • }
  • }
  • remove_all_abort();
  • }
  • if (i == 25)
  • {
  • nTransaction = 60;
  • nMaxLoops = 5;
  • jMaxLoops = 2;
  • nMasterLength = 38;
  • _iassign(17634,38);
  • }
  • else
  • {
  • nTransaction = 50;
  • nMaxLoops = 10;
  • jMaxLoops = 1;
  • nMasterLength = 18;
  • _iassign(17634,18);
  • }
  • send_command_trans(173,267);
  • send_command_trans(173,259);
  • _add_abort_method(17793);
  • _iassign(17732,133);
  • i = _ivar_value(17328);
  • save_values();
  • count_retries = 1;
  • _iassign(17343,2);
  • send_command_trans(146,1);
  • tabnState[0] = 17327;
  • nState = _ivar_value(17327);
  • while (count_retries < 30 && nState != 100)
  • {
  • DELAY(2,literal_string(2833));
  • _iassign(17732,133);
  • i = _ivar_value(17328);
  • save_values();
  • send_command_trans(146,1);
  • count_retries = count_retries + 1;
  • nState = _ivar_value(17327);
  • tabnState[0] = 17327;
  • }
  • if (nState != 100)
  • {
  • ACKNOWLEDGE(literal_string(2834));
  • _iassign(17330,0);
  • save_values();
  • }
  • if (nState == 100)
  • {
  • count_retries = 1;
  • _iassign(17732,133);
  • i = _ivar_value(17328);
  • save_values();
  • send_command_trans(147,1);
  • tabnState[0] = 17327;
  • nState = _ivar_value(17327);
  • save_values();
  • while (count_retries < 15 && nState != 100)
  • {
  • DELAY(2,literal_string(2833));
  • send_command_trans(147,1);
  • count_retries = count_retries + 1;
  • nState = _ivar_value(17327);
  • tabnState[0] = 17327;
  • }
  • if (nState != 100)
  • {
  • ACKNOWLEDGE(literal_string(2834));
  • _iassign(17330,0);
  • save_values();
  • }
  • }
  • if (_ivar_value(17331) == 0 && nState == 100)
  • {
  • ACKNOWLEDGE(literal_string(2835) + literal_string(2836));
  • _iassign(17732,133);
  • _iassign(17748,1);
  • send_command_trans(211,0);
  • }
  • if (_ivar_value(17331) != 0)
  • {
  • _get_dev_var_value(literal_string(2837),0,18711);
  • save_values();
  • if (_ivar_value(17331) - _ivar_value(18711) >= 10)
  • {
  • _iassign(17330,10);
  • }
  • else
  • {
  • _iassign(17330,_ivar_value(17331) - _ivar_value(18711));
  • if (nMasterLength == 18)
  • {
  • nMaxLoops = CountOfHRData;
  • }
  • else
  • {
  • nMaxLoops = CountOfHRData / 2;
  • if (CountOfHRData % 2 == 1)
  • ++nMaxLoops;
  • }
  • }
  • _iassign(17734,255);
  • send_command_trans(146,1);
  • _iassign(17732,133);
  • i = _ivar_value(17328);
  • save_values();
  • count_retries = 1;
  • _iassign(17343,2);
  • send_command_trans(146,1);
  • tabnState[0] = 17327;
  • nState = _ivar_value(17327);
  • while (count_retries < 30 && nState != 100)
  • {
  • DELAY(2,literal_string(2833));
  • _iassign(17732,133);
  • i = _ivar_value(17328);
  • save_values();
  • send_command_trans(146,1);
  • count_retries = count_retries + 1;
  • nState = _ivar_value(17327);
  • tabnState[0] = 17327;
  • }
  • if (nState != 100)
  • {
  • ACKNOWLEDGE(literal_string(2834));
  • _iassign(17330,0);
  • save_values();
  • }
  • if (nState == 100)
  • {
  • count_retries = 1;
  • _iassign(17732,133);
  • i = _ivar_value(17328);
  • save_values();
  • send_command_trans(147,1);
  • tabnState[0] = 17327;
  • nState = _ivar_value(17327);
  • save_values();
  • while (count_retries < 15 && nState != 100)
  • {
  • DELAY(2,literal_string(2833));
  • send_command_trans(147,1);
  • count_retries = count_retries + 1;
  • nState = _ivar_value(17327);
  • tabnState[0] = 17327;
  • }
  • if (nState != 100)
  • {
  • ACKNOWLEDGE(literal_string(2834));
  • _iassign(17330,0);
  • save_values();
  • }
  • }
  • save_values();
  • put_message(literal_string(2838),varid);
  • _iassign(17732,133);
  • _iassign(17748,1);
  • _iassign(17749,0);
  • _iassign(17750,0);
  • _remove_abort_method(17793);
  • _add_abort_method(17792);
  • _add_abort_method(17793);
  • send_command_trans(211,0);
  • if (_ivar_value(17634) < nMasterLength)
  • {
  • nTransaction = 50;
  • nMaxLoops = 10;
  • nMasterLength = 18;
  • _iassign(17634,18);
  • }
  • device_byte_count = 19 * _ivar_value(18711);
  • save_values();
  • for (i = 1; i <= nMaxLoops; i++)
  • {
  • _iassign(17794,i * 100 / nMaxLoops);


Please login for more