| 782 | } |
| 783 | |
| 784 | void NetworkSequenceCollection::parseControlMessage(int source) |
| 785 | { |
| 786 | ControlMessage controlMsg = m_comm.receiveControlMessage(); |
| 787 | switch(controlMsg.msgType) |
| 788 | { |
| 789 | case APC_SET_STATE: |
| 790 | SetState(NetworkAssemblyState(controlMsg.argument)); |
| 791 | break; |
| 792 | case APC_CHECKPOINT: |
| 793 | logger(4) << "checkpoint from " << source << ": " |
| 794 | << controlMsg.argument << '\n'; |
| 795 | m_numReachedCheckpoint++; |
| 796 | m_checkpointSum += controlMsg.argument; |
| 797 | break; |
| 798 | case APC_WAIT: |
| 799 | SetState(NAS_WAITING); |
| 800 | m_comm.barrier(); |
| 801 | break; |
| 802 | case APC_BARRIER: |
| 803 | assert(m_state == NAS_WAITING); |
| 804 | m_comm.barrier(); |
| 805 | break; |
| 806 | case APC_TRIM: |
| 807 | m_trimStep = controlMsg.argument; |
| 808 | SetState(NAS_TRIM); |
| 809 | break; |
| 810 | case APC_ERODE_COMPLETE: |
| 811 | assert(m_state == NAS_ERODE_WAITING); |
| 812 | m_comm.flush(); |
| 813 | SetState(NAS_ERODE_COMPLETE); |
| 814 | break; |
| 815 | case APC_POPBUBBLE: |
| 816 | m_numPopped = controlMsg.argument; |
| 817 | SetState(NAS_POPBUBBLE); |
| 818 | break; |
| 819 | case APC_ASSEMBLE: |
| 820 | m_numAssembled = controlMsg.argument; |
| 821 | SetState(NAS_ASSEMBLE); |
| 822 | break; |
| 823 | } |
| 824 | } |
| 825 | |
| 826 | void NetworkSequenceCollection::handle( |
| 827 | int senderID, const SeqDataRequest& message) |
nothing calls this directly
no test coverage detected