| 304 | #endif |
| 305 | |
| 306 | MachineStatus handlePrimitive(const L3Frame *frame, L3LogicalChannel *lch) |
| 307 | { |
| 308 | switch (frame->primitive()) { |
| 309 | case GSM::ESTABLISH: |
| 310 | // Indicates SABM mode establishment. The state machines that use machineRunState can ignore these. |
| 311 | // The transaction is started by an L3 message like CMServiceRequest. |
| 312 | return MachineStatusOK; |
| 313 | default: |
| 314 | // We took all the other primitives out of the message stream in csl3HandleFrame |
| 315 | assert(0); |
| 316 | //case GSM::HANDOVER_ACCESS: |
| 317 | // // TODO: test that this is on TCHFACH not SDCCH. |
| 318 | // assert(0); // Someone higher handled this. |
| 319 | // //ProcessHandoverAccess(lch); |
| 320 | // return MachineStatusQuitChannel; |
| 321 | // |
| 322 | //case DATA: |
| 323 | //case UNIT_DATA: |
| 324 | // assert(0); // Caller checked this. |
| 325 | // |
| 326 | //case ERROR: ///< channel error |
| 327 | // // The LAPDM controller was aborted. |
| 328 | // lch->chanRelease(RELEASE); // Kill off all the transactions associated with this channel. |
| 329 | // return MachineStatusQuitChannel; |
| 330 | // |
| 331 | //case HARDRELEASE: |
| 332 | // if (frame->getSAPI() == 0) { lch->chanRelease(HARDRELEASE); } // Release the channel. |
| 333 | // return MachineStatusQuitChannel; |
| 334 | //default: |
| 335 | // LOG(ERR) <<lch<<"unhandled primitive: " << frame->primitive(); // This is horrible. But lets warn instead of crashing. |
| 336 | // // Fall through |
| 337 | //case RELEASE: ///< normal channel release |
| 338 | // if (frame->getSAPI() == 0) { lch->chanRelease(RELEASE); } |
| 339 | // return MachineStatusQuitChannel; |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | // The state machines may receive messages via machineRunState or machineRunState1. |
| 344 | // This is the extended version that lets the state machine handle the primitives, unparseable messages, |
no test coverage detected