Commit 1589182f authored by jdelange's avatar jdelange
Browse files

* po-hi-c/include/po_hi_transport.h

   po-hi-c/src/po_hi_transport.c
   - Ensure that protocol-related functions are
     always defined to avoid any link issue with
     missing functions.
   - Adapt functions behavior, depending
     on existing generated code.



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2992 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 27a4fd51
......@@ -156,7 +156,6 @@ char* __po_hi_transport_get_model_name (const __po_hi_port_t portno)
__po_hi_node_t __po_hi_transport_get_mynode (void);
#if __PO_HI_NB_PROTOCOLS > 0
/*
* \fn __po_hi_transport_get_protocol
* \brief Return the protocol identifier that is used between port src and port dst.
......@@ -181,7 +180,6 @@ __po_hi_protocol_t __po_hi_transport_get_protocol (const __po_hi_port_t
* will result in returning NULL.
*/
__po_hi_protocol_conf_t* __po_hi_transport_get_protocol_configuration (const __po_hi_protocol_t p);
#endif
#ifdef XM3_RTEMS_MODE
......
......@@ -272,21 +272,28 @@ __po_hi_port_kind_t __po_hi_transport_get_port_kind (const __po_hi_port_t portno
}
#if __PO_HI_NB_PROTOCOLS > 0
__po_hi_protocol_t __po_hi_transport_get_protocol (const __po_hi_port_t src, const __po_hi_port_t dst)
{
#if __PO_HI_NB_PROTOCOLS > 0
return (__po_hi_ports_protocols[src][dst]);
#else
return invalid_protocol;
#endif
}
__po_hi_protocol_conf_t* __po_hi_transport_get_protocol_configuration (const __po_hi_protocol_t p)
{
#if __PO_HI_NB_PROTOCOLS > 0
if (p == invalid_protocol)
{
return NULL;
}
return &(__po_hi_protocols_configuration[p]);
}
#else
return NULL;
#endif
}
#ifdef XM3_RTEMS_MODE
void __po_hi_transport_xtratum_port_init (const __po_hi_port_t portno, int val)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment