Loading…
Loading…
方法名称: ejx_method_status_simulate
方法ID: 0x41ED
方法标签: Status simulate
方法描述: Status Simulation allows a Field Device Status bit or a bit in the Command 48 response to be manipulated.
- {
- char status[3];
- char xmtr_status[25];
- int choice;
- int mode;
- int sts;
- int idx;
- {
- _set_all_resp_code(0);
- _set_device_status(0xFF,0);
- _set_xmtr_device_status(0xFF,0);
- _set_xmtr_all_resp_code(0);
- }
- ;
- while (1)
- {
- get_more_status(status,xmtr_status);
- sts_sim_mode = xmtr_status[9] & 0x01;
- choice = SELECT_FROM_LIST(BUILD_MESSAGE(literal_string(1516)),literal_string(1517));
- switch (choice)
- {
- case 0:
- mode = SELECT_FROM_LIST(literal_string(1518),literal_string(1519));
- _iassign(2444,mode);
- send(526,status);
- if (status[0])
- {
- display_response_status(526,status[0]);
- abort();
- }
- break;
- case 1:
- sts = SELECT_FROM_LIST(literal_string(1520),literal_string(1521));
- switch (sts)
- {
- case 0:
- switch (SELECT_FROM_LIST(literal_string(1522),literal_string(1523)))
- {
- case 0:
- idx = 0;
- break;
- case 1:
- idx = 1;
- break;
- case 2:
- idx = 2;
- break;
- case 3:
- idx = 3;
- break;
- case 4:
- idx = 5;
- break;
- case 5:
- idx = 6;
- break;
- case 6:
- idx = 7;
- break;
- }
- break;
- case 1:
- switch (SELECT_FROM_LIST(literal_string(1522),literal_string(1524)))
- {
请登录以获得完整内容