-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
167 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ | |
build | ||
**/*.o | ||
**/vrg | ||
**/vrg_northbound | ||
**/.libs | ||
unit_test/unit-tester |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
############################################################ | ||
# vRG northbound makefile | ||
############################################################ | ||
|
||
###################################### | ||
# Set variable | ||
###################################### | ||
CC = g++ | ||
INCLUDE = | ||
CFLAGS = $(INCLUDE) -Wall -g -O3 | ||
|
||
LDFLAGS = -lutils | ||
|
||
TARGET = vrg_northbound | ||
SRC = $(wildcard *.cpp) | ||
OBJ = $(SRC:.cpp=.o) | ||
|
||
.PHONY: $(TARGET) | ||
all: $(TARGET) | ||
###################################### | ||
# Compile & Link | ||
# Must use \tab key after new line | ||
###################################### | ||
$(TARGET): $(OBJ) | ||
$(CC) $(CFLAGS) $(OBJ) -o $(TARGET) $(LDFLAGS) | ||
|
||
install: | ||
cp $(TARGET) /usr/local/bin/$(TARGET) | ||
|
||
###################################### | ||
# Clean | ||
###################################### | ||
clean: | ||
rm -rf $(OBJ) $(TARGET) .libs | ||
$(MAKE) -C $(TESTDIR) -f Makefile $@ | ||
|
||
uninstall: | ||
rm -f /usr/local/bin/$(TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <iostream> | ||
#include "../vrg.h" | ||
|
||
VRG_t *vrg_ccb; | ||
|
||
void vrg_grpc_server_run() { | ||
std::string server_address("0.0.0.0:50051"); | ||
|
||
std::cout << "Server listening on " << server_address << std::endl; | ||
for(;;); //place holder for grpc server | ||
} | ||
|
||
int main(int argc, char **argv) { | ||
vrg_grpc_server_run(); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef VRG_GRPC_SERVER_H | ||
#define VRG_GRPC_SERVER_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
int vrg_grpc_server_run(void *arg); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // VRG_GRPC_SERVER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters