Commit 1f05ac13 authored by jdelange's avatar jdelange
Browse files

* include/po_hi_transport.h

   src/po_hi_transport.c
   - Add support for the function __po_hi_transport_get_node_from_device
     to retrieve the node associated with a device.



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@3300 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 021a0e45
......@@ -155,6 +155,10 @@ char* __po_hi_transport_get_model_name (const __po_hi_port_t portno)
*/
__po_hi_node_t __po_hi_transport_get_mynode (void);
/* \fn __po_hi_transport_get_node_from_device
* \brief Return the node identifier associated with the device given in parameter.
*/
__po_hi_node_t __po_hi_transport_get_node_from_device (const __po_hi_device_id device);
/*
* \fn __po_hi_transport_get_protocol
......@@ -168,8 +172,6 @@ __po_hi_node_t __po_hi_transport_get_mynode (void);
*/
__po_hi_protocol_t __po_hi_transport_get_protocol (const __po_hi_port_t src, const __po_hi_port_t dst);
/*
* \fn __po_hi_transport_get_protocol_configuration
* \brief Retrieve the configuration of the given protocol identifier. Returns a pointer on the conf or NULL.
......
......@@ -39,6 +39,7 @@ extern __po_hi_uint8_t __po_hi_deployment_endiannesses[__PO_HI_NB_NODE
extern __po_hi_protocol_conf_t __po_hi_protocols_configuration[__PO_HI_NB_PROTOCOLS];
#if __PO_HI_NB_DEVICES > 0
extern __po_hi_port_t __po_hi_devices_to_nodes[__PO_HI_NB_DEVICES];
extern __po_hi_device_id __po_hi_port_to_device[__PO_HI_NB_PORTS];
extern char* __po_hi_devices_naming[__PO_HI_NB_DEVICES];
extern __po_hi_uint32_t* __po_hi_devices_configuration_values[__PO_HI_NB_DEVICES];
......@@ -208,6 +209,10 @@ __po_hi_uint32_t* __po_hi_get_device_configuration (const __po_hi_device_id dev)
return __po_hi_devices_configuration_values[dev];
}
__po_hi_node_t __po_hi_transport_get_node_from_device (const __po_hi_device_id device)
{
return (__po_hi_devices_to_nodes[device]);
}
#endif
......@@ -308,3 +313,4 @@ int __po_hi_transport_xtratum_get_port (const __po_hi_port_t portno)
#endif
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