]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_distributed_types.h
Disabling distributed module in frsh_configuration parameters
[frescor/frsh-include.git] / frsh_distributed_types.h
index 0043f7b0239188db786ffda8a7ec7850e4182179..7b87887983ad2866296bff72a0ff03113451893d 100644 (file)
@@ -12,7 +12,7 @@
 //    Visual Tools S.A.                      SPAIN
 //    Rapita Systems Ltd                     UK
 //    Evidence                               ITALY
-//    
+//
 //    See http://www.frescor.org for a link to partners' websites
 //
 //           FRESCOR project (FP6/2005/IST/5-034026) is funded
@@ -22,7 +22,7 @@
 //
 //
 //  based on previous work (FSF) done in the FIRST project
-//                       
+//
 //   Copyright (C) 2005  Mälardalen University, SWEDEN
 //                       Scuola Superiore S.Anna, ITALY
 //                       Universidad de Cantabria, SPAIN
 //  **////  /**///**  ////////** /**//////**
 //  **      /**  //**        /** /**     /**
 //  **      /**   //** ********  /**     /**
-//  //       //     // ////////   //      // 
+//  //       //     // ////////   //      //
 //
 // FRSH(FRescor ScHeduler), pronounced "fresh"
 //==============================================
 
-#ifndef        FRSH_DISTRIBUTED_TYPES_H_
-#define        FRSH_DISTRIBUTED_TYPES_H_
+#ifndef   FRSH_DISTRIBUTED_TYPES_H_
+#define   FRSH_DISTRIBUTED_TYPES_H_
+
+/**
+ * @file frsh_distributed_types.h
+ **/
 
 #include "frsh_opaque_types.h"
 
  * @{
  **/
 
-#define FRSH_DEFAULT_NETWORK_ID                1
-#define FRSH_NULL_NETWORK_ID           0
-
-
 //opaque types for frsh endpoints
 typedef FRSH_SEND_ENDPOINT_T_OPAQUE frsh_send_endpoint_t;
 typedef FRSH_RECEIVE_ENDPOINT_T_OPAQUE frsh_receive_endpoint_t;
 
 /**
- * The node_address type specifies the node address
- * in a communication-protocol-independent way. The actual
- * address is obtained via a configuration dependent mapping
- * function
+ * The network_address type specifies the node or multicast address in
+ * a communication-protocol-independent way. The actual address is
+ * obtained via a configuration dependent mapping function
  **/
-typedef unsigned int  frsh_node_address_t;
+typedef unsigned int frsh_network_address_t;
 
 /**
- * The port type specifies the information that is 
+ * The port type specifies the information that is
  * necessary to get in contact with the thread in the
  * receiving node, in a protocol-independent way.
  * The actual port number is obtained via a configuration
  * dependent mapping function
  **/
-typedef unsigned int  frsh_stream_id_t;
+typedef unsigned int frsh_stream_id_t;
 
 /**
  * Extra information protocol dependent opaque for the application.
  * It can be used in different places: contract negotiation, extra
  * endpoint info, extra status info...
  **/
-typedef struct _protocol_info_t
-{
+typedef struct {
     void *body;
     int size;
 } frsh_protocol_info_t;
 
+/**
+ * Protocol dependent information about the status of an endpoint
+ **/
+typedef struct {
+   void *body;
+   int size;
+} frsh_protocol_status_t;
+
+/**
+ * Protocol dependent information about extra parameters for
+ * send_endpoint definition.
+ **/
+typedef struct {
+   void *body;
+   int size;
+} frsh_send_endpoint_protocol_info_t;
+
+/**
+ * Protocol dependent information about extra parameters for
+ * receive_endpoint definition.
+ **/
+typedef struct {
+   void *body;
+   int size;
+} frsh_receive_endpoint_protocol_info_t;
+
 /**
  * Algorithm used when the queue is full to choose the message to reject
  **/
-typedef enum _queue_rejection_policy_t
-{
+typedef enum {
     /** A new message is admitted rejecting the oldest message in the
         queue to make room for the newcomer **/
     FRSH_QRP_OLDEST,
@@ -128,17 +151,24 @@ typedef enum _queue_rejection_policy_t
     /** Incoming messages are rejected if the queue is full **/
     FRSH_QRP_NEWCOMER
 } frsh_queue_rejection_policy_t;
-    
+
 /**
  * Queing information for endpoints
  **/
-typedef struct _frsh_endpoint_queueing_info_t
-{
+typedef struct {
     int queue_size;  /** Size 0 means that there is no queue **/
     frsh_queue_rejection_policy_t queue_policy;
 } frsh_endpoint_queueing_info_t;
 
 
+typedef enum {
+    /** Network works OK **/
+    FRSH_ENS_UP,
+
+    /** Network is down **/
+    FRSH_ENS_DOWN
+} frsh_endpoint_network_status_t;
+
 /*@}*/
 
-#endif             /* !FRSH_DISTRIBUTED_TYPES_H_ */
+#endif  /* !FRSH_DISTRIBUTED_TYPES_H_ */