src/states.c
changeset 746 3e16d9a121b8
parent 668 ba53613e94e4
child 750 bfb63ff7106e
equal deleted inserted replaced
745:0bd84a528133 746:3e16d9a121b8
   179 			{
   179 			{
   180 				
   180 				
   181 				s_state_communication newCommunicationState = {0, 1, 1, 1, 1, 0, 1};
   181 				s_state_communication newCommunicationState = {0, 1, 1, 1, 1, 0, 1};
   182 				d->nodeState = Pre_operational;
   182 				d->nodeState = Pre_operational;
   183 				switchCommunicationState(d, &newCommunicationState);
   183 				switchCommunicationState(d, &newCommunicationState);
   184 				if (!(*(d->iam_a_slave)))
       
   185 				{
       
   186 					masterSendNMTstateChange (d, 0, NMT_Reset_Node);
       
   187 				}
       
   188                 (*d->preOperational)(d);
   184                 (*d->preOperational)(d);
   189 			}
   185 			}
   190 			break;
   186 			break;
   191 								
   187 								
   192 			case Operational:
   188 			case Operational:
   311   /* bDeviceNodeId is defined in the object dictionary. */
   307   /* bDeviceNodeId is defined in the object dictionary. */
   312   *d->bDeviceNodeId = nodeId;
   308   *d->bDeviceNodeId = nodeId;
   313 }
   309 }
   314 
   310 
   315 void _initialisation(CO_Data* d){}
   311 void _initialisation(CO_Data* d){}
   316 void _preOperational(CO_Data* d){}
   312 void _preOperational(CO_Data* d){
       
   313     if (!(*(d->iam_a_slave)))
       
   314     {
       
   315         masterSendNMTstateChange (d, 0, NMT_Reset_Node);
       
   316     }
       
   317 }
   317 void _operational(CO_Data* d){}
   318 void _operational(CO_Data* d){}
   318 void _stopped(CO_Data* d){}
   319 void _stopped(CO_Data* d){}