| 1 |
#pragma once |
| 2 |
|
| 3 |
/////////////////////////////////////////////////////////////////////////////// |
| 4 |
|
| 5 |
// Config |
| 6 |
#define WCS_MAX_NETSIZE 10 |
| 7 |
#define WCS_SLAVE_AUTOEXIT_TIME 5000 // 5 seconds |
| 8 |
#define WCS_QUEUE_SIZE 1000 |
| 9 |
|
| 10 |
// Header size |
| 11 |
#define TCPHDR_SIZE 20 |
| 12 |
#define UDPHDR_SIZE 10 |
| 13 |
|
| 14 |
// Socket ID |
| 15 |
#define WCS_SOCKID_STREAM_SERVER 1000 |
| 16 |
#define WCS_SOCKID_STREAM_CLIENT 2000 |
| 17 |
#define WCS_SOCKID_PEER_SERVER 4000 |
| 18 |
#define WCS_SOCKID_PEER_CLIENT 3000 |
| 19 |
|
| 20 |
// Config |
| 21 |
#define WCS_DEFAULT_BCAST_ADDRESS -1 |
| 22 |
#define WCS_DEFAULT_MASTER_ADDRESS -1 |
| 23 |
#define WCS_DEFAULT_TCP_PORT 20000 |
| 24 |
#define WCS_DEFAULT_UDP_CLIENT_PORT 20001 |
| 25 |
#define WCS_DEFAULT_UDP_SERVER_PORT 20002 |
| 26 |
#define WCS_DEFAULT_TIMEOUT 3000 |
| 27 |
#define WCS_DEFAULT_RETRY 3 |
| 28 |
#define WCS_DEFAULT_NODE_ID 0xFFFF |
| 29 |
#define WCS_MASTER_NODE_ID 0x0000 |
| 30 |
|
| 31 |
// Node type |
| 32 |
#define WCS_NODE_UNDEFINED 0x0001 |
| 33 |
#define WCS_NODE_SLAVE 0x0002 |
| 34 |
#define WCS_NODE_MASTER 0x0004 |
| 35 |
|
| 36 |
// Node state |
| 37 |
#define WCS_STATE_WAITING 1000 |
| 38 |
#define WCS_STATE_EXECUTING 1001 |
| 39 |
#define WCS_STATE_BENCHMARKING 1002 |
| 40 |
#define WCS_STATE_DOWNLOADING 1003 |
| 41 |
|
| 42 |
// Plugin state |
| 43 |
#define WCS_PLUGIN_IDLE 2000 |
| 44 |
#define WCS_PLUGIN_RUNNING 2001 |
| 45 |
#define WCS_PLUGIN_FINISH 2002 |
| 46 |
|
| 47 |
// TCP Message |
| 48 |
#define WCS_MSG_MASTER_ACCEPT 3000 |
| 49 |
#define WCS_MSG_MASTER_ACCEPT_ACK 3001 |
| 50 |
#define WCS_MSG_BENCHMARK_START 3002 |
| 51 |
#define WCS_MSG_BENCHMARK_START_ACK 3003 |
| 52 |
#define WCS_MSG_BENCHMARK_RESULT 3004 |
| 53 |
#define WCS_MSG_BENCHMARK_RESULT_ACK 3005 |
| 54 |
#define WCS_MSG_BENCHMARK_CANCEL 3006 |
| 55 |
#define WCS_MSG_BENCHMARK_CANCEL_ACK 3007 |
| 56 |
#define WCS_MSG_BENCHMARK_PROGRESS 3008 |
| 57 |
#define WCS_MSG_BENCHMARK_RANKING 3009 |
| 58 |
#define WCS_MSG_PLAINTEXT 3010 |
| 59 |
#define WCS_MSG_CHANGE_PROCESSOR_COUNT 3011 |
| 60 |
|
| 61 |
// Plugin |
| 62 |
#define WCS_MSG_PLUGIN_START 3100 |
| 63 |
#define WCS_MSG_PLUGIN_START_ACK 3101 |
| 64 |
#define WCS_MSG_PLUGIN_CANCEL 3102 |
| 65 |
#define WCS_MSG_PLUGIN_CANCEL_ACK 3103 |
| 66 |
#define WCS_MSG_PLUGIN_STOP 3104 |
| 67 |
#define WCS_MSG_PLUGIN_RAWDATA 3105 |
| 68 |
#define WCS_MSG_PLUGIN_RAWDATA_ACK 3106 |
| 69 |
#define WCS_MSG_PLUGIN_TRANSFER 3107 |
| 70 |
|
| 71 |
// UDP Message |
| 72 |
#define WCS_MSG_MASTER_DISCOVER 4000 |
| 73 |
#define WCS_MSG_MASTER_OFFER 4001 |
| 74 |
|
| 75 |
// Window message |
| 76 |
#define WM_SHOWN (WM_USER + 100) |
| 77 |
#define WM_PLUGIN_RELOAD (WM_USER + 101) |
| 78 |
#define WM_PLUGIN_CHANGE (WM_USER + 102) |
| 79 |
#define WM_PLUGIN_LOCK (WM_USER + 103) |
| 80 |
#define WM_PLUGIN_TRANSFER (WM_USER + 104) |
| 81 |
#define WM_PLUGIN_TRANSFER_ERROR (WM_USER + 105) |
| 82 |
#define WM_PLUGIN_SENDING (WM_USER + 106) |
| 83 |
#define WM_WCS_EXECUTE (WM_USER + 107) |
| 84 |
#define WM_WCS_STOP (WM_USER + 108) |
| 85 |
#define WM_WCS_BENCHMARK (WM_USER + 109) |
| 86 |
#define WM_LOG_OUTPUT (WM_USER + 110) |
| 87 |
#define WM_BMSYSTEM_PROGRESS (WM_USER + 111) |
| 88 |
#define WM_BMSYSTEM_FINISH (WM_USER + 112) |
| 89 |
#define WM_SEND_TEXT (WM_USER + 113) |
| 90 |
#define WM_SHOW_LOG (WM_USER + 114) |
| 91 |
#define WM_OUTPUT_REPORT (WM_USER + 115) |
| 92 |
|
| 93 |
/////////////////////////////////////////////////////////////////////////////// |