void test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl() { RETURN_CODE_TYPE test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_runtime_call_ret; test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_behaviorIdentifier_enum whichPortActivated = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_behaviorIdentifier_enum_default_behavior; while(1) { switch(the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_current_state) { case test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_current_state = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_behaviorIdentifier_enum_default_behavior; break; } case test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_current_state = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_BA_entrypoint_exec_state; PERIODIC_WAIT (&test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_runtime_call_ret); break; } case test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: system_part_pollCallSequence -- Priority 0 if(whichPortActivated == test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_behaviorIdentifier_enum_default_behavior) { the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_current_state = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_the_cpu2_system_part_comm_entrypoint_impl_BA_entrypoint_wait_dispatch_state; rtl8029_polling (); break; } } } }
void test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl() { RETURN_CODE_TYPE test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl_the_proc_the_periodic_runtime_call_ret; test_sporadic_refined_model__the_proc_the_periodic_behaviorIdentifier_enum whichPortActivated = test_sporadic_refined_model__the_proc_the_periodic_behaviorIdentifier_enum_default_behavior; while(1) { switch(the_proc_the_periodic_entrypoint_impl_current_state) { case test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { the_proc_the_periodic_entrypoint_impl_current_state = test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = test_sporadic_refined_model__the_proc_the_periodic_behaviorIdentifier_enum_default_behavior; break; } case test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { the_proc_the_periodic_entrypoint_impl_current_state = test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl_BA_entrypoint_exec_state; PERIODIC_WAIT (&test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl_the_proc_the_periodic_runtime_call_ret); break; } case test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: call -- Priority 0 if(whichPortActivated == test_sporadic_refined_model__the_proc_the_periodic_behaviorIdentifier_enum_default_behavior) { the_proc_the_periodic_entrypoint_impl_current_state = test_sporadic_refined_model__the_proc_the_periodic_entrypoint_impl_BA_entrypoint_wait_dispatch_state; periodic (); break; } } } }
void PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl( SAMPLING_PORT_ID_TYPE * PongIn, BLACKBOARD_ID_TYPE * PortCnx9_delayed_PongIn, SAMPLING_PORT_ID_TYPE * mode_aadlKeywords, SEQ * seqNb, PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_currentState * Parent_BA_currentState_Access) { PingPongMessage PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_PongIn_localVariable; MESSAGE_SIZE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_PongIn_Length = sizeof(PingPongMessage); PingPongMessage PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_delayed_PongIn_localVariable; MESSAGE_SIZE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_delayed_PongIn_Length = sizeof(PingPongMessage); ROLE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_mode_aadlKeywords_localVariable; MESSAGE_SIZE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_mode_aadlKeywords_Length = sizeof(ROLE); RETURN_CODE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_PongIn_ErrorCode = 0; RETURN_CODE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_mode_aadlKeywords_ErrorCode = 0; VALIDITY_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_PongIn_Validity; VALIDITY_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_mode_aadlKeywords_Validity; RETURN_CODE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_S2_inst_IPingOrPong_Cping_delayed_PongIn_runtime_call_ret; PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_behaviorIdentifier_enum whichPortActivated = PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_behaviorIdentifier_enum_default_behavior; while(1) { switch(S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_current_state) { case PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_current_state = PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_behaviorIdentifier_enum_default_behavior; break; } case PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_current_state = PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_BA_entrypoint_exec_state; PERIODIC_WAIT (&PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_S2_inst_IPingOrPong_Cping_delayed_PongIn_runtime_call_ret); break; } case PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: behavior_specification_1 -- Priority 0 if(whichPortActivated == PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_behaviorIdentifier_enum_default_behavior) { S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_current_state = PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_BA_entrypoint_wait_dispatch_state; if ((*Parent_BA_currentState_Access) == PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_currentState_switch) { READ_SAMPLING_MESSAGE ((*PongIn), &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_PongIn_localVariable, PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_PongIn_Length, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_PongIn_Validity, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_S2_inst_IPingOrPong_Cping_delayed_PongIn_runtime_call_ret); READ_SAMPLING_MESSAGE ((*mode_aadlKeywords), &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_mode_aadlKeywords_localVariable, PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_mode_aadlKeywords_Length, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_mode_aadlKeywords_Validity, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_S2_inst_IPingOrPong_Cping_delayed_PongIn_runtime_call_ret); if (PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_mode_aadlKeywords_localVariable == E_ROLE_CPING) { PingPong__IPingOrPong_Cping_delayed_PongIn (&PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_PongIn_localVariable, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_delayed_PongIn_localVariable); } (*Parent_BA_currentState_Access) = PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_currentState_switch; DISPLAY_BLACKBOARD ((*PortCnx9_delayed_PongIn), &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_delayed_PongIn_localVariable, PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_delayed_PongIn_Length, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_delayed_PongIn_entrypoint_impl_S2_inst_IPingOrPong_Cping_delayed_PongIn_runtime_call_ret); } break; } } } }
void* thr3_1_job () { RETURN_CODE_TYPE ret; while (1) { printf("Partition n. 3 - Thread n.1\n"); /***************************************************************/ /* Message processing code should be placed here */ /***************************************************************/ PERIODIC_WAIT (&(ret)); } }
void* thr1_1_job () { RETURN_CODE_TYPE ret; while (1) { printf("Partition n. 1 - Thread n.1\n"); /***************************************************************/ /* Message processing code should be placed here */ /***************************************************************/ printf("1: -- do something\n\t\t1 :: Waiting on an event\n\n"); RESUME (arinc_threads[2], &(ret)); PERIODIC_WAIT (&(ret)); } }
void test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl( APEX_INTEGER * p_in) { RETURN_CODE_TYPE test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_the_proc2_the_receiver_runtime_call_ret; common_pkg__Integer test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_localVariable; MESSAGE_SIZE_TYPE test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_Length = sizeof(common_pkg__Integer); RETURN_CODE_TYPE test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_ErrorCode = 0; SYSTEM_TIME_TYPE test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_TimeOut = 0; test_queuing_refined_model__the_proc2_the_receiver_behaviorIdentifier_enum whichPortActivated = test_queuing_refined_model__the_proc2_the_receiver_behaviorIdentifier_enum_default_behavior; while(1) { switch(the_proc2_the_receiver_entrypoint_impl_current_state) { case test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { the_proc2_the_receiver_entrypoint_impl_current_state = test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = test_queuing_refined_model__the_proc2_the_receiver_behaviorIdentifier_enum_default_behavior; break; } case test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { the_proc2_the_receiver_entrypoint_impl_current_state = test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_BA_entrypoint_exec_state; PERIODIC_WAIT (&test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_the_proc2_the_receiver_runtime_call_ret); break; } case test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: call -- Priority 0 if(whichPortActivated == test_queuing_refined_model__the_proc2_the_receiver_behaviorIdentifier_enum_default_behavior) { the_proc2_the_receiver_entrypoint_impl_current_state = test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_BA_entrypoint_wait_dispatch_state; RECEIVE_QUEUING_MESSAGE ((*p_in), test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_TimeOut, &test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_localVariable, &test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_Length, &test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_ErrorCode); if (test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_ErrorCode == 0) { receive (test_queuing_refined_model__the_proc2_the_receiver_entrypoint_impl_p_in_localVariable); } break; } } } }
void* thr1_3_job () { RETURN_CODE_TYPE ret; while (1) { printf("Partition n. 1 - Thread n.3\n"); /***************************************************************/ /* Message processing code should be placed here */ /***************************************************************/ printf(" 3: -- do something\n"); printf(" 3: Setting an event UP\n\n"); SET_EVENT (pok_arinc653_events_ids[0], &(ret)); printf(" 3: Event SET -- Resume sporadic\n\n"); RESUME (arinc_threads[4], &(ret)); PERIODIC_WAIT (&(ret)); } }
void test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl( BUFFER_ID_TYPE * cnx_p_out, EVENT_ID_TYPE * cnx_p_out_entrypoint_barrier) { RETURN_CODE_TYPE test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_the_proc_the_sender_runtime_call_ret; common_pkg__Integer test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_p_out_localVariable; MESSAGE_SIZE_TYPE test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_p_out_Length = sizeof(common_pkg__Integer); SYSTEM_TIME_TYPE test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_p_out_TimeOut = 0; test_sporadic_refined_model__the_proc_the_sender_behaviorIdentifier_enum whichPortActivated = test_sporadic_refined_model__the_proc_the_sender_behaviorIdentifier_enum_default_behavior; while(1) { switch(the_proc_the_sender_entrypoint_impl_current_state) { case test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { the_proc_the_sender_entrypoint_impl_current_state = test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = test_sporadic_refined_model__the_proc_the_sender_behaviorIdentifier_enum_default_behavior; break; } case test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { the_proc_the_sender_entrypoint_impl_current_state = test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_BA_entrypoint_exec_state; PERIODIC_WAIT (&test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_the_proc_the_sender_runtime_call_ret); break; } case test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: call -- Priority 0 if(whichPortActivated == test_sporadic_refined_model__the_proc_the_sender_behaviorIdentifier_enum_default_behavior) { the_proc_the_sender_entrypoint_impl_current_state = test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_BA_entrypoint_wait_dispatch_state; send (&test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_p_out_localVariable); SEND_BUFFER ((*cnx_p_out), &test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_p_out_localVariable, test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_p_out_Length, test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_p_out_TimeOut, &test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_the_proc_the_sender_runtime_call_ret); SET_EVENT ((*cnx_p_out_entrypoint_barrier), &test_sporadic_refined_model__the_proc_the_sender_entrypoint_impl_the_proc_the_sender_runtime_call_ret); break; } } } }
void test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl( Base_Types__Unsigned_32 * the_proc2_p_in_comConnectionLength_len, pok_port_id_t * the_proc2_p_in_comConnectionPortId_port_id, APEX_INTEGER * the_proc2_p_in_cnx_p_in) { RETURN_CODE_TYPE test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_the_cpu2_system_part_comProcess_system_part_comm_runtime_call_ret; common_pkg__Integer test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_p_in_localVariable; SYSTEM_TIME_TYPE test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_p_in_TimeOut = 0; test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_behaviorIdentifier_enum whichPortActivated = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_behaviorIdentifier_enum_default_behavior; while(1) { switch(the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_current_state) { case test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_current_state = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_behaviorIdentifier_enum_default_behavior; break; } case test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_current_state = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_BA_entrypoint_exec_state; PERIODIC_WAIT (&test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_the_cpu2_system_part_comProcess_system_part_comm_runtime_call_ret); break; } case test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: the_cpu2_communicationCallSequence -- Priority 0 if(whichPortActivated == test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_behaviorIdentifier_enum_default_behavior) { the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_current_state = test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_BA_entrypoint_wait_dispatch_state; rtl8029_read (*the_proc2_p_in_comConnectionPortId_port_id, &test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_p_in_localVariable, *the_proc2_p_in_comConnectionLength_len); SEND_QUEUING_MESSAGE ((*the_proc2_p_in_cnx_p_in), &test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_p_in_localVariable, *the_proc2_p_in_comConnectionLength_len, test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_p_in_TimeOut, &test_network_rtl8029_remote_communications_refined_model__the_cpu2_system_part_comProcess_system_part_comm_entrypoint_impl_the_cpu2_system_part_comProcess_system_part_comm_runtime_call_ret); break; } } } }
void* thr1_4_job () { RETURN_CODE_TYPE ret; while (1) { printf("Partition n. 1 - Thread n.4\n"); /***************************************************************/ /* Message processing code should be placed here */ /***************************************************************/ RECEIVE_QUEUING_MESSAGE (QD_4_id, 0, QD_4_msg, &QD_4_msg_size, &(ret)); if (ret == 0){ printf(" RECEIVED message 0x%x from port 5, size %d, ret: %i\n",((unsigned char *)QD_4_msg)[0], QD_4_msg_size, ret); }else{ printf(" Port empty or RECEIVE error: %d\n\n", ret); } PERIODIC_WAIT (&(ret)); } }
void test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl( SAMPLING_PORT_ID_TYPE * cnx_p_out) { RETURN_CODE_TYPE test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_the_proc1_the_sender_runtime_call_ret; common_pkg__Integer test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_p_out_localVariable; MESSAGE_SIZE_TYPE test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_p_out_Length = sizeof(common_pkg__Integer); test_sampling_refined_model__the_proc1_the_sender_behaviorIdentifier_enum whichPortActivated = test_sampling_refined_model__the_proc1_the_sender_behaviorIdentifier_enum_default_behavior; while(1) { switch(the_proc1_the_sender_entrypoint_impl_current_state) { case test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { the_proc1_the_sender_entrypoint_impl_current_state = test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = test_sampling_refined_model__the_proc1_the_sender_behaviorIdentifier_enum_default_behavior; break; } case test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { the_proc1_the_sender_entrypoint_impl_current_state = test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_BA_entrypoint_exec_state; PERIODIC_WAIT (&test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_the_proc1_the_sender_runtime_call_ret); break; } case test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: call -- Priority 0 if(whichPortActivated == test_sampling_refined_model__the_proc1_the_sender_behaviorIdentifier_enum_default_behavior) { the_proc1_the_sender_entrypoint_impl_current_state = test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_BA_entrypoint_wait_dispatch_state; send (&test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_p_out_localVariable); WRITE_SAMPLING_MESSAGE ((*cnx_p_out), &test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_p_out_localVariable, test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_p_out_Length, &test_sampling_refined_model__the_proc1_the_sender_entrypoint_impl_the_proc1_the_sender_runtime_call_ret); break; } } } }
void* thr1_3_job () { RETURN_CODE_TYPE ret; unsigned char val8 = 8; QS_7_msg = &val8; QS_7_msg_size = sizeof(unsigned char); while (1) { printf("Partition n. 1 - Thread n.3\n"); /***************************************************************/ /* Message processing code should be placed here */ /***************************************************************/ SEND_QUEUING_MESSAGE (QS_7_id, QS_7_msg, QS_7_msg_size, 0, &(ret)); printf(" SENT message 0x%x to port 8, size: %d, ret: %d\n", ((unsigned char *)QS_7_msg)[0], QS_7_msg_size, ret); PERIODIC_WAIT (&(ret)); } }
void* thr1_1_job () { RETURN_CODE_TYPE ret; unsigned char val1 = 1; SS_0_msg = &val1; SS_0_msg_size = sizeof(unsigned char); while (1) { printf("Partition n. 1 - Thread n.1\n"); /***************************************************************/ /* Message processing code should be placed here */ /***************************************************************/ WRITE_SAMPLING_MESSAGE (SS_0_id, SS_0_msg, SS_0_msg_size, &(ret)); printf(" WRITTEN message 0x%x to port 1, size: %d, ret: %d\n", ((unsigned char *)SS_0_msg)[0], SS_0_msg_size, ret); PERIODIC_WAIT (&(ret)); } }
void PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl( BLACKBOARD_ID_TYPE * delayed_PongIn, SAMPLING_PORT_ID_TYPE * PortCnx6_PingOut, SAMPLING_PORT_ID_TYPE * PortCnx8_badSequenceNumber, SAMPLING_PORT_ID_TYPE * mode_aadlKeywords, SEQ * seqNb, PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_currentState * Parent_BA_currentState_Access, Base_Types__Integer_16 * PingOut_freshnessIndicator_access) { PingPongMessage PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_delayed_PongIn_localVariable; MESSAGE_SIZE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_delayed_PongIn_Length = sizeof(PingPongMessage); PingPong_refined_model__PingPongMessage_freshness_t_impl PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_PingOut_localVariable; MESSAGE_SIZE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_PingOut_Length = sizeof(PingPong_refined_model__PingPongMessage_freshness_t_impl); Exception PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_badSequenceNumber_localVariable; MESSAGE_SIZE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_badSequenceNumber_Length = sizeof(Exception); ROLE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_mode_aadlKeywords_localVariable; MESSAGE_SIZE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_mode_aadlKeywords_Length = sizeof(ROLE); RETURN_CODE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_delayed_PongIn_ErrorCode = 0; RETURN_CODE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_mode_aadlKeywords_ErrorCode = 0; VALIDITY_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_mode_aadlKeywords_Validity; SYSTEM_TIME_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_delayed_PongIn_TimeOut = 0; RETURN_CODE_TYPE PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_S2_inst_IPingOrPong_Cping_ping_runtime_call_ret; PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_behaviorIdentifier_enum whichPortActivated = PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_behaviorIdentifier_enum_default_behavior; while(1) { switch(S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_current_state) { case PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_BA_entrypoint_init_state: // Transition id: which_behavior_default_mode if(1) // no execution condition { S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_current_state = PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_BA_entrypoint_exec_state; whichPortActivated = PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_behaviorIdentifier_enum_default_behavior; break; } case PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_BA_entrypoint_wait_dispatch_state: // Transition id: dispatch_transition if(1) // no execution condition { S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_current_state = PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_BA_entrypoint_exec_state; PERIODIC_WAIT (&PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_S2_inst_IPingOrPong_Cping_ping_runtime_call_ret); break; } case PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_BA_entrypoint_exec_state: // Transition id: behavior_specification_1 -- Priority 0 if(whichPortActivated == PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_behaviorIdentifier_enum_default_behavior) { S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_current_state = PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_BA_entrypoint_wait_dispatch_state; if ((*Parent_BA_currentState_Access) == PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_currentState_switch) { READ_BLACKBOARD ((*delayed_PongIn), PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_delayed_PongIn_TimeOut, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_delayed_PongIn_localVariable, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_delayed_PongIn_Length, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_S2_inst_IPingOrPong_Cping_ping_runtime_call_ret); READ_SAMPLING_MESSAGE ((*mode_aadlKeywords), &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_mode_aadlKeywords_localVariable, PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_mode_aadlKeywords_Length, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_mode_aadlKeywords_Validity, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_S2_inst_IPingOrPong_Cping_ping_runtime_call_ret); if (PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_mode_aadlKeywords_localVariable == E_ROLE_CPING) { IPingOrPong_Cping_ping (&PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_delayed_PongIn_localVariable, &(PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_PingOut_localVariable.pvalue), &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_badSequenceNumber_localVariable, seqNb, seqNb); } PingOut_freshnessIndicator_access = PingOut_freshnessIndicator_access + 1; PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_PingOut_localVariable.fresh_ba = PingOut_freshnessIndicator_access; (*Parent_BA_currentState_Access) = PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_currentState_switch; WRITE_SAMPLING_MESSAGE ((*PortCnx6_PingOut), &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_PingOut_localVariable, PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_PingOut_Length, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_S2_inst_IPingOrPong_Cping_ping_runtime_call_ret); WRITE_SAMPLING_MESSAGE ((*PortCnx8_badSequenceNumber), &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_badSequenceNumber_localVariable, PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_badSequenceNumber_Length, &PingPong_refined_model__S2_inst_IPingOrPong_Cping_ping_entrypoint_impl_S2_inst_IPingOrPong_Cping_ping_runtime_call_ret); } break; } } } }