#include "fwp_conf.h"
#include "fwp_vres.h"
#include "fwp_endpoint.h"
+#include "fwp_contract.h"
#include "fwp_mngt.h"
static inline int fwp_init()
return (contract->status == FWP_CONT_RESERVED);
}
-static int fwp_contract_is_negotiated(fwp_contract_d_t contract)
+int fwp_contract_is_negotiated(fwp_contract_d_t contract)
{
return (contract->status == FWP_CONT_NEGOTIATED);
}
} fwp_contract_t;
struct fwp_contract_data;
+//typedef struct fwp_contract_data fwp_contract_data_t;
typedef struct fwp_contract_data* fwp_contract_d_t;
#ifdef _FWP_INTERNALS_
fwp_contract_d_t fwp_contract_create(fwp_contract_t *contract);
int fwp_contract_negotiate(fwp_contract_d_t contract, fwp_vres_d_t *vresdp);
+int fwp_contract_is_negotiated(fwp_contract_d_t contract);
#endif /*_FWP_CONTRACT_H */
#include "fwp_conf.h"
#include "fwp_mngt.h"
+#include "fwp_msg.h"
+//#include "fwp_util.h"
+#include "fwp_contract_table.h"
+
#include <stdlib.h>
/**
* Global mngt variables
#ifndef _FWP_MNGT_H
#define _FWP_MNGT_H
-#include "fwp_msg.h"
+#ifdef _FWP_INTERNALS_
-#include "fwp_util.h"
#include "fwp_vres.h"
#include "fwp_endpoint.h"
+
+#include "fwp_msg.h"
#include "fwp_participant.h"
-#include "fwp_contract_table.h"
#define FWP_MNGR_STREAM_ID 3000
#define FWP_MNGT_DISCOVERY_STREAM_ID 3000
int fwp_mngt_recv(fwp_msg_type_t *type, fwp_participant_id_t *participant_id,
fwp_msgb_t *msgb);
-int fwp_mngt_init();
int fwp_mngt_service_vres_create(fwp_vres_d_t* fwp_service_vresd);
+
+#endif
+
+int fwp_mngt_init();
int fwp_mngt_connect();
#endif /* _FWP_MNGT_H */
#include <stdint.h>
+#ifdef _FWP_INTERNALS_
+
#include "fwp_contract.h"
#include "fwp_vres.h"
#include "fwp_participant.h"
void fwp_msg_hello_out(unsigned char *data,
fwp_participant_info_t *participant_info);
+#endif
+
#endif /* _FWP_MSG_H */
SUBDIRS= fwp_msgtest fwp_vrestest fwp_prototest fwp_mngrtest
-CFLAGS = -Wall -D_REENTRANT -g -D_FWP_INTERNALS_=1
+CFLAGS = -Wall -D_REENTRANT -g -D_FWP_INTERNALS_
#SUBDIRS= fwp_msgtest fwp_vrestest fwp_prototest fwp_mngrtest
#fwp_mngrtest unixsocktest
fwp_contract_t cnt2;
fwp_contract_t cnt3;
pthread_t id;
- struct fwp_vres_params vparam1;
cnt1.budget = 100;
cnt1.period_usec = 10000;
test_PROGRAMS = fwp_msgtest
-CFLAGS = -Wall -D_REENTRANT -g -D_FWP_INTERNALS_=1
+CFLAGS+= -D_FWP_INTERNALS_
fwp_msgtest_SOURCES+= fwp_msgtest.c
lib_LOADLIBES += fwp pthread
test_PROGRAMS = fwp_sendrecv_test1 fwp_sendrecv_test2
+CFLAGS+= -D_FWP_INTERNALS_
fwp_sendrecv_test1_SOURCES+= fwp_sendrecv_test1.c
fwp_sendrecv_test2_SOURCES+= fwp_sendrecv_test2.c
lib_LOADLIBES += fwp pthread rt ulut
test_PROGRAMS = fwp_vrestest1 fwp_vrestest2
+CFLAGS+= -D_FWP_INTERNALS_
fwp_vrestest1_SOURCES+= fwp_vrestest1.c
fwp_vrestest2_SOURCES+= fwp_vrestest2.c
lib_LOADLIBES += fwp pthread rt ulut