Loading…
Loading…
Method Name: alert_switch_source_method
Method ID: 0x4328
Method Label: Alert Switch Source
Method Help:
- {
- int q;
- int q0;
- int q1;
- int q2;
- int q3;
- float qa;
- char S[3];
- int b0;
- int b1;
- int b2;
- int b3;
- int b4;
- int b5;
- int b6;
- int cb;
- int swtch;
- int fn;
- int om;
- unsigned int flag;
- long ids[2];
- _set_device_status(0xFF,0);
- _set_xmtr_device_status(0xFF,0);
- _set_all_resp_code(1);
- _set_resp_code(8,0);
- send(151,S);
- if (_ivar_value(16804) > 2)
- {
- ACKNOWLEDGE(literal_string(2015));
- return;
- }
- ;
- DELAY(1,literal_string(2223));
- send_trans(129,45,S);
- b0 = _ivar_value(16634);
- b1 = _ivar_value(16635);
- b2 = _ivar_value(16636);
- b3 = _ivar_value(16637);
- b4 = _ivar_value(16638);
- b5 = _ivar_value(16639);
- if (software_revision > 6)
- {
- send_trans(129,78,S);
- b6 = _ivar_value(17878);
- }
- swtch = 7;
- cb = (b4 << 24) + (b3 << 16) + (b1 << 8) + b0;
- switch (cb)
- {
- case 0x00000000:
- swtch = 0;
- break;
- case 0x08000000:
- swtch = 1;
- break;
- case 0x00000800:
- swtch = 2;
- break;
- case 0x00400000:
- swtch = 3;
- break;
- case 0x00004000:
- swtch = 4;
- break;
- case 0x095004FF:
- if (software_revision > 6 && 0x04 == b6 && 0x0C == b5 && 0xC0 == b2)
- {
- swtch = 5;
- }
- else
- if (software_revision <= 6 && 0x04 == b5 && 0xC0 == b2)
- {
- swtch = 5;
- }
- else
- {
- swtch = 7;
- }
- break;
- case 0x00001000:
- swtch = 6;
- break;
- default:
- swtch = 7;
- break;
- }
- if (5 != swtch && (b2 > 0 || b5 > 0 || b6 > 0) && software_revision > 6)
- {
- swtch = 7;
- }
- else
- if (5 != swtch && (b2 > 0 || b5 > 0) && software_revision <= 6)
- {
- swtch = 7;
- }
- if (1 == _ivar_value(16657) || 0x31 == _ivar_value(16656))
- {
- if (2 == swtch)
- {
- swtch = 7;
- }
- }
- local_alert_switch_source = swtch;
- save_values();
- ids[0] = 16966;
- flag = 1;
- if (_ivar_value(16427) == 0)
- {
- if (1 == _ivar_value(16472) || 5 == _ivar_value(16472))
- {
- flag = 0;
- if (1 == _ivar_value(16472))
- {
- if (7 == swtch)
- {
- ACKNOWLEDGE(literal_string(2398));
- }
- else
- {
- acknowledge(literal_string(2220),ids);
- }
- }
- else
- {
- if (7 == swtch)
- {
Please login for more