Loading…

Method Name: ejx_method_status_sim

Method ID: 0x41EA

Method Label: Status simulate

Method Help: 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(1632)),literal_string(1633));
  • switch (choice)
  • {
  • case 0:
  • mode = SELECT_FROM_LIST(literal_string(1634),literal_string(1635));
  • _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(1636),literal_string(1637));
  • switch (sts)
  • {
  • case 0:
  • switch (SELECT_FROM_LIST(literal_string(1638),literal_string(1639)))
  • {
  • 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(1638),literal_string(1640)))
  • {
  • case 0:
  • idx = 57;
  • break;
  • case 1:
  • idx = 58;
  • break;
  • }
  • break;
  • case 2:
  • switch (SELECT_FROM_LIST(literal_string(1638),literal_string(1641)))
  • {
  • case 0:
  • idx = 72;
  • break;
  • case 1:
  • idx = 73;
  • break;
  • case 2:
  • idx = 74;
  • break;
  • case 3:


Please login for more