@@ -45,6 +45,8 @@ static lf_ret_t S4NOCPollChannel_send_blocking(NetworkChannel *untyped_self, con
4545 * ((int * )self -> write_buffer ) = message_size ;
4646 S4NOC_CHANNEL_DEBUG ("S4NOCPollChannel_send_blocking: message size: ((%d))." , message_size );
4747 int total_size = message_size + 4 ;
48+ S4NOC_CHANNEL_DEBUG ("Total size to send: ((%d))" , total_size );
49+
4850 * s4noc_dest = self -> destination_core ;
4951 int bytes_send = 0 ;
5052 while (bytes_send < total_size ) {
@@ -62,7 +64,7 @@ static void S4NOCPollChannel_register_receive_callback(NetworkChannel *untyped_s
6264 void (* receive_callback )(FederatedConnectionBundle * conn ,
6365 const FederateMessage * msg ),
6466 FederatedConnectionBundle * conn ) {
65- // S4NOC_CHANNEL_INFO("Register receive callback at %p", receive_callback);
67+ S4NOC_CHANNEL_INFO ("Register receive callback at %p" , receive_callback );
6668 S4NOCPollChannel * self = (S4NOCPollChannel * )untyped_self ;
6769
6870 self -> receive_callback = receive_callback ;
@@ -98,15 +100,16 @@ void S4NOCPollChannel_poll(NetworkChannel *untyped_self) {
98100 receive_channel -> receive_buffer + 4 , // skip the 4-byte size header
99101 expected_message_size // only the message payload
100102 );
103+ // bytes_left = ((bytes_left / 4)+1) * 4;
101104 // S4NOC_CHANNEL_DEBUG("Bytes Left after attempted to deserialize: %d", bytes_left);
102105
103106 if (bytes_left >= 0 ) {
104107 receive_channel -> receive_buffer_index = bytes_left ;
105108 if (receive_channel -> receive_callback != NULL ) {
106- // S4NOC_CHANNEL_DEBUG("calling user callback at %p!", receive_channel->receive_callback);
109+ S4NOC_CHANNEL_DEBUG ("calling user callback at %p!" , receive_channel -> receive_callback );
107110 receive_channel -> receive_callback (self -> federated_connection , & receive_channel -> output );
108111 } else {
109- // S4NOC_CHANNEL_WARN("No receive callback registered, dropping message");
112+ S4NOC_CHANNEL_WARN ("No receive callback registered, dropping message" );
110113 }
111114 }
112115 }
0 commit comments