//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// Copyright (C) 2006 - 2009 by the FRESCOR consortium:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
#ifndef _FRSH_FNA_H_
#define _FRSH_FNA_H_
-#include "frsh_core_types.h" /* for frsh_resource_id_t */
-#include "frsh_distributed_types.h" /* network_address_t, stream_id_t */
+#include "frsh.h" /* for frsh_resource_id_t, network_address_t, stream_id_t*/
#include <time.h> /* for timespec */
#include <stdbool.h> /* for bool */
#include "fna_configuration.h"
-#ifdef RTEP
+#ifdef RTEP_FNA_ENABLED
#include "rtep.h"
#endif
+#ifdef FRESCAN_FNA_ENABLED
+ #include "../src_frescan/frescan.h"
+#endif
+
/**
* @defgroup frshfna FNA Public Interface
*
* FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
*
**/
-#ifdef RTEP
-int frsh_rtep_map_network_address
- (const frsh_resource_id_t resource_id,
- const rtep_station_id_t in_address,
- frsh_network_address_t *out_address);
+#ifdef RTEP_FNA_ENABLED
+int frsh_rtep_map_network_address(const frsh_resource_id_t resource_id,
+ const rtep_station_id_t in_address,
+ frsh_network_address_t *out_address);
+#endif
+
+#ifdef FRESCAN_FNA_ENABLED
+int frsh_frescan_map_network_address(const frsh_resource_id_t resource_id,
+ const frescan_node_t in_address,
+ frsh_network_address_t *out_address);
#endif
/**
* FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
*
**/
-#ifdef RTEP
-int frsh_rtep_map_stream_id
- (const frsh_resource_id_t resource_id,
- const rtep_channel_t in_stream,
- frsh_stream_id_t *out_stream);
+#ifdef RTEP_FNA_ENABLED
+int frsh_rtep_map_stream_id(const frsh_resource_id_t resource_id,
+ const rtep_channel_t in_stream,
+ frsh_stream_id_t *out_stream);
+#endif
+
+#ifdef FRESCAN_FNA_ENABLED
+int frsh_frescan_map_stream_id(const frsh_resource_id_t resource_id,
+ const frescan_channel_t in_stream,
+ frsh_stream_id_t *out_stream);
#endif
/*@}*/
* FNA_ERR_REJECTED_CONTRACT : if the renegotiation fails \n
*
**/
-#ifdef RTEP
+#ifdef RTEP_FNA_ENABLED
int frsh_rtep_negotiation_messages_vres_renegotiate
(const frsh_resource_id_t resource_id,
const struct timespec *period);
#endif
+#ifdef FRESCAN_FNA_ENABLED
+int frsh_frescan_negotiation_messages_vres_renegotiate
+ (const frsh_resource_id_t resource_id,
+ const struct timespec *period);
+#endif
+
/**
* frsh_XXXX_negotiation_messages_vres_get_period()
*
* FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
*
**/
-#ifdef RTEP
+#ifdef RTEP_FNA_ENABLED
int frsh_rtep_negotiation_messages_vres_get_period
(const frsh_resource_id_t resource_id,
struct timespec *period);
#endif
+#ifdef FRESCAN_FNA_ENABLED
+int frsh_frescan_negotiation_messages_vres_get_period
+ (const frsh_resource_id_t resource_id,
+ struct timespec *period);
+#endif
+
/**
* frsh_XXXX_service_thread_vres_renegotiate()
*
* FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
*
**/
-#ifdef RTEP
+#ifdef RTEP_FNA_ENABLED
int frsh_rtep_service_thread_vres_renegotiate
(const frsh_resource_id_t resource_id,
const struct timespec *budget,
bool *accepted);
#endif
+#ifdef FRESCAN_FNA_ENABLED
+int frsh_frescan_service_thread_vres_renegotiate
+ (const frsh_resource_id_t resource_id,
+ const struct timespec *budget,
+ const struct timespec *period,
+ bool *accepted);
+#endif
+
/**
* frsh_XXXX_service_thread_vres_get_budget_and_period()
*
* FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
*
**/
-#ifdef RTEP
+#ifdef RTEP_FNA_ENABLED
int frsh_rtep_service_thread_vres_get_budget_and_period
(const frsh_resource_id_t resource_id,
struct timespec *budget,
struct timespec *period);
#endif
+#ifdef FRESCAN_FNA_ENABLED
+int frsh_frescan_service_thread_vres_get_budget_and_period
+ (const frsh_resource_id_t resource_id,
+ struct timespec *budget,
+ struct timespec *period);
+#endif
+
/*@}*/
#endif /* _FRSH_FNA_H_ */