[411] | 1 | /* |
---|
| 2 | Copyright 2009 Virginia Polytechnic Institute and State University |
---|
[218] | 3 | |
---|
[411] | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
---|
| 5 | you may not use this file except in compliance with the License. |
---|
| 6 | You may obtain a copy of the License at |
---|
| 7 | |
---|
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 9 | |
---|
| 10 | Unless required by applicable law or agreed to in writing, software |
---|
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 13 | See the License for the specific language governing permissions and |
---|
| 14 | limitations under the License. |
---|
| 15 | */ |
---|
| 16 | |
---|
[218] | 17 | /* TODO DESCRIPTION OF FILE. |
---|
| 18 | * |
---|
| 19 | * This file is a temporary demo of a policy engine using some of our socket |
---|
| 20 | * communication functions. This is *not* an actual implementation of our |
---|
| 21 | * defined PolicyEngine class. |
---|
| 22 | */ |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | #include <cstdlib> |
---|
| 26 | #include <cstring> |
---|
| 27 | #include <stdint.h> |
---|
| 28 | |
---|
[465] | 29 | #include "vtcross/cognitive_engine.h" |
---|
[218] | 30 | #include "vtcross/common.h" |
---|
| 31 | #include "vtcross/containers.h" |
---|
| 32 | #include "vtcross/debug.h" |
---|
| 33 | #include "vtcross/error.h" |
---|
| 34 | #include "vtcross/socketcomm.h" |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | int32_t |
---|
| 38 | main(int32_t argc, char *argv[]) |
---|
| 39 | { |
---|
| 40 | if(argc < 3) |
---|
| 41 | ERROR(1, "Usage: %s hostname port\n", argv[0]); |
---|
| 42 | |
---|
[324] | 43 | CognitiveEngine cognitiveEngine(argv[1], argv[2], false); |
---|
[218] | 44 | |
---|
| 45 | LOG("Waiting for signal...\n"); |
---|
| 46 | while(1) { |
---|
[222] | 47 | cognitiveEngine.WaitForSignal(); |
---|
[218] | 48 | } |
---|
| 49 | |
---|
| 50 | return 0; |
---|
| 51 | } |
---|
| 52 | |
---|