master/fsm_change.c
changeset 1886 a9fcecb8415c
parent 1822 74e6ac2369f4
child 1921 d9cf40facbc4
equal deleted inserted replaced
1885:622eb9b13e49 1886:a9fcecb8415c
   333 /**
   333 /**
   334    Application layer status messages.
   334    Application layer status messages.
   335 */
   335 */
   336 
   336 
   337 const ec_code_msg_t al_status_messages[] = {
   337 const ec_code_msg_t al_status_messages[] = {
       
   338     {0x0000, "No error"},
   338     {0x0001, "Unspecified error"},
   339     {0x0001, "Unspecified error"},
       
   340     {0x0002, "No Memory"},
   339     {0x0011, "Invalid requested state change"},
   341     {0x0011, "Invalid requested state change"},
   340     {0x0012, "Unknown requested state"},
   342     {0x0012, "Unknown requested state"},
   341     {0x0013, "Bootstrap not supported"},
   343     {0x0013, "Bootstrap not supported"},
   342     {0x0014, "No valid firmware"},
   344     {0x0014, "No valid firmware"},
   343     {0x0015, "Invalid mailbox configuration"},
   345     {0x0015, "Invalid mailbox configuration"},
   344     {0x0016, "Invalid mailbox configuration"},
   346     {0x0016, "Invalid mailbox configuration"},
   345     {0x0017, "Invalid sync manager configuration"},
   347     {0x0017, "Invalid sync manager configuration"},
   346     {0x0018, "No valid inputs available"},
   348     {0x0018, "No valid inputs available"},
   347     {0x0019, "No valid outputs"},
   349     {0x0019, "No valid outputs"},
   348     {0x001A, "Synchronisation error"},
   350     {0x001A, "Synchronization error"},
   349     {0x001B, "Sync manager watchdog"},
   351     {0x001B, "Sync manager watchdog"},
   350     {0x001C, "Invalid sync manager types"},
   352     {0x001C, "Invalid sync manager types"},
   351     {0x001D, "Invalid output configuration"},
   353     {0x001D, "Invalid output configuration"},
   352     {0x001E, "Invalid input configuration"},
   354     {0x001E, "Invalid input configuration"},
   353     {0x001F, "Invalid watchdog configuration"},
   355     {0x001F, "Invalid watchdog configuration"},
   354     {0x0020, "Slave needs cold start"},
   356     {0x0020, "Slave needs cold start"},
   355     {0x0021, "Slave needs INIT"},
   357     {0x0021, "Slave needs INIT"},
   356     {0x0022, "Slave needs PREOP"},
   358     {0x0022, "Slave needs PREOP"},
   357     {0x0023, "Slave needs SAFEOP"},
   359     {0x0023, "Slave needs SAFEOP"},
       
   360     {0x0024, "Invalid Input Mapping"},
       
   361     {0x0025, "Invalid Output Mapping"},
       
   362     {0x0026, "Inconsistent Settings"},
       
   363     {0x0027, "Freerun not supported"},
       
   364     {0x0028, "Synchronization not supported"},
       
   365     {0x0029, "Freerun needs 3 Buffer Mode"},
       
   366     {0x002A, "Background Watchdog"},
       
   367     {0x002B, "No Valid Inputs and Outputs"},
       
   368     {0x002C, "Fatal Sync Error"},
       
   369     {0x002D, "No Sync Error"},
   358     {0x0030, "Invalid DC SYNCH configuration"},
   370     {0x0030, "Invalid DC SYNCH configuration"},
   359     {0x0031, "Invalid DC latch configuration"},
   371     {0x0031, "Invalid DC latch configuration"},
   360     {0x0032, "PLL error"},
   372     {0x0032, "PLL error"},
   361     {0x0033, "Invalid DC IO error"},
   373     {0x0033, "DC Sync IO Error"},
   362     {0x0034, "Invalid DC timeout error"},
   374     {0x0034, "DC Sync Timeout Error"},
   363     {0x0042, "MBOX EOE"},
   375     {0x0035, "DC Invalid Sync Cycle Time"},
   364     {0x0043, "MBOX COE"},
   376     {0x0036, "DC Sync0 Cycle Time"},
   365     {0x0044, "MBOX FOE"},
   377     {0x0037, "DC Sync1 Cycle Time"},
   366     {0x0045, "MBOX SOE"},
   378     {0x0041, "MBX_AOE"},
   367     {0x004F, "MBOX VOE"},
   379     {0x0042, "MBX_EOE"},
   368     {}
   380     {0x0043, "MBX_COE"},
       
   381     {0x0044, "MBX_FOE"},
       
   382     {0x0045, "MBX_SOE"},
       
   383     {0x004F, "MBX_VOE"},
       
   384     {0x0050, "EEPROM No Access"},
       
   385     {0x0051, "EEPROM Error"},
       
   386     {0x0060, "Slave Restarted Locally"},
       
   387     {0xffff}
   369 };
   388 };
       
   389 
   370 
   390 
   371 /*****************************************************************************/
   391 /*****************************************************************************/
   372 
   392 
   373 /**
   393 /**
   374    Change state: CODE.
   394    Change state: CODE.
   395     if (datagram->working_counter != 1) {
   415     if (datagram->working_counter != 1) {
   396         EC_WARN("Reception of AL status code datagram failed: ");
   416         EC_WARN("Reception of AL status code datagram failed: ");
   397         ec_datagram_print_wc_error(datagram);
   417         ec_datagram_print_wc_error(datagram);
   398     } else {
   418     } else {
   399         code = EC_READ_U16(datagram->data);
   419         code = EC_READ_U16(datagram->data);
   400         for (al_msg = al_status_messages; al_msg->code; al_msg++) {
   420         for (al_msg = al_status_messages; al_msg->code != 0xffff; al_msg++) {
   401             if (al_msg->code != code) continue;
   421             if (al_msg->code != code) continue;
   402             EC_ERR("AL status message 0x%04X: \"%s\".\n",
   422             EC_ERR("AL status message 0x%04X: \"%s\".\n",
   403                     al_msg->code, al_msg->message);
   423                     al_msg->code, al_msg->message);
   404             break;
   424             break;
   405         }
   425         }